Batch Inference

Active Models

get

List currently available models.

Responses
chevron-right
200

Successful Response

application/json
get
/v1/active-models
200

Successful Response

Active Models V2

get

List currently available models with detailed information.

Responses
chevron-right
200

Successful Response

application/json
get
/v1/model-config
200

Successful Response

Get All Batches V1

get

List your batch jobs, ordered by creation time (most recent first).

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
get
/v1/batches

Create Batch Job V1

post

Create and execute a batch job from an uploaded JSONL file.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Body
input_file_idstringRequired

The ID of an uploaded file that contains requests for the new batch job. Your input file must be formatted as a JSONL file and must be uploaded with purpose 'batch'.

Responses
chevron-right
200

Successful Response

application/json
post
/v1/batches

Get Files V1

get

List your files, ordered by creation time (most recent first).

Query parameters
limitinteger · min: 1 · max: 10000Optional

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

Default: 1000
afterstringOptional

A cursor for use in pagination. 'after' is an object ID that defines your place in the list.

orderstringOptional

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

Pattern: ^(asc|desc)$
Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
get
/v1/files

Upload File V1

post

Upload a file that can be used with batch jobs. Accepts JSONL files.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Body
filestring · binaryRequired

The file object (not filename) to be uploaded. Currently, only JSONL files are supported for batch jobs.

purposestringOptional

Uploaded file purpose. For batch jobs, use 'batch'.

Default: batch
Responses
chevron-right
200

Successful Response

application/json
post
/v1/files

Get Batch Job

get

Retrieve a batch job by its ID.

Path parameters
job_idstringRequired

The ID of the batch job to retrieve.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
get
/v1/batches/{job_id}

Delete Batch Job

delete

Attempt to cancel an in-progress batch job.

Path parameters
job_idstringRequired

The ID of the batch job to delete.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
delete
/v1/batches/{job_id}

Cancel Batch Job

post

Attempt to cancel an in-progress batch job.

Path parameters
job_idstringRequired

The ID of the batch job to cancel.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
post
/v1/batches/{job_id}/cancel

Get Batch Job Output

get

Retrieve the contents of the specified file.

Path parameters
file_idstringRequired

The ID of the file to retrieve.

Header parameters
Authorizationany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
Responseany
get
/v1/files/{file_id}/content

No content

Last updated