Immersive Translate
Immersive Translate is a bilingual translation extension whose Translate mode can call any OpenAI-compatible endpoint. MirAPI implements the OpenAI Chat Completions API (POST /v1/chat/completions), so you can point Immersive Translate at MirAPI and use a cheap model such as deepseek-chat.
What you need
Section titled “What you need”| Element | Value |
|---|---|
| API URL | https://api.mirapi.ai/v1/chat/completions (the full endpoint) |
| API key | Your MirAPI key (sk-...) |
| Model | deepseek-chat, or any model name from GET /v1/models |
Configure
Section titled “Configure”- Create an API key in https://platform.mirapi.ai → API Keys and copy it.
- Open Settings → Translation Services → OpenAI (or Add a translation service → OpenAI).
- Expand More settings and enter the custom API URL:
API URL: https://api.mirapi.ai/v1/chat/completionsAPI key: sk-...Model: deepseek-chat- In the provider’s advanced options, lower the request frequency (requests per second). Page translation sends many parallel requests, and a low limit keeps you under your key’s rate limit.
Verify with a message
Section titled “Verify with a message”Open any web page and enable translation. The page should render in the target language within a few seconds. The first request draws a small amount from your prepaid balance; confirm it later in the Platform billing log or with GET /api/usage/token.
Billing
Section titled “Billing”- Translation requests are billed per token (input, output, and cache read, priced in USD per 1M tokens). Reasoning and thinking tokens count as output.
- Immersive Translate usage is charged to a prepaid balance with no subscription and no minimum, and the balance never expires.
- When the balance runs out, requests fail with 403; topping up restores the same key immediately.
- Reconcile usage in the Platform billing log,
GET /api/usage/token(account-level summary), orGET /api/log/token(per-request detail).
Troubleshooting
Section titled “Troubleshooting”- Enter the full endpoint URL. Immersive Translate calls the URL exactly as you enter it, so it must be
https://api.mirapi.ai/v1/chat/completions. A barehttps://api.mirapi.ai/v1returns 404. - Lower the concurrency limit. Translation sends many parallel requests. When you exceed the key’s rate limit, MirAPI returns 429 with no
Retry-Afterheader. Retry with jittered exponential backoff (1s → 2s → 4s, capped around 30s); the gateway does not retry for you. - 401 means the key is missing, invalid, or unknown. Check the API key field.
- 403 means the key is valid but the request was refused: balance exhausted, model not whitelisted, quota exceeded, or IP not allowed. Fix the cause and retry.
- Every error message ends with a request ID. Include it when you open a support ticket.