Mixtral-8x7B-Instruct-v0.1 — Free API

⭐ Score: 45
hugging-face/mixtral-8x7b-instruct-v0-1
chat

What is Mixtral-8x7B-Instruct-v0.1?

Mixtral 8x7B is Mistral AI's original MoE model, available free on Hugging Face's Serverless Inference API. With 8 experts routing to 2 active at any time, it delivers performance competitive with much larger dense models while keeping inference efficient. The 32K context window is its main limitation — adequate for conversations and short documents but not large-file analysis. Uses Hugging Face's native API format rather than the OpenAI SDK. Approximately 1,000 requests per day on the free tier; registration required.

Model ID
mixtral-8x7b-instruct-v0-1
Base URL
https://router.huggingface.co/v1

Mixtral-8x7B-Instruct-v0.1 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://router.huggingface.co/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="mixtral-8x7b-instruct-v0-1",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://router.huggingface.co/v1",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  model: "mixtral-8x7b-instruct-v0-1",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://router.huggingface.co/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "mixtral-8x7b-instruct-v0-1",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Other Free Models from Hugging Face

More About Hugging Face

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

View Hugging Face full guide →