Authentication

Where to get your Base URL and how each protocol authenticates — Bearer, x-api-key, x-goog-api-key.

Every call needs two things: an API key (proves who you are) and the Base URL (where the request goes). Both are available in the console.

Getting the Base URL

Sign in to the console and open the "Quick start" dialog on any model card (or from the account overview). Pick your protocol in the dropdown and copy the matching Base URL.

  • Path prefixes differ between protocols — always copy from the dialog;
  • Examples in the docs write https://<your-base-url>; replace it with your actual address.

Authentication per protocol

ProtocolAuth headersNotes
OpenAI-compatibleAuthorization: Bearer YOUR_API_KEYWorks with the official OpenAI SDK — set api_key + base_url
Anthropicx-api-key: YOUR_API_KEY + anthropic-version: 2023-06-01The version header is required; the SDK sends it automatically
Geminix-goog-api-key: YOUR_API_KEYThe model ID goes directly into the URL path

Common auth errors

  • 401 Unauthorized: the key is wrong, deleted, or expired. Check you are using the full key saved at creation, with no stray spaces or newlines.
  • Key exposed in frontend code: anything in browser code is visible to everyone — keys belong on your server or in local environment variables.
  • Mixed-up keys: each key has its own spending limit; make sure you are using the right key for the environment (production / testing).

For key creation and safekeeping, see Create an API key.