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 with 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://console.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 console billing log or with GET /api/usage/token.
Billing
Section titled “Billing”- Translation requests are billed per token (input / output / cache read, per 1M tokens USD). Reasoning and thinking tokens count as output.
- Immersive Translate draws from a prepaid balance: no subscription, 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 console billing log,
GET /api/usage/token(account-level totals), orGET /api/log/token(per-request detail).
Troubleshooting
Section titled “Troubleshooting”- Enter the full endpoint URL — Immersive Translate calls the URL you enter as-is, so it must be
https://api.mirapi.ai/v1/chat/completions; a barehttps://api.mirapi.ai/v1returns 404. - Lower the concurrency limit — translation fires many parallel requests. When you exceed the key’s rate limit MirAPI answers 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.