Skip to main content
Use Mistral AI through Corsair: one client, typed API calls. Each operation returns one JSON result: streaming is off for completions, responses, speech and transcription. Files and audio go in as base64; the fields differ per operation: files.upload takes content_base64 and filename; audio.transcribe takes content_base64 with filename, or file_url or file_id instead; voices.create takes sample_audio and an optional sample_filename; ocr.process takes its document as a URL ({ type: 'document_url', document_url } for a PDF, { type: 'image_url', image_url } for an image) or as the file_id of an uploaded file ({ type: 'file', file_id }); document_url and image_url also accept a base64 data URL such as data:application/pdf;base64,... or data:image/png;base64,.... files.getSignedUrl gives a download link for a file’s content, such as a batch job’s results. A batch job runs on Mistral after batch.create returns. Follow it with batch.get({ job_id }) until status is SUCCESS (read output_file with files.getSignedUrl), or FAILED, TIMEOUT_EXCEEDED or CANCELLED. QUEUED, RUNNING and CANCELLATION_REQUESTED mean it is still going. agents.* other than agents.complete are Mistral beta endpoints. A 422 from Mistral names each rejected field in the error message, for example body.messages.0.content: Field required. What you get:
  • 52 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the models this key can use
Ask a model a question
See the full list on the API page.

What’s next

API reference

Every mistralai.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.