List Files
Paginated query of files uploaded by the current tenant. This endpoint aligns with the Files list operation and returns a list object.
GET
Authentication
Add Authorization: Bearer <API_KEY> to the request header to authenticate. You can generate a key on the "API Keys" page of the console.
curl https://api.mosi.cn/v1/files \
-H "Authorization: Bearer $MOSS_API_KEY"
Request parameters
| Query | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Number of records to return. Valid range: 1–200. |
| offset | integer | No | Offset. Valid range: 0–100000. |
| purpose | string | No | Filter by purpose. |
Request example
curl "https://api.mosi.cn/v1/files?purpose=audio&limit=20" \
-H "Authorization: Bearer $MOSS_API_KEY"
Response fields
| Field | Type | Always returned | Description |
|---|---|---|---|
| object | string | Yes | Fixed as |
| data[].id | string | Yes | File id, i.e. the |
| data[].object | string | Yes | Fixed as |
| data[].bytes | integer | Yes | File size in bytes. |
| data[].created_at | integer | Yes | Creation time, a Unix timestamp in seconds. |
| data[].filename | string | Yes | Original filename. |
| data[].purpose | string | Yes | File purpose marker; may be an empty string. |
| data[].status | string | Yes | File status, subject to the actual server response. |
Response example
{
"object": "list",
"data": [
{
"id": "<file_id>",
"object": "file",
"bytes": 1048576,
"created_at": 1710000000,
"filename": "speech.wav",
"purpose": "audio",
"status": "active"
}
]
}