Skip to main content
POST
Python (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Path Parameters

vector_store_id
string
required

The ID of the vector store the file belongs to.

file_id
string
required

The ID of the file to update attributes.

Body

application/json

Request body for updating vector store file attributes.

attributes
object
required

Set of 16 key-value pairs that can be attached to an object. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

Response

200 - application/json

OK

A list of files attached to a vector store.

id
string
required

The identifier, which can be referenced in API endpoints.

object
any
required

The object type, which is always 'vector_store.file'.

usage_bytes
integer
required

The total vector store usage in bytes. Note that this may be different from the original file size.

Required range: -9007199254740991 <= x <= 9007199254740991
created_at
integer
required

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

Required range: -9007199254740991 <= x <= 9007199254740991
vector_store_id
string
required

The ID of the vector store that the File is attached to.

status
enum<string>
required

The status of the vector store file. 'in_progress' means currently processing, 'completed' indicates the file is ready for use, 'cancelled' means processing was cancelled, 'failed' means an error occurred.

Available options:
in_progress,
completed,
cancelled,
failed
last_error
object | null
required

The last error associated with this vector store file. Will be null if there are no errors.

filename
string

The name of the underlying file. Extension field not present in the OpenAI API; omitted on create responses.

chunking_strategy
object

The strategy used to chunk the file.

attributes
object

Set of 16 key-value pairs that can be attached to an object. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.