List files

Returns a list of files.

Request

GET

https://ai.api.cloud.yandex.net/v1/files

Query parameters

Name

Description

after

Type: string

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.

Example: ``

limit

Type: integer

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

order

Type: string

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

Default: desc

Enum: asc, desc

purpose

Type: string

Only return files with the given purpose.

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "object": "list",
  "data": [
    {
      "id": "example",
      "bytes": 0,
      "created_at": 0,
      "expires_at": 0,
      "filename": "example",
      "object": "file",
      "purpose": "assistants",
      "status": "uploaded",
      "status_details": "example"
    }
  ],
  "first_id": "example",
  "last_id": "example",
  "has_more": false
}

Name

Description

data

Type: OpenAIFile[]

Example
[
  {
    "id": "example",
    "bytes": 0,
    "created_at": 0,
    "expires_at": 0,
    "filename": "example",
    "object": "file",
    "purpose": "assistants",
    "status": "uploaded",
    "status_details": "example"
  }
]

first_id

Type: string

Example: example

has_more

Type: boolean

last_id

Type: string

Example: example

object

Type: string

Example: list

OpenAIFile

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

Name

Description

bytes

Type: integer

The size of the file, in bytes.

created_at

Type: integer

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

filename

Type: string

The name of the file.

Example: example

id

Type: string

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

Example: example

object

Type: string

The object type, which is always file.

Const: file

Example: example

purpose

Type: 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.

Enum: assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, user_data

status

Type: string

Deprecated. The current status of the file, which can be either uploaded, processed, or error.

Enum: uploaded, processed, error

expires_at

Type: integer

The Unix timestamp (in seconds) for when the file will expire.

status_details

Type: string

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

Example: example

Example
{
  "id": "example",
  "bytes": 0,
  "created_at": 0,
  "expires_at": 0,
  "filename": "example",
  "object": "file",
  "purpose": "assistants",
  "status": "uploaded",
  "status_details": "example"
}

No longer supported, please use an alternative and newer version.

Предыдущая
Следующая