Authentication and API keys
Sign in, create and protect keys, and understand key limits.
Create and copy an API key
If key editing is unavailable, use an existing active key or contact support. Creating a key does not add account balance. The rolling 5-hour, 1-day and 7-day limits are spend limits in USD, not requests per minute.
- Sign in to the console with your account email and password. Complete the authenticator challenge if your account requires it.
- Open API Keys and choose Create API key. Give the key a name you will recognize in Usage.
- Choose an available group if you need a specific model route. Otherwise keep the default assignment.
- Set a USD quota and optional expiry or IP restrictions, then create the key. A blank or zero quota means unlimited key spend, subject to your account limits.
- Use Copy API key to copy the complete value. You can also reveal an existing key. Store it in a server-side environment variable.
Manage a key
- Use the usage bar to compare billed key spend with its quota. An unlimited key has no percentage bar.
- Open the three-dot menu for Edit, Enable or Disable, and Delete. Opening the menu does not change the key.
- Disable a key to stop future requests without deleting its record. Delete requires confirmation and stops that credential from working.
- Reveal or copy an existing key when needed. If it is exposed, replace it in your application and revoke the old key.
Set your key and choose a model
Replace the key placeholder with the complete key you copied. Choose an exact model ID available to that key; the public catalog is a reference and does not establish account access. These variables last for the current terminal session.
Troubleshooting
For support, include the time, model, request ID if supplied, and error status. Never send your API key, session cookie, or password. Error details vary by endpoint; use the returned status and message rather than assuming one universal error shape.
- Authentication failed: copy the complete key again, remove extra whitespace, and check its active status and expiry. Custom keys do not necessarily begin with sk-.
- Model unavailable or access denied: verify the selected key’s group and available model list. Check IP restrictions and provider route availability.
- Quota or balance exhausted: inspect the key’s quota and rolling USD limits, then the account balance or subscription usage. Changing a key quota does not fund the account.
- Request URL not found: use /v1 as the SDK base URL, and /v1/chat/completions for a direct Chat Completions request. Use the protocol supported by your chosen model.
- Rate-limited or temporarily unavailable: wait before trying again and check service status. Avoid repeatedly resending a request that may already have been processed.
- Stream stopped: keep the partial answer and check Usage. Start another request only when you want to retry.
- Playground with an IP-restricted key: the gateway sees the console server’s connection. A key that works from your application may not permit that connection. Keep the restriction unless you intend to change it.