We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Mistral: Codestral 2508 (batch)

mistralai/codestral-2508:batch
TextInput: text · fileTools256KAdded Aug 1, 2025

Try Mistral: Codestral 2508 (batch) now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

Mistral: Codestral 2508 (batch) at a glance

  • Input price is 67% lower than the median of 434 Text models.
  • Context window of 256,000 tokens, enough for long documents and multi-turn conversations.
  • Supports tool (function) calling for agents and integrations.
  • Supports structured JSON output with a schema.
  • A typical request (1,000 input / 500 output tokens) costs about $0.00131.

About Mistral: Codestral 2508 (batch)

Mistral: Codestral 2508 (batch) is a text model from Mistral, released by the provider on 1 August 2025. It is Mistral's language model for coding, and it is built around low-latency, high-frequency tasks rather than general conversation. On api14 it is listed under the text category, and the model id you call is mistralai/codestral-2508:batch.

The model accepts text and file inputs and returns text. Its context window is 256,000 tokens, with a maximum output of 204,800 tokens. It has a knowledge cutoff of 31 March 2025. Mistral describes its focus as fill-in-the-middle (FIM), code correction and test generation, so the file input is useful when you want the model to work against source you supply rather than code you paste inline.

Those capabilities point to a fairly specific set of jobs. Fill-in-the-middle makes it a good fit for editor integrations that complete code in the middle of a function or block. Code correction suits linting, review assistance, or fixing model-generated code before it ships. Test generation fits pipelines that need unit tests written alongside implementation. Because the context window is large, you can pass whole files or sizable repositories alongside your prompt. All of these are batch-oriented coding tasks rather than open-ended chat.

To call it, use the model id mistralai/codestral-2508:batch against api14's OpenAI-compatible API, which means your existing OpenAI SDK setup works with a changed base URL and key. The model supports frequency_penalty, max_tokens, prediction, presence_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools and top_p. Tools and tool_choice let you wire it into function calling; response_format and structured_outputs help when downstream code needs a fixed shape; seed makes runs repeatable; prediction is available for speculative decoding style workflows. Note that api14 does not list image or audio input for this model, and the output is text only. If your task is general prose, image understanding, or speech rather than code, another model in the catalog is likely the better choice.

How to call the Mistral: Codestral 2508 (batch) API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "mistralai/codestral-2508:batch".
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.chat.completions.create({
  "model": "mistralai/codestral-2508:batch",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltymax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_p

Specifications

Context length
256,000
Max output
204,800
Input
text, file
Output
text
Knowledge cutoff
2025-03-31

Requests on api14 · last 7 days

10-1710-1810-1910-2010-2110-2210-23

Mistral: Codestral 2508 (batch): frequently asked questions

How much does the Mistral: Codestral 2508 (batch) API cost?
Mistral: Codestral 2508 (batch) costs Input $0.52 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
What is the context window of Mistral: Codestral 2508 (batch)?
Mistral: Codestral 2508 (batch) reads up to 256,000 tokens per request: prompt, history and documents together. It writes up to 204,800 output tokens per response.
What can Mistral: Codestral 2508 (batch) do?
Mistral: Codestral 2508 (batch) accepts text, file and returns text. It supports tool calling, structured JSON output.
How do I call Mistral: Codestral 2508 (batch) from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "mistralai/codestral-2508:batch". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Mistral: Codestral 2508 (batch)?
Comparable Text models at a similar price: Google: Gemma 4 31B, Anthropic: Claude Haiku 5.5, OpenAI: GPT-6 Luna Pro. Each runs through the same API key, so switching is one string.

Mistral: Codestral 2508 (batch) community

New topic

This community has no topics yet. Open the first one about Mistral: Codestral 2508 (batch).