Skip to main content
By default, Coral provides system-managed API keys so you can start chatting immediately. If you prefer to use your own credentials, Coral supports Bring Your Own Key (BYOK) with several providers, including a Codex OAuth option for ChatGPT subscribers.

Supported providers

ProviderAuth methodWhat you need
AnthropicAPI keyAn Anthropic API key from console.anthropic.com
OpenAIAPI keyAn OpenAI API key from platform.openai.com
OpenAI (Codex)OAuth sign-inA ChatGPT Plus, Pro, or Team subscription
GoogleAPI keyA Gemini API key from aistudio.google.com
OpenRouterAPI keyAn OpenRouter API key from openrouter.ai

Setting up BYOK

During onboarding

  1. On the setup wizard, select “Bring your own key”.
  2. Choose your provider.
  3. Enter your API key, or click “Sign in with Codex” for the OAuth flow.
  4. Complete the rest of the wizard and launch your sandbox.

After onboarding

  1. Go to Settings > API Keys.
  2. Select a provider and enter your key (or use Codex OAuth).
  3. Click Save. The change takes effect immediately.

Codex OAuth (ChatGPT sign-in)

If you have a ChatGPT Plus, Pro, or Team subscription, you can sign in with your OpenAI account instead of providing an API key. This uses the same authentication that the Codex CLI uses. How it works:
  1. Click “Sign in with Codex” in the provider setup.
  2. A popup opens to OpenAI’s login page.
  3. Authorize Coral to use your ChatGPT subscription.
  4. Copy the callback URL from your browser’s address bar and paste it back into Coral.
  5. Coral exchanges the authorization code for access tokens using PKCE (Proof Key for Code Exchange).
Once connected, your assistant uses models available through your ChatGPT subscription (e.g., GPT-5.2 Codex, GPT-5.3 Codex) and requests are billed through your OpenAI subscription — not Coral credits.
Codex OAuth tokens refresh automatically. You don’t need to re-authenticate unless you revoke access from your OpenAI account.

Coral fallback

When using BYOK or Codex, you can enable Coral fallback — an automatic safety net that kicks in when your own API key fails (rate limits, quota exceeded, or provider errors). How it works:
  • Toggle “Enable Coral fallback” in Settings > API Keys after saving your credentials.
  • When your primary key works, requests go directly to your provider at no Coral credit cost.
  • When your primary key fails, the request automatically retries using Coral’s system-managed keys.
  • Only fallback requests consume Coral credits. Successful BYOK requests are free from Coral’s perspective.
Coral fallback requires an active Coral subscription with remaining credits. If your credits are exhausted, fallback requests will also fail.

How BYOK affects billing

  • BYOK requests — Billed by your AI provider directly. No Coral credits consumed.
  • Fallback requests — Billed against your Coral credit balance (same rates as system-managed keys).
  • Coral-managed keys (default) — All requests consume Coral credits.
See Billing & Credits for credit rates by model tier.