🚀 One API for every frontier model on FastInfra

Browse models

Transparent per-token pricing → compare providers on FastInfra

View pricing

OpenAI-compatible chat completions → start in minutes

Read the docs

⚡ Server Auction → Enterprise bare metal from $78.15/mo (173 in stock)

Browse deals

Codestral Embed API pricing

Codestral Embed is a language model from Mistral. Call it as "codestral-embed" from any OpenAI SDK by changing the base URL and API key.

Prices synced December 1, 2026 · Model ID codestral-embed

Pricing

Codestral Embed API pricing per token

You pay for prompt tokens at the input rate and generated tokens at the output rate. No subscription, seat fee or minimum — credit never expires.

Rate Input / 1M tokens Output / 1M tokens Input / 1K tokens
Standard (real-time) — — —
Integration

How to call the Codestral Embed API

Works with the official OpenAI SDKs — change the base URL and API key only. One key covers every model on FastInfra.

Field Value
Model ID codestral-embed
Capability Embeddings
Base URL https://api.fastinfra.ai/v1
Primary endpoint POST https://api.fastinfra.ai/v1/embeddings
Auth Authorization: Bearer YOUR_API_KEY
OpenAI Chat SDK Yes — set base_url to the Base URL
Validate model id GET https://api.fastinfra.ai/v1/models/codestral-embed
Docs Integration reference

OpenAI-compatible embeddings endpoint.

Python

from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.fastinfra.ai/v1")

stream = client.chat.completions.create(
    model="codestral-embed",
    messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Node.js

import OpenAI from "openai";

const client = new OpenAI({ apiKey: process.env.FASTINFRA_API_KEY, baseURL: "https://api.fastinfra.ai/v1" });

const response = await client.chat.completions.create({
  model: "codestral-embed",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);

curl

curl https://api.fastinfra.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "codestral-embed",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Served over 1 independent route. Requests go to the lowest-cost healthy route and fail over automatically if one is unavailable. Live latency and uptime are on the status page.

Alternatives

Codestral Embed vs alternatives

Live FastInfra prices per 1M tokens. Every model uses the same API key, so switching is a one-line change.

ModelInputOutputContext
Codestral Embed (this page) — — —
BGE Base En V1.5 $0.0086 $0.0086 — Compare
FAQ

Codestral Embed API — frequently asked questions

How much does the Codestral Embed API cost?

On FastInfra, Codestral Embed (codestral-embed) costs Pay-per-token pricing via automatic routing. Billing is per token used from prepaid credit, with no subscription or minimum spend.

Is Codestral Embed compatible with the OpenAI SDK?

Yes. Point the OpenAI Python or Node SDK at https://api.fastinfra.ai/v1, use a FastInfra API key and set model to "codestral-embed". Chat completions, streaming use the same request shape.

Start using Codestral Embed today

Create an account, add credit from $5 and make your first Codestral Embed request in under five minutes. Compare every model on the pricing page.