MiroxAI API
Build apps with Mirox Tail r1 — our free flagship model — plus Mirox Luna 1.2, and image generation. Chat supports streaming and returns one reply per request. Authenticate with an API key from this page.
Tail r1 flagship
Free. 350k+ context. Best reasoning in Mirox.
Chat
Non-streaming replies or streamed tokens over SSE.
Images
Generate images from a text prompt.
Revocable keys
Create, rename, revoke or delete keys at any time.
Quick start
Create a key in API keys below, then send a chat request:
curl -X POST https://miroxai.org/v1/chat/completions \
-H "Authorization: Bearer mxk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mirox-tail-r1",
"message": "Hello! What can you do?"
}'
Authentication
Send your key in the Authorization header on every request:
Authorization: Bearer mxk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Key rules
- Keys start with
mxk_live_. A key shows its full value in this page, so keep a copy somewhere safe. - Free accounts can hold 2 active keys. Pro and Ultimate accounts can hold 10.
- A revoked key stops working right away. Deleting a key removes it from your list.
- Keep keys server-side. Anyone with a key can use your daily allowance.
Chat completions
Request body
| Field | Type | Description |
|---|---|---|
message | string | The user's message. Required unless you send attachments. |
model | string | mirox-tail-r1 (default) · mirox-luna-1.2. |
history | array | Optional earlier turns, each {"role": "user" | "assistant", "content": "..."}. Only the last 14 are used. |
stream | boolean | Set true to receive server-sent events. Default false. |
search | boolean | Force a web search for this message. |
Response (stream: false)
{
"reply": "Hello! I can answer questions, write and explain code, and search the web.",
"_ms": 812,
"provider": "MiroxAI (SurrRoute)",
"model": "mirox-tail-r1",
"search": null
}
When a search ran, search contains query, results (title, url, snippet) and overview.
Streaming (stream: true)
Each event is a line starting with data: followed by JSON. Read these fields:
| Event | Meaning |
|---|---|
{"search": {"query": "…"}} | A web search started. |
{"source": {"title": "…", "url": "…"}} | One search source found. |
{"search_done": true, "count": 5} | Search finished. |
{"p": "MiroxAI (SurrRoute)"} | The inference engine answering. |
{"d": "Hel"} | A piece of the reply. Append these in order. |
{"img": "data:image/…"} | A generated image, when the message asked for one. |
{"done": true} | The reply is complete. |
{"error": {"message": "…"}} | The request failed. Stop reading. |
data: {"p":"MiroxAI (SurrRoute)"}
data: {"d":"Hello"}
data: {"d":" there"}
data: {"d":"!"}
data: {"done":true}
stream to true and read the response body with fetch or any SSE client. Ignore the data: [DONE] line if you see it.Models
Two models are available through the API. Eclipse is only available in the web app.
| Model ID | Label | Tier | Best for |
|---|---|---|---|
mirox-tail-r1 |
Mirox Tail r1 Flagship | Free | Hard reasoning, long context (350k+), math, complex code, multi-step planning. The strongest model in Mirox. |
mirox-luna-1.2 | Mirox Luna 1.2 | Free | Fast, friendly answers for everyday tasks and quick code snippets. |
mirox-tail-r1. It is free, but slower than Luna.Requesting any other model with an API key returns 403.
Image generation
Send a prompt and get back an image as a data URL. The image is also saved to your image history.
{
"prompt": "A calm mountain lake at sunrise, soft colors"
}
Response
{
"ok": true,
"image": "data:image/png;base64,..."
}
Free accounts get 30 image generations per day. Paid plans get 200 (Pro) or 2000 (Ultimate). The daily count resets at midnight UTC.
Errors
| Status | Meaning |
|---|---|
400 | Missing or empty message or prompt. |
401 | Missing, malformed, unknown or revoked API key. |
403 | Model not available through the API. |
404 | Unknown model ID. |
429 | Daily limit reached for your plan. |
502 | The inference engine failed. Retry in a moment. |
Error bodies look like {"error": {"message": "…"}}.
API keys
Create and manage keys here. You need to be signed in to the main app, because keys belong to your account. Your keys are also saved in this browser, so if the server ever loses them, they will be restored automatically next time you visit this page.
Playground
Send a test request. Paste an API key, or leave the field blank to use your signed-in session. The key is sent only with this request and is never stored.
POST /v1/chat/completions
Limits
Limits reset daily at midnight UTC. The API accepts Mirox Tail r1 and Mirox Luna 1.2. Every chat counts toward your daily usage.
| Plan | Image generations / day | API keys | Models via API |
|---|---|---|---|
| Free | 30 | 2 | Tail r1, Luna 1.2 |
| Pro | 200 | 10 | Tail r1, Luna 1.2 |
| Ultimate | 2000 | 10 | Tail r1, Luna 1.2 |