Skip to main content
New to Corsair? See API access, authentication, and error handling.

Agents

complete

agents.complete Run an agent on a list of messages with the agent’s instructions and tools; spends Mistral credits Risk: destructive
Input
Output

create

agents.create Create an agent: a model with instructions, tools and default settings (beta). Mistral refuses agent creation for some organizations with 403 “Use Managed Agents instead”; existing agents can still be listed, read, versioned and deleted Risk: write
Input Mistral refuses agent creation for some organizations with 403 “Use Managed Agents instead”; existing agents can still be listed, read, versioned and deleted.
Output

delete

agents.delete Delete an agent; cannot be undone (beta) Risk: destructive · Irreversible
Input Output

deleteAlias

agents.deleteAlias Remove a version alias from an agent; the version itself stays (beta) Risk: destructive
Input Output

get

agents.get Get an agent, at its current version or at a given version or alias (beta) Risk: read
Input Output

getVersion

agents.getVersion Get one version of an agent by number or alias (beta) Risk: read
Input Output

list

agents.list List agents, filtered by name, search text or metadata; page with page_token (beta) Risk: read
Input Page with page_token, the next_page_token of the previous page. Output

listAliases

agents.listAliases List an agent’s version aliases (beta) Risk: read
Input Output: object[]

listVersions

agents.listVersions List an agent’s versions; page with page and page_size (beta) Risk: read
Input Output: object[]

setVersion

agents.setVersion Switch an agent to another of its versions (beta) Risk: write
Input Output

update

agents.update Change an agent; each update creates a new version (beta) Risk: write
Input
Output

upsertAlias

agents.upsertAlias Point a version alias such as production at an agent version, creating it if needed (beta) Risk: write
Input Output

Audio

speech

audio.speech Turn text into speech; returns base64 audio (mp3 by default); spends Mistral credits Risk: destructive
Input audio_data is base64 audio in response_format (mp3 by default). Output

transcribe

audio.transcribe Transcribe audio from base64 content, a URL or an uploaded file, optionally with speakers and timestamps; spends Mistral credits Risk: destructive
Input Pass exactly one of content_base64 (with filename), file_url or file_id. Output

Audio Agents

create

audioAgents.create Create a voice agent: speech-to-text, LLM and text-to-speech settings, instructions and tools Risk: write
Input
Output

delete

audioAgents.delete Delete a voice agent; cannot be undone Risk: destructive · Irreversible
Input Output

get

audioAgents.get Get a voice agent, optionally at a given version Risk: read
Input Output

list

audioAgents.list List voice agents; page with page_token Risk: read
Input Output

listSessions

audioAgents.listSessions List a voice agent’s sessions; page with page_token Risk: read
Input Output

listVersions

audioAgents.listVersions List a voice agent’s versions; page with page_token Risk: read
Input Output

update

audioAgents.update Replace a voice agent’s name, description and configuration Risk: write
Input
Output

Batch

cancel

batch.cancel Ask Mistral to cancel a batch job: status goes to CANCELLATION_REQUESTED, then CANCELLED; there is no way to resume it Risk: destructive · Irreversible
Input Cancellation is a request; batch.get shows CANCELLATION_REQUESTED until the job reaches CANCELLED. There is no operation to resume a cancelled job. Output

create

batch.create Start a batch job that runs many requests to one endpoint, from uploaded .jsonl files or inline; spends Mistral credits and needs a Mistral plan with billing enabled (402 otherwise). Follow it with batch.get until status is SUCCESS, FAILED, TIMEOUT_EXCEEDED or CANCELLED Risk: destructive
Input Pass exactly one of input_files (ids of .jsonl files uploaded with purpose batch, one request per line) or requests inline. Every request goes to endpoint. Batch jobs need a Mistral plan with billing enabled; without it Mistral returns 402.
Output

delete

batch.delete Ask Mistral to delete a batch job; cannot be undone Risk: destructive · Irreversible
Input Output

get

batch.get Where a batch job stands: status, request counts, and output_file once it’s done Risk: read
Input Output

list

batch.list List batch jobs, filtered by status, model or date; page with page and page_size Risk: read
Input Output

Chat

complete

chat.complete Generate a chat answer from a list of messages, with optional tools and JSON output; spends Mistral credits Risk: destructive
Input stream is always false; the answer is in choices[0].message.content. Pass response_format: { type: "json_schema", json_schema: { name, schema } } for structured output.
Output

Classifiers

classify

classifiers.classify Classify texts with a fine-tuned classifier model; spends Mistral credits Risk: destructive
Input Output

classifyChat

classifiers.classifyChat Classify conversations with a fine-tuned classifier model; spends Mistral credits Risk: destructive
Input
Output

moderate

classifiers.moderate Score texts against moderation categories (sexual, hate, violence, self-harm…); spends Mistral credits Risk: destructive
Input Output

moderateChat

classifiers.moderateChat Score a conversation against moderation categories; spends Mistral credits Risk: destructive
Input
Output

Embeddings

create

embeddings.create Turn one or more texts into embedding vectors; spends Mistral credits Risk: destructive
Input Output

Files

delete

files.delete Delete an uploaded file; cannot be undone Risk: destructive · Irreversible
Input Output

get

files.get Get a file’s details Risk: read
Input Output

getSignedUrl

files.getSignedUrl A temporary download URL for a file’s content, such as a batch job’s output_file Risk: read
Input Output

list

files.list List uploaded files, filtered by purpose or name; page with page and page_size Risk: read
Input Output

upload

files.upload Upload a file (base64, up to 512 MB) for batch jobs, fine-tuning or OCR; returns its id Risk: write
Input content_base64 is the file content; a data: URL prefix is accepted. Use purpose batch for batch input, fine-tune for training data, ocr for documents. Output

Fim

complete

fim.complete Fill in code between a prompt and a suffix with a Codestral model; spends Mistral credits Risk: destructive
Input Output

Models

archive

models.archive Archive a fine-tuned model; models.unarchive restores it Risk: write
Input Output

delete

models.delete Delete a fine-tuned model; cannot be undone Risk: destructive · Irreversible
Input Output

get

models.get Get a model’s details and capabilities Risk: read
Input Output

list

models.list List the base and fine-tuned models this key can use, with their capabilities Risk: read
Input Output

unarchive

models.unarchive Restore an archived fine-tuned model Risk: write
Input Uses HTTP DELETE on the archive route, but only undoes models.archive. Output

update

models.update Rename a fine-tuned model or change its description Risk: write
Input Output

Ocr

process

ocr.process Read a PDF or image (URL or uploaded file) into markdown per page, with optional structured annotations; spends Mistral credits Risk: destructive
Input
Output

Responses

countInputTokens

responses.countInputTokens Count the input tokens a responses.create call would use, without running it Risk: read
Input
Output

create

responses.create Generate a response with the Responses API (input items, tools, reasoning); spends Mistral credits Risk: destructive
Input
Output

Voices

create

voices.create Create a custom voice from a base64 audio sample Risk: write
Input Output

delete

voices.delete Delete a custom voice; cannot be undone Risk: destructive · Irreversible
Input Output

get

voices.get Get a voice Risk: read
Input Output

list

voices.list List preset and custom voices for audio.speech; page with page_token Risk: read
Input Output

update

voices.update Change a custom voice’s name, languages, tags or details Risk: write
Input Output