List files
/openai/v1/files● SupportedRequest parameters
purposestringoptionalquery: Only return files with the given purpose.
Verified to take effect.
limitintegeroptionalquery: A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.
Verified to take effect.
orderstringoptionalquery: Sort order by the
created_attimestamp of the objects.ascfor ascending order anddescfor descending order.Verified to take effect.
afterstringoptionalquery: A cursor for use in pagination.
afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.Verified to take effect.
Returns
200 list
Only the after, order, limit and purpose query parameters are accepted; any other returns 400 invalid_request_error "Unrecognized request argument supplied: <name>" with param naming it.
Errors follow the OpenAI format — see error codes
Request
curl
curl https://api.deepraxis.com/openai/v1/files \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/openai/v1",
api_key="$PRAXIS_API_KEY",
)
files = client.files.list()TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/openai/v1",
apiKey: "$PRAXIS_API_KEY",
});
const files = await client.files.list();Response 200
{
"object": "list",
"data": [
{
"id": "file_dp_01M41EAAEQ3N9T5T1D5Y6PYXNB",
"object": "file",
"bytes": 70,
"created_at": 1791049935,
"filename": "pixel.png",
"purpose": "user_data",
"status": "processed",
"status_details": null
}
],
"first_id": "file_dp_01M41EAAEQ3N9T5T1D5Y6PYXNB",
"last_id": "file_dp_01M41EAAEQ3N9T5T1D5Y6PYXNB",
"has_more": false
}Response
HTTP 200
OK
application/json
| Name | Type | Description |
|---|---|---|
| object | string | |
| data | array<object> | |
| data[].id | string | The file identifier, which can be referenced in the API endpoints. |
| data[].bytes | integer | The size of the file, in bytes. |
| data[].created_at | integer | The Unix timestamp (in seconds) for when the file was created. |
| data[].expires_at | integer | The Unix timestamp (in seconds) for when the file will expire. |
| data[].filename | string | The name of the file. |
| data[].object | string | The object type, which is always file. |
| data[].purpose | string | The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, and user_data. |
| data[].status | string | Deprecated. The current status of the file, which can be either uploaded, processed, or error. |
| data[].status_details | string | Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job. |
| first_id | string | |
| last_id | string | |
| has_more | boolean |