Skip to content
Software capabilities
Mistral AI

How to check Mistral AI batch job status

Fetch a Mistral batch job by ID using the REST endpoint or Python SDK. Read its status and file IDs before downloading the results.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: GET /v1/batch/jobs/{job_id}
  2. SDK: client.batch.jobs.get(job_id=...)
API

GET /v1/batch/jobs/{job_id}

Retrieve the job state, progress counters, and output or error file IDs when available.

Read source: Mistral batch API
Requirements
The job ID and a Mistral API key for the workspace that owns it.
Limitations
The result is a status snapshot. Fetch the output file separately after the job publishes it.

Example shell

curl --fail "https://api.mistral.ai/v1/batch/jobs/$MISTRAL_JOB_ID" -H "Authorization: Bearer $MISTRAL_API_KEY"
SDK

client.batch.jobs.get(job_id=...)

Retrieve the batch job and inspect its status from Python.

Read source: Mistral batch processing guide
Requirements
The mistralai package, a Mistral API key for the workspace, and the batch job ID.
Limitations
While status is QUEUED or RUNNING, wait between status reads and keep polling until the job reaches a terminal state.

Example text

import os
from mistralai import Mistral

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
job = client.batch.jobs.get(job_id=os.environ["MISTRAL_JOB_ID"])
print(job.status)