Mistral API through an OpenAI-compatible gateway: Mistral Large, Codestral and Magistral cost tracking
Call Mistral AI models (Mistral Large, Codestral, Ministral, Magistral, Pixtral, Devstral) with the OpenAI SDK through one gateway, with per-feature cost attribution and budgets enforced before the call.
Mistral's API is OpenAI-compatible, so Cognocient AI forwards requests as sent, with your Mistral key, and reads token usage from Mistral's response to cost each call.
Model names that route to Mistral
| Prefix | Examples |
|---|---|
mistral- | mistral-large-latest, mistral-small-latest, mistral-medium-latest |
codestral-, devstral- | codestral-latest, devstral-medium-latest |
ministral- | ministral-8b-latest |
magistral- | magistral-medium-latest |
pixtral-, voxtral- | pixtral-large-latest, voxtral-small-latest |
open-mistral, open-mixtral | open-mistral-nemo, open-mixtral-8x22b |
Streaming (with a final usage chunk) and tool calling work unchanged.
Use Mistral as the cheap tier
Mistral's smaller models are a common Degrade target: when a feature's budget runs out, a Degrade budget (every plan) or a routing rule (Growth) can move it from a frontier model to mistral-small-latest without a deploy. Token Maxing (Growth) shows which features would lose nothing by moving.
Related articles
Supported Providers
OpenAI, Anthropic, Gemini, Mistral, Groq, Together, Azure, AWS Bedrock, Vertex AI, and custom OpenAI-compatible endpoints.
OpenAI
OpenAI SDK through the gateway: chat, Responses, embeddings, images, audio and batches with per-feature cost and budgets.
Anthropic (Claude)
Claude through the OpenAI SDK (translated) or the native Anthropic SDK (passthrough), with prompt-cache-aware cost.