List Files
curl --request GET \
--url https://api.moonshot.ai/v1/files \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "<string>",
"object": "file",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"status": "ready",
"status_details": "<string>"
}
]
}List Files
Lists all files uploaded by the current user.
GET
/
v1
/
files
List Files
curl --request GET \
--url https://api.moonshot.ai/v1/files \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "<string>",
"object": "file",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"status": "ready",
"status_details": "<string>"
}
]
}Usage Example
Usage Example
file_list = client.files.list()
for file in file_list.data:
print(file) # Inspect the metadata of each file
Authorizations
The Authorization header expects a Bearer token. Use an MOONSHOT_API_KEY as the token. This is a server-side secret key. Generate one on the API keys page in your dashboard.
Was this page helpful?
⌘I