MistralBalanced

Codestral

Specialized code model from Mistral supporting 80+ programming languages. Optimized for code completion, generation, and explanation.

4.3(9,800 ratings)

Quick Overview

CategoryCode
Context Window32K tokens
SpeedFast
Input$0.30 / 1M tokens
Output$0.90 / 1M tokens

Pricing

Simple, transparent token-based pricing. Pay only for what you use.

Input Tokens
$0.30
per 1M tokens
Output Tokens
$0.90
per 1M tokens

Capabilities

Core strengths and supported features of Codestral.

Code Generation
Code Completion
Debugging

Performance

Context window capacity and inference speed characteristics.

Context Window

32K

Compact context window optimized for focused tasks, quick interactions, and high-throughput applications.

Speed: Fast

Optimized for low-latency responses. Ideal for real-time applications, chatbots, and interactive experiences where response time is critical.

Quick Start

Get started with Codestral in just a few lines of code.

import OriginalPoint from "originalpoint";

const client = new OriginalPoint({
  apiKey: process.env.ORIGINALPOINT_API_KEY,
});

const response = await client.chat.completions.create({
  model: "codestral",
  messages: [
    {
      role: "user",
      content: "Hello, how can you help me today?",
    },
  ],
  max_tokens: 1024,
});

console.log(response.choices[0].message.content);