mistralM

Docs

Batch

Batch API

GET /v1/batch/jobs

Get Batch Jobs

Get a list of batch jobs for your organization and user.

Parameters

page
integerquery
page_size
integerquery
model
string | nullquery
agent_id
string | nullquery
metadata
map<any> | nullquery
created_after
date-time | nullquery
created_by_me
booleanquery
status
array<"QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "TIMEOUT_EXCEEDED" | "CANCELLATION_REQUESTED" | "CANCELLED"> | nullquery
order_by
"created" | "-created"query

Responses

OK

data
array<BatchJob>
BatchJob
agent_id
string | null
completed_at
integer | null
completed_requests
integer* required
created_at
integer* required
endpoint
string* required
error_file
string | null
errors
array<BatchError>* required
BatchError
count
integer

Default Value: 1

message
string* required
failed_requests
integer* required
id
string* required
input_files
array<string>* required
metadata
map<any> | null
model
string | null
object
string

Default Value: "batch"

output_file
string | null
outputs
array<map<any>> | null
started_at
integer | null
status
"QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "TIMEOUT_EXCEEDED" | "CANCELLATION_REQUESTED" | "CANCELLED"* required
succeeded_requests
integer* required
total_requests
integer* required
object
string

Default Value: "list"

total
integer* required

POST /v1/batch/jobs

Create Batch Job

Create a new batch job, it will be queued for processing.

Request Example

{
  "endpoint": "/v1/chat/completions"
}

Request Body

agent_id
string | null
exclamationMark

In case you want to use a specific agent from the deprecated agents api for batch inference, you can specify the agent ID here.

endpoint
"/v1/chat/completions" | "/v1/embeddings" | "/v1/fim/completions" | "/v1/moderations" | "/v1/chat/moderations" | "/v1/ocr" | "/v1/classifications" | "/v1/chat/classifications" | "/v1/conversations" | "/v1/audio/transcriptions"* required
input_files
array<string> | null

A list of .jsonl files for batch inference. Each line must be a JSON object with a body field containing the request payload:

\{"custom_id": "0", "body": \{"max_tokens": 100, "messages": [\{"role": "user", "content": "What is the best French cheese?"\}]\}\}
\{"custom_id": "1", "body": \{"max_tokens": 100, "messages": [\{"role": "user", "content": "What is the best French wine?"\}]\}\}
metadata
map<string> | null

The metadata of your choice to be associated with the batch inference job.

model
string | null

The model to be used for batch inference.

Examples:

mistral-small-latest
mistral-medium-latest
requests
array<BatchRequest> | null
BatchRequest
body
map<any>* required
custom_id
string | null
timeout_hours
integerMin: 1Max: 168

The timeout in hours for the batch inference job.

Default Value: 24

Responses

OK

agent_id
string | null
completed_at
integer | null
completed_requests
integer* required
created_at
integer* required
endpoint
string* required
error_file
string | null
errors
array<BatchError>* required
BatchError
count
integer

Default Value: 1

message
string* required
failed_requests
integer* required
id
string* required
input_files
array<string>* required
metadata
map<any> | null
model
string | null
object
string

Default Value: "batch"

output_file
string | null
outputs
array<map<any>> | null
started_at
integer | null
status
"QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "TIMEOUT_EXCEEDED" | "CANCELLATION_REQUESTED" | "CANCELLED"* required
succeeded_requests
integer* required
total_requests
integer* required

GET /v1/batch/jobs/{job_id}

Get Batch Job

Get a batch job details by its UUID.

Args: inline: If True, return results inline in the response.

Parameters

job_id
stringpath* required
inline
boolean | nullquery

Responses

OK

agent_id
string | null
completed_at
integer | null
completed_requests
integer* required
created_at
integer* required
endpoint
string* required
error_file
string | null
errors
array<BatchError>* required
BatchError
count
integer

Default Value: 1

message
string* required
failed_requests
integer* required
id
string* required
input_files
array<string>* required
metadata
map<any> | null
model
string | null
object
string

Default Value: "batch"

output_file
string | null
outputs
array<map<any>> | null
started_at
integer | null
status
"QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "TIMEOUT_EXCEEDED" | "CANCELLATION_REQUESTED" | "CANCELLED"* required
succeeded_requests
integer* required
total_requests
integer* required

DELETE /v1/batch/jobs/{job_id}

Delete Batch Job

Request the deletion of a batch job.

Parameters

job_id
stringpath* required

Responses

OK

deleted
boolean

Default Value: true

id
string* required
object
string

Default Value: "batch"

POST /v1/batch/jobs/{job_id}/cancel

Cancel Batch Job

Request the cancellation of a batch job.

Parameters

job_id
stringpath* required

Responses

OK

agent_id
string | null
completed_at
integer | null
completed_requests
integer* required
created_at
integer* required
endpoint
string* required
error_file
string | null
errors
array<BatchError>* required
BatchError
count
integer

Default Value: 1

message
string* required
failed_requests
integer* required
id
string* required
input_files
array<string>* required
metadata
map<any> | null
model
string | null
object
string

Default Value: "batch"

output_file
string | null
outputs
array<map<any>> | null
started_at
integer | null
status
"QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "TIMEOUT_EXCEEDED" | "CANCELLATION_REQUESTED" | "CANCELLED"* required
succeeded_requests
integer* required
total_requests
integer* required