Skip to content

BYOK

Bring your own AI key

BYOK lets you plug your own API key from any supported AI provider into SwiftIn. Requests go directly from your browser to the provider — they never touch SwiftIn's servers, and they don't consume your plan's AI-token quota. Useful when you already pay a provider, need a model SwiftIn doesn't pool, or want to keep all routing on your own keys.

Two ways to run an AI engine

Every AI brand in the engine list has two modes. Pick per-brand inside Translation Models settings.

SwiftIn mode (pooled)

Requests go through swiftin.dev backend using SwiftIn's pooled provider keys. Sign-in required. Your plan's AI-token quota is debited. Available for Gemini, DeepSeek and Grok (the brands the backend has wired). Default mode for those three brands until you flip the toggle.

My API key mode (BYOK)

Browser calls the provider directly with the key you saved. SwiftIn's servers are not in the request path — no logging, no quota. The provider bills you. Available for all seven AI brands listed below.

Supported providers

Seven AI brands accept your own key today. Three of them (Gemini, DeepSeek, Grok) also work in SwiftIn pooled mode; the remaining four are BYOK-only.

Google Gemini

SwiftIn + My key

Fast multimodal models, native to 100+ languages. Five models in the picker (Gemini 3 Flash preview, 3.1 Flash-Lite preview, 2.5 Flash-Lite, 2.5 Flash, 2.5 Pro).

Get a key

DeepSeek

SwiftIn + My key

Cost-effective Chinese LLM, strong on code and math. Picker: V4-Flash and V4-Pro.

Get a key

xAI Grok

SwiftIn + My key

Fast inference, X-aware context. Picker: Grok 4.1 Fast (non-reasoning) and reasoning variant.

Get a key

OpenAI

My key only

GPT-5 mini/nano, GPT-4.1 family and GPT-4o mini. GPT-5 family is temperature-locked to 1 per OpenAI's API constraint — SwiftIn enforces this client-side.

Get a key

Anthropic Claude

My key only

Long context and document-aware translation. Picker: Claude Haiku 4.5, Sonnet 4.6, Opus 4.7 and Haiku 3 legacy.

Get a key

GLM (Zhipu)

My key only

Strong on Chinese and multilingual translation. Five models from GLM-4-Flash to GLM-4.7.

Get a key

OpenRouter

My key only

Aggregator — 300+ models behind one key. SwiftIn curates a starter dropdown (Claude, GPT, Gemini, DeepSeek, Grok, Qwen, Mistral); type any OpenRouter model id to use the rest.

Get a key

How a BYOK request flows

No SwiftIn backend in the request path. Three steps from your click to the provider's response.

Your key sits on your device

Saved in browser.storage.local under swiftin_engine_keys. Local means device-only — no sync to other browsers, no replication through your vendor account.

Extension builds the request

Picks the endpoint and auth header for the brand you chose, packs paragraphs into a JSON-array body, applies the model temperature and chunking caps from your settings.

Browser calls the provider directly

fetch() runs from the extension to the provider's endpoint with a 60-second timeout. The response is parsed and shown on the page. SwiftIn never sees the key, the prompt, or the response.

Setup, step by step

About a minute per provider. You can configure as many providers as you like — the extension remembers each one independently.

  1. 1

    Open Translation Models

    Click the SwiftIn toolbar icon → gear icon → Translation Models tab. Every supported brand shows up as a card.

  2. 2

    Pick a provider card

    Expand the brand you want. Three brands offer a SwiftIn / My API key toggle; the other four are My key only.

  3. 3

    Switch to My API key

    For Gemini, DeepSeek or Grok flip the mode toggle. For OpenAI, Claude, GLM or OpenRouter the card opens directly in Custom mode.

  4. 4

    Paste the key and pick a model

    Use the Get a key link to open the provider's console. Pick a model from the dropdown, or tick Enter the model name to type a model id the dropdown doesn't list.

  5. 5

    (Optional) Test the key

    Hit Test key — the extension sends one tiny request to the provider. A green OK badge means the key works; a red badge surfaces the provider's exact error so you can fix it.

Advanced settings

Each provider card has an Advanced section. Defaults are good for translation; tweak only if you have a reason.

Custom endpoint URL

Override the default provider host. Useful for corporate proxies, private mirrors, or self-hosted OpenAI-compatible gateways. Clearing the field falls back to the brand's built-in endpoint.

Temperature

Sampling temperature for the model. SwiftIn clamps it to each model's supported range — GPT-5 family stays locked to 1, Claude caps at 1, Gemini and DeepSeek accept up to 2.

Chunking caps

Max characters and max paragraphs packed into one upstream call. Higher = fewer requests but slower per call; lower = more parallelism. Defaults: 1500 chars, 3 paragraphs.

Max requests per second

Soft client-side cap on how fast the extension fires the next chunk in a batch. Tune down if your provider's rate limit is tight; default 25.

Where your key lives

BYOK key storage is intentionally narrow — the key stays on your device, never on SwiftIn's servers, and never on the cross-browser sync channel.

Device-local only

API keys live in browser.storage.local under the key swiftin_engine_keys. Local storage is per-device and never replicates through Chrome Sync or Firefox Sync.

Never sent to SwiftIn

The key is read only at request time by the extension's background worker and embedded into the Authorization header (or x-api-key / x-goog-api-key, depending on the provider). It never travels to swiftin.dev.

Remove anytime

Clear the API Key field in the provider card, reset the whole entry, or uninstall the extension — the local storage area is wiped. No SwiftIn-side delete request needed.

No SwiftIn quota debit

Custom-mode requests do not touch your plan's AI-token wallet. Whatever you spend is billed by the provider you chose, on their terms.

Reading the key-health badge

After every BYOK request the extension stores the outcome and shows a badge under the provider card. Each code maps to a fix.

AUTH

Invalid key

The provider rejected the credentials. Re-check that the key is active and pasted in full. xAI Grok and Anthropic occasionally return HTTP 400 for bad keys — SwiftIn classifies that as AUTH too.

CONFIG

Not configured

Key, model or endpoint missing. Open the provider card and fill the blank field.

PROVIDER_QUOTA

Provider credits empty

The provider returned HTTP 402 or a quota-style message. Top up your wallet at the provider, not at SwiftIn — Custom mode does not touch your SwiftIn plan.

RATE_LIMIT

Rate limit

HTTP 429 from the provider. Lower Max requests per second in Advanced, or wait a moment and retry.

SERVER

Server error

HTTP 5xx from the provider. Usually transient; retry, or pick a different provider for the moment.

NETWORK

Network

No response — DNS, offline, or a 60-second timeout from a slow provider. Check connectivity and retry.

TRUNCATED

Truncated

Provider hit a max-tokens cap before finishing. Lower Max paragraphs per request so each batch is smaller.

EMPTY

Empty response

Provider returned no content. Usually transient; retry once, then try a different model.

MALFORMED

Bad format

Output did not parse as the expected JSON array. Common when a small model ignores the JSON instruction — pick a larger model.

REFUSED

Content refused

Provider safety filter blocked the input. Different providers have different thresholds — switching brand usually unblocks.

CHAIN_EXHAUSTED

AI providers down

Only fires in SwiftIn pooled mode when every backend provider failed. In Custom mode each provider stands alone and surfaces its own error code instead.

Plan availability

BYOK is open to every plan including Free and guest browsers — there is no SwiftIn-side gate on Custom mode. Your provider's plan, billing and rate limits apply directly to you. SwiftIn does not see those requests and does not bill for them.

AI engines & cascadeText-to-Speech