Standard Authentication
Standard authentication applies to core/v1/* endpoints, including:
GET /v1/modelsGET /v1/models/{model}POST /v1/chat/completionsPOST /v1/completionsPOST /v1/responsesPOST /v1/responses/compactPOST /v1/embeddingsPOST /v1/images/generationsPOST /v1/images/editsPOST /v1/audio/transcriptionsPOST /v1/audio/translationsPOST /v1/audio/speechPOST /v1/audio/generationsPOST /v1/rerank
Bearer prefix is case-insensitive, but the format above is recommended. API keys usually start with sk-.
Claude-Compatible Authentication
The Claude Messages-compatible endpoint is:POST /v1/messages
GET /v1/models and GET /v1/models/{model} return Anthropic / Claude-compatible model shapes when both x-api-key and anthropic-version are present.
Gemini-Compatible Authentication
Gemini-compatible endpoints include:GET /v1beta/modelsGET /v1beta/openai/modelsPOST /v1beta/models/{model}:generateContentPOST /v1/engines/{model}/embeddings
Authorization: Bearer ... for GET /v1/models. Do not treat GET /v1/models?key=... as the general model-list authentication pattern.
WebSocket Authentication
GET /v1/realtime is the WebSocket entry point and uses the same API key system. Prefer:
Sec-WebSocket-Protocol also supports the openai-insecure-api-key.{key} form.
What Is Checked
The server validates:- whether the API key exists
- whether the API key is expired, disabled, or out of quota
- whether the user account is enabled and allowed to use API access
- whether the API key has access to the requested group
- whether the request IP is allowed when the key has IP restrictions
Common Auth Issues
Next: First Request Example.