Skip to content

Models & pricing

The catalog at https://platform.mirapi.ai lists 200+ models from multiple vendors, and you call any of them through the same endpoints. For chat, you only change the model field. The catalog is also available as an API, so you can browse and filter it programmatically.

GET /v1/models returns every entry, and a Gemini-compatible list is available at /v1beta/models:

Terminal window
# OpenAI-compatible
curl https://api.mirapi.ai/v1/models \
-H "Authorization: Bearer $MIRAPI_API_KEY"
# Gemini-compatible
curl "https://api.mirapi.ai/v1beta/models" \
-H "x-goog-api-key: $MIRAPI_API_KEY"

The list accepts Authorization: Bearer (the scheme is case-insensitive, and a bare key without the scheme also works). On /v1/models you can use x-api-key instead; the Gemini variant accepts x-goog-api-key or a ?key= query parameter.

Each entry has the fields you need to choose a model:

Field What it tells you
id / name The exact name to send in requests
context_length Maximum context window, in tokens
pricing USD per 1M tokens: input / output / cache read
supported_parameters Which request features the model supports (tools, vision, reasoning, …)
output_modalities What the model can produce: text, image, video, audio, embeddings

Entries fall into three classes:

  • Available: MirAPI operates a channel today; the card shows real channel pricing and you can call it now.
  • Coming soon: released by the vendor within the last 3 months and listed with the vendor’s official pricing, but MirAPI has no channel for it yet. You can’t call it until it becomes available.
  • Not supported: released more than 3 months ago and not offered on MirAPI. Listed with the vendor’s official pricing for reference only; you can’t call it.

Start from what the task needs:

  1. Capabilities first: does it need tool calling, vision input, reasoning, or JSON output? Filter by those.
  2. Context window: long documents or large codebases need a larger window.
  3. Price: compare input/output per-1M-token prices; the model detail page shows the exact numbers.
  4. Send the exact id the catalog returns. Model names are passed through verbatim.

The Platform lets you filter by context size, capabilities, vendor, series, and output type, so you can narrow hundreds of models to a shortlist.

Call models by the name the catalog returns, for example deepseek-chat. That string is passed through verbatim.

The catalog also displays a browsing ID with a vendor/ prefix (for example deepseek/deepseek-chat). The prefix is only used for browsing and filtering in the Platform. It is not part of an API request. When in doubt, copy the exact name from the model card.

supported_parameters tells you which request features a model accepts. The common ones and what they enable:

Capability What it enables
Tool calling Send tools / tool_choice so the model can call your functions
Vision input Pass images via image_url (HTTP(S) URL or base64 data URI)
Reasoning Control effort with reasoning_effort; reasoning tokens are billed as output
Structured output Use response_format (json_schema or JSON mode) for guaranteed JSON
Prompt caching OpenAI-compatible models cache automatically; Anthropic uses cache_control
Web search The model must be marked as web-search capable in the catalog

output_modalities lists what the model returns (text, image, video, audio, or embeddings), so pick a model whose output matches your task.

For text and multimodal models, price is quoted per 1M tokens in three tiers:

Tier What it covers
Input Tokens in the request
Cache read Tokens served from the prompt cache, cheaper than fresh input. Enable it as described in Prompt caching
Output Generated tokens, including reasoning/thinking tokens

Image generation is billed per image and video generation per second of output. Catalog prices are in USD and are the authoritative source. This page explains how pricing works and does not list fixed numbers.

Billing runs on a prepaid USD balance that never expires, with no subscription and no minimum spend. When the balance runs out, requests return 403 and the same key works again immediately after you top up. See Billing for reconciling usage.

A model card may carry a discount badge (for example “up to X% off”). It compares MirAPI’s combined input+output price against the vendor’s official list price for the same model. The badge only compares price: the model and its output are identical.

Most available models are offered through several channels (different upstream sources). Every channel serves the same model; they differ in price and stability. The channel table on each model page lists every channel’s price and tags each channel cheap, balanced, or stable based on price. The catalog shows the cheapest channel’s price.

You choose the channel. When you create or edit a key under API Keys in the Platform, Channel selection lets you set, for each vendor with more than one channel:

  • Primary channel (required): requests for that vendor’s models go here.
  • Backup channel (optional): if the primary fails with a retryable error, the request switches to the backup automatically.

Vendors you haven’t configured use the system default channel. Each request is billed at the price of the channel that served it, and the Platform billing log records that channel; a failed attempt before the switch is not billed.

If both your primary and backup channels are down, the request fails with a 5xx. MirAPI never moves a request to a channel you didn’t choose, and never silently substitutes a different model. There is no model-level fallback.

A key can be restricted to a whitelist of models at creation time. A whitelisted key calling a model outside the list gets 403 even though the key itself is valid. Keys can also carry a validity period, a quota cap, and an IP allowlist (see Authentication).

Status Meaning What to do
401 Key missing, invalid, or unknown Check the key; see Authentication
403 Key valid but rejected (balance, whitelist, quota, or IP) Fix the cause; top up if the balance is empty
413 Payload too large Reduce the request size
429 Rate limited (no Retry-After header) Retry with jittered exponential backoff (1s → 2s → 4s, capped ~30s)
5xx Upstream or channel failure Retry idempotent requests; attach the request ID from the error to any ticket

Every error message ends with a request ID; include it when you open a support ticket. Full error envelopes are in Errors.