Mistral AI
Mistral models for chat, vision, PDF, embeddings, image, and code generation.
Overview
Mistral AI is a French AI company offering capable, efficient models across chat, vision, code, and embeddings, with several weights released under permissive open licenses.
Official Website: https://mistral.ai Documentation: https://docs.mistral.ai
Key features
- Chat — Strong general-purpose text generation with function calling
- Vision & PDF — Image and document understanding on supported models
- Code generation — Specialized coding models
- Embeddings — Text embeddings for search and retrieval
- Image generation — Create images from text
- JSON mode — Structured, schema-friendly outputs
- Multilingual — Strong European language support
Using Mistral with Yunxin
Address Mistral models with the mistral/<model> prefix in the model field. You use the same Yunxin base URL (https://api.yuhuanstudio.com/v1) and your sk- API key — there is no separate Mistral configuration on your side.
Capabilities vary by model. Query GET /v1/models to discover available models and what each one supports.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1"
)
response = client.chat.completions.create(
model="mistral/model-id",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.YUNXIN_API_KEY,
baseURL: "https://api.yuhuanstudio.com/v1",
});
const response = await client.chat.completions.create({
model: "mistral/model-id",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello!" },
],
});
console.log(response.choices[0].message.content);curl https://api.yuhuanstudio.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YUNXIN_API_KEY" \
-d '{
"model": "mistral/model-id",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'Available models
Query the Models API for the current list and per-model capabilities:
curl "https://api.yuhuanstudio.com/v1/models?provider=mistral" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are defined per model. Use GET /v1/models (and GET /v1/models/{model_id}) to discover the authoritative model list, supported features, and current rates.
Official resources
How is this guide?