Skip to content

Quickstart

Mixen API is an OpenAI-compatible gateway to models for text, images, video, music, speech and embeddings. You pay from your Mixen balance in roubles, with no OpenAI, Google or Anthropic account needed.

If you already have code written against the OpenAI SDK, exactly two lines change — they are highlighted in the example below.

Keys are issued in your account: mixen.ai/account/profile/api. The key is shown once, at creation — save it right away, only a hash is stored.

A key looks like mxn- followed by a random string.

The base URL is https://api.mixen.ai/v1.

from openai import OpenAI
client = OpenAI(
base_url="https://api.mixen.ai/v1",
api_key="mxn-...",
)
resp = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "Explain recursion in one paragraph"}],
)
print(resp.choices[0].message.content)
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.mixen.ai/v1',
apiKey: process.env.MIXEN_API_KEY,
})
const resp = await client.chat.completions.create({
model: 'gpt-5.6-luna',
messages: [{ role: 'user', content: 'Explain recursion in one paragraph' }],
})
console.log(resp.choices[0].message.content)
Terminal window
curl https://api.mixen.ai/v1/chat/completions \
-H "Authorization: Bearer $MIXEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"messages": [{"role": "user", "content": "Explain recursion in one paragraph"}]
}'

GET /v1/models returns the live catalog: identifiers, prices in roubles and dollars, and what each model can do. No key required for this call.

Terminal window
curl https://api.mixen.ai/v1/models | jq '.data[0]'
Endpoint Purpose
GET /models Model catalog with prices
POST /chat/completions Chat, streaming, vision, files, web search
POST /images/generations Image generation
POST /images/edits Edit an image from a reference
POST /videos · GET /videos/{id} · GET /videos/{id}/content Video (async job)
POST /videos/upscale Video upscaling
POST /audio/music · GET /audio/music/{id} · GET /audio/music/{id}/content Music (async job)
POST /audio/speech Text to speech
POST /audio/transcriptions Speech to text
POST /embeddings Text embeddings

For an interactive reference with a request form, see the API Reference.