Documentation

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.

v1 Bearer keys Free tier by OpenSurr

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

POST/v1/chat/completions

Request body

FieldTypeDescription
messagestringThe user's message. Required unless you send attachments.
modelstringmirox-tail-r1 (default) · mirox-luna-1.2.
historyarrayOptional earlier turns, each {"role": "user" | "assistant", "content": "..."}. Only the last 14 are used.
streambooleanSet true to receive server-sent events. Default false.
searchbooleanForce 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:

EventMeaning
{"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}
Set 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 IDLabelTierBest 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.2Mirox Luna 1.2FreeFast, friendly answers for everyday tasks and quick code snippets.
Tip: If you want the best possible answer to a hard problem, use mirox-tail-r1. It is free, but slower than Luna.

Requesting any other model with an API key returns 403.

Image generation

POST/v1/images/generations

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

StatusMeaning
400Missing or empty message or prompt.
401Missing, malformed, unknown or revoked API key.
403Model not available through the API.
404Unknown model ID.
429Daily limit reached for your plan.
502The 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.

Checking your sign-in…
Loading…

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.

PlanImage generations / dayAPI keysModels via API
Free302Tail r1, Luna 1.2
Pro20010Tail r1, Luna 1.2
Ultimate200010Tail r1, Luna 1.2
Plans are changed by an administrator. If your plan changes, the new limits apply to your existing keys straight away.