Mistral AI logo
Mistral AI

Ministral 8B

Mistral AI's edge-optimized medium model with 8B parameters, vision capabilities and sliding window attention

Category Text Model ID ministral-8b-latest
Context Length128K tokens
Model Size8B Parameters
LicenseApache 2.0

Pricing & Specs

๐Ÿ’ฐ Pricing

Input$0.15 / M tokens
Output$0.15 / M tokens

โš™๏ธ Specs

Context Length128K tokens
Model Size8B Parameters
LicenseApache 2.0
Special CapabilitiesVision ยท Sliding Window Attention ยท Edge Deployment

API Examples

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.xairouter.com/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="ministral-8b-latest",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

cURL

curl https://api.xairouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "ministral-8b-latest",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'