For the complete documentation index, see llms.txt. This page is also available as Markdown.

Storage

Upload and manage media files.

List uploaded media files

get

List uploaded files.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
afterstringOptional

A cursor for use in pagination. after is 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.

limitinteger · uint32Optional

A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.

Default: 10000
orderstring · enumOptional

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

Default: descPossible values:
purposestring · enumOptional

The intended purpose of the file. Only "batch" is supported — uploaded files may only be used as input for the Batch API.

Possible values:
Responses
200

Successful response with list of files

application/json

A list of uploaded files.

objectstring · enumOptionalPossible values:
get/v1/storage
GET /v1/storage HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "bytes": 1,
      "created_at": 1,
      "filename": "text",
      "id": "text",
      "purpose": "assistants",
      "status": "error",
      "object": "file"
    }
  ],
  "object": "list"
}

Upload media file

post

Upload a media file for later use.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
filestring · binaryRequired

The File object (not file name) to be uploaded.

purposestring · enumRequired

The intended purpose of the file. Only "batch" is supported — uploaded files may only be used as input for the Batch API.

Possible values:
Responses
200

Successful response with file upload details

application/json

The File object represents a document that has been uploaded to OpenAI.

bytesintegerOptional

The size of the file, in bytes.

created_atintegerOptional

The Unix timestamp (in seconds) for when the file was created.

filenamestringOptional

The name of the file.

idstringOptional

The file identifier, which can be referenced in the API endpoints.

purposestring · enumOptional

The intended purpose of the file.

Possible values:
statusstring · enumOptional

The status of the file.

Possible values:
objectstring · enumOptionalPossible values:
post/v1/storage
POST /v1/storage HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 35

{
  "file": "binary",
  "purpose": "batch"
}
{
  "bytes": 1,
  "created_at": 1,
  "filename": "text",
  "id": "text",
  "purpose": "assistants",
  "status": "error",
  "object": "file"
}

Get storage file

get

Retrieve file details by ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
file_idstringRequired

The ID of the file to use for this request.

Responses
200

Successful response with file details

application/json

The File object represents a document that has been uploaded to OpenAI.

bytesintegerOptional

The size of the file, in bytes.

created_atintegerOptional

The Unix timestamp (in seconds) for when the file was created.

filenamestringOptional

The name of the file.

idstringOptional

The file identifier, which can be referenced in the API endpoints.

purposestring · enumOptional

The intended purpose of the file.

Possible values:
statusstring · enumOptional

The status of the file.

Possible values:
objectstring · enumOptionalPossible values:
get/v1/storage/{file_id}
GET /v1/storage/{file_id} HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "bytes": 1,
  "created_at": 1,
  "filename": "text",
  "id": "text",
  "purpose": "assistants",
  "status": "error",
  "object": "file"
}

Delete storage file

delete

Delete a file by ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
file_idstringRequired
Responses
200

Successful response with deletion status.

application/json

The status of a file deletion.

idstringRequired

The file identifier.

deletedbooleanRequired

Indicates whether the file has been deleted.

delete/v1/storage/{file_id}
DELETE /v1/storage/{file_id} HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "deleted": true
}

Get storage file contents

get

Download file contents by ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
file_idstringRequired
Responses
200

Successful response with file contents

application/octet-stream
string · binaryOptional
get/v1/storage/{file_id}/content
GET /v1/storage/{file_id}/content HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary

Last updated