Skip to content

Cherry Studio

Cherry Studio is a free, open-source desktop chat client for Windows, macOS, and Linux. Each provider in Cherry Studio has a type, and every provider type can point at MirAPI. An OpenAI-type provider is the main path; use the Anthropic or Gemini type when you need that protocol’s semantics.

Element Value
Base URL (OpenAI) https://api.mirapi.ai/v1
Base URL (Anthropic) https://api.mirapi.ai
Base URL (Gemini) https://api.mirapi.ai/v1beta
API key Your MirAPI key (sk-...)
Model deepseek-chat (from GET /v1/models)

The same key works across all three provider types and every assistant in the app.

  1. Open Settings → Model Services → Add.
  2. Choose the OpenAI provider type.
  3. Fill in:
Provider name: MirAPI
API base URL: https://api.mirapi.ai/v1
API key: sk-...
  1. Add a model. In the provider’s model list, click Manage / Add model and enter the exact ID from the catalog:
deepseek-chat
  1. Save and enable the provider.

Cherry Studio sends the key as Authorization: Bearer. MirAPI treats the scheme as case-insensitive and also accepts a bare key without it. Cherry Studio appends /chat/completions to the base URL, which is why the address must include /v1.

Start a new assistant using the MirAPI provider and send:

Reply with exactly: connected to MirAPI

Expect the exact phrase in the reply. If the call fails, keep the error message Cherry Studio shows. It ends with the MirAPI request ID, which support needs.

Cherry Studio also ships Anthropic and Gemini provider types, and both work with MirAPI’s matching endpoints. Pick one when you want that protocol’s own features, for example Anthropic’s cache_control prompt caching.

Element Value
Base URL https://api.mirapi.ai (no /v1)
API key Your MirAPI key (sk-...), sent as x-api-key

The Anthropic type calls /v1/messages. Enter the bare base URL without /v1, because the client appends /v1/messages itself. MirAPI accepts the key as either x-api-key or Authorization: Bearer.

Element Value
Base URL https://api.mirapi.ai/v1beta
API key Your MirAPI key (sk-...), sent as x-goog-api-key

The Gemini type calls generateContent on /v1beta/models/{model}:generateContent. MirAPI accepts x-goog-api-key or a ?key= query parameter; the bare https://api.mirapi.ai is also accepted as a base URL.

  • Chat is billed per token: USD per 1M tokens, with separate input, output, and cache-read tiers. Reasoning tokens are billed as output, and cache reads cost less than plain input.
  • MirAPI uses a prepaid USD balance with no subscription and no minimum, and the balance never expires.
  • When the balance runs out, calls return 403. Top up and the same key works again immediately.
  • Reconcile spend in the Platform billing log, with GET /api/usage/token for the account summary and GET /api/log/token for per-request detail.
  • 401: the key is missing, malformed, or unknown. Check it and retry.
  • 403: the key is valid but the request was rejected because the model is not in the key’s whitelist, the balance is exhausted, the quota is reached, or the caller’s IP is not allowlisted. Fix the cause and retry.
  • 429: rate limited. MirAPI sends no Retry-After header, so back off with jitter (1s → 2s → 4s, capped around 30s).
  • 500: an upstream failure. Idempotent requests are safe to retry. MirAPI never silently swaps in another model, so the retry stays on the model you chose.
  • Add models by their exact GET /v1/models ID. A typo returns an error; MirAPI does not fall back to another model.