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 for which to create a File Batch.

Body

application/json

Request body for creating a vector store file batch.

file_ids
string[]

A list of File IDs that the vector store should use. If attributes or chunking_strategy are provided at the root level, they will be applied to all files in the batch. Mutually exclusive with 'files'. At most 500 per batch.

Maximum array length: 500
files
object[]

A list of objects that each include a file_id plus optional attributes or chunking_strategy. Use this when you need to override metadata for specific files. Entries without their own attributes or chunking_strategy fall back to the request-level values. Mutually exclusive with 'file_ids'. At most 500 per batch.

Maximum array length: 500
attributes
object

Batch-wide default attributes, applied to every file that does not carry its own (a 'files' entry's attributes override this).

chunking_strategy
object

Batch-wide default chunking strategy, applied to every file that does not carry its own (a 'files' entry's chunking_strategy overrides this).

Response

200 - application/json

OK

A batch 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_batch'.

created_at
integer
required

The Unix timestamp (in seconds) for when the vector store files batch 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 files batch. 'in_progress' means files are being processed, 'completed' means all files have been processed, 'cancelled' means the batch was cancelled, 'failed' means the batch failed.

Available options:
in_progress,
completed,
cancelled,
failed
file_counts
object
required

File processing status counts.