Skip to content

How to use your own OpenAI key (BYOK)

BYOK (“bring your own key”) routes Marriska’s AI work — translation, step parsing, visual regression — through your own OpenAI account. The provider bills you directly for the tokens instead of us.

For the why behind BYOK (price, latency, audit), see the BYOK concept.

Per-user keys live at Settings → AI Providers.

  1. Open Settings → AI Providers and find OpenAI in the provider list.

  2. Click “Add key” and paste your OpenAI key (starts with sk-). Grab one from platform.openai.com → API keys if you don’t have one.

  3. Test connection to confirm the key works — Marriska runs a quick liveness probe without saving anything yet.

  4. Save. From now on, AI calls that use OpenAI run against your key. Keys are encrypted at rest (Fernet) and decrypted only in memory at call time; we never log the full key.

The same page connects Gemini, Groq, and Anthropic keys the same way. Routing is per-provider, so each task uses your key when one is set for the provider that task is configured to use, and falls back to the platform key otherwise.

If you run the backend yourself, the platform-level OpenAI key is the OPENAI_API_KEY environment variable — set it in your .env:

Terminal window
OPENAI_API_KEY=sk-...
PARSING_PROVIDER=openai
PARSING_MODEL=gpt-4o-mini
TRANSLATION_PROVIDER=openai
TRANSLATION_MODEL=gpt-4o-mini
VISUAL_COMPARISON_PROVIDER=openai
VISUAL_COMPARISON_MODEL=gpt-4o-mini

Restart the backend after editing. Provider and model defaults live in backend/app/config/settings.py. On a self-hosted install, this is your own OpenAI key — there’s nothing else to connect.

Provider and model per task (translation, parsing, visual regression) are set in the super-admin panel: Admin → LLM config. It shows which provider keys are configured and lets a super-admin reassign provider + model per task at runtime — the choice is stored in the database and hot-reloads across workers within ~30s, no redeploy. This is deploy-wide platform config, separate from the per-user AI Keys above.