DzRouter

Codestral

Tool use

Mistral's specialized model for code generation. Optimized for coding tasks including code completion, generation, and explanation.

Model id — paste this in your code
mistralai/codestral

Pricing · per 1M tokens

Show prices in
Input90 DA$0.36
Output270 DA$1.08
Cached input90 DA$0.36
Context window128KMax output: 32K

Capabilities

  • Tool use — Can call your functions / tools

Estimate your cost

Estimated cost

Use this model

Create an account, top up in dinars and call it with your key:

from openai import OpenAI

client = OpenAI(
    base_url="https://dzrouter.com/v1",
    api_key="sk-dz-…",
)

reply = client.chat.completions.create(
    model="mistralai/codestral",
    messages=[{"role": "user", "content": "Salam!"}],
)
print(reply.choices[0].message.content)
Create a free account

Start building with AI today

Create your account, top up from 500 DA and send your first request in minutes.

Create a free account