FAQ
Answers to the questions that come up most often when connecting to the Mixen API. If yours is not here, see Errors, limits, billing or the API reference.
Getting started
Section titled “Getting started”How is Mixen different from the OpenAI API?
Not at the protocol level: the request and response format, including the error envelope, mirrors OpenAI — the official SDKs work once you swap base_url and the key. The differences are around it: one key covers text, images, video, music, speech and embeddings, and you pay in roubles from a single balance. See the Quickstart.
Do I need a separate key for every app?
No separate account: all keys belong to one account and draw on one balance. The practical pattern is one key per app and environment, with restricted scopes — revoking or leaking one key then leaves the others untouched. The rate limit is per key, so several keys also buy more concurrency. Details in Keys & authentication.
Does the API work without a VPN or foreign accounts?
Yes. Access from Russia is direct, and no OpenAI, Google or Anthropic account is needed: you issue the key in your Mixen account and pay in roubles.
How are requests routed, and can my key stop working?
Only through official APIs, on vendor pricing and terms. We do not use pooled ChatGPT or Claude consumer subscriptions: OpenAI and Anthropic prohibit them in third-party services (Anthropic has blocked them technically since April 2026) and cut them off in waves — taking every key built on them down too. A Mixen key works as long as your balance is positive; when a provider fails, the request goes to a fallback upstream, see Provider routing.
Models and requests
Section titled “Models and requests”How do I name a model?
Any of three ways: the full id from the catalog (openai/gpt-5.6-luna), the short suffix (gpt-5.6-luna), or a familiar foreign alias (gpt-4o, claude-opus, dall-e-3, sora-2, whisper-1, tts-1). An alias maps to a comparable Mixen model. Details in Models & pricing.
Why does a request return 404 model_not_found?
There is no model by that name: a typo, or the model has been removed from the catalog. Aliases resolve against the live catalog — if the target model is inactive, the alias stops working too. The source of truth is GET /v1/models.
How many requests per minute can I make?
60 per key over a fixed 60-second window: the counter resets once a minute. Exceeding it returns 429 with retry-after and x-ratelimit-limit-requests headers; the official SDKs back off on their own. The limit is per key, not per account. Details in Errors, limits, billing.
Why did the answer stop mid-sentence?
That is finish_reason: "length": the generation hit the max_tokens ceiling (its synonym is max_completion_tokens). A common reason for a ceiling that is too low is enabled reasoning, which spends the same budget. Raise the limit, or disable reasoning if the model allows it. Details in Chat & streaming.
Context and cache
Section titled “Context and cache”Can I send an image or a file in a request?
Yes. Models with vision take an image as a data: URL in the last user message; models with file take up to 5 files per request (PDF, DOCX, TXT, CSV, XLSX, PPTX), with up to 150,000 characters extracted from each. A model without the capability returns 400 — check the flags in the catalog first. Details in Chat & streaming.
How do I save on repeated context?
Cache the repeated prefix. In /v1/chat/completions and /v1/responses the cache kicks in automatically; in /v1/messages the client sets cache_control breakpoints — Claude Code and the Anthropic SDK do it on their own. The cache lives 5 minutes with sliding renewal, and repeated context costs about 10% of the input price. Details in Context caching.
Streaming and tools
Section titled “Streaming and tools”Does streaming work?
Yes, in all three chat protocols: /v1/chat/completions, /v1/messages and /v1/responses. The answer arrives over SSE and ends with data: [DONE]; with stream_options: {"include_usage": true} a chunk with the token spend arrives just before it.
Is function calling supported?
Yes. tools and tool_choice in the OpenAI format are passed to the model as is, and role: "tool" messages with call results are accepted on input — so an agent loop needs no client rewrite.
How do I control the model’s reasoning?
In /chat/completions and /responses, with reasoning_effort (from off to max); in /v1/messages, via thinking.budget_tokens. Valid values arrive in capabilities.reasoning_efforts, and whether it can be turned off in can_disable_reasoning. The reasoning budget spends max_tokens. Details in Chat & streaming.
Billing
Section titled “Billing”When am I charged?
On completion: the charge is computed from the usage tokens of the response. A failed generation is not billed, and if a stream breaks before the final usage chunk arrives, the charge is skipped. Details in Tokens and billing and Errors, limits, billing.
What does cached_tokens show?
How many input tokens came from the context cache. The discount is already applied to the charge, and prompt_tokens includes the cached part per OpenAI semantics — the field is there to show the saving, not to recompute the price. Details in Context caching.
Where do I see request history and spend?
In your account, under History — mixen.ai/account/history: model, status, tokens and the charge in roubles and dollars per request, with payment history on a separate tab.