Authentication
Create a GM API key in the dashboard and send it using the convention expected by the API surface.
OpenAI-compatible requests
Section titled “OpenAI-compatible requests”Authorization: Bearer gm_live_…Anthropic Messages
Section titled “Anthropic Messages”x-api-key: gm_live_…anthropic-version: 2023-06-01The Anthropic SDK sets both headers when configured with api_key.
Gemini requests
Section titled “Gemini requests”Use a bearer header:
Authorization: Bearer gm_live_…Gemini-compatible requests also accept the native ?key=<gm-key> query
parameter. Prefer a header where your client supports it because URLs are more
likely to appear in logs and diagnostic tooling.
Authentication failures
Section titled “Authentication failures”A missing, malformed, revoked, or invalid key returns an authentication error. Do not retry an authentication error without changing the credentials.
See Create and protect an API key for storage and rotation guidance.