@cf/mistralai/mistral-small-3.1-24b-instruct — Free API

⭐ Score: 45
cloudflare-workers-ai/cf-mistralai-mistral-small-3-1-24b-instruct
chat

What is @cf/mistralai/mistral-small-3.1-24b-instruct?

Mistral Small 3.1 (24B) is Mistral AI's latest mid-size model, hosted on Cloudflare's global edge network for low-latency inference. With 128K context, strong multilingual performance, and the efficiency of a 24B-parameter architecture, it is a practical choice for general chat, content generation, and text analysis where you want better quality than 8B-class models without the cost of 70B+ alternatives. Runs on Cloudflare's shared 10,000 Neurons/day free pool and uses Cloudflare's native API format rather than the OpenAI SDK. Best for developers already in the Cloudflare ecosystem or those evaluating Mistral's small-model performance.

Model ID
cf-mistralai-mistral-small-3-1-24b-instruct
Base URL
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run

@cf/mistralai/mistral-small-3.1-24b-instruct API Code Example

Paste your API key and run. See the config generator for Claude Code, Cursor, and more tools.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="cf-mistralai-mistral-small-3-1-24b-instruct",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  model: "cf-mistralai-mistral-small-3-1-24b-instruct",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "cf-mistralai-mistral-small-3-1-24b-instruct",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Other Free Models from Cloudflare Workers AI

More About Cloudflare Workers AI

How to get an API key, rate limits, platform limitations, and tool configuration — everything you need to set up Cloudflare Workers AI as a free LLM API backend.

View Cloudflare Workers AI full guide →