Authentication
The OpenGateway API uses API keys for authentication. All API requests must include your API key in the Authorization header.
2
Add to request header
Include your API key in the Authorization header of every request.
Authorization: Bearer YOUR_API_KEY
3
Keep it secure
- •Never expose your API key in client-side code
- •Use environment variables to store your API key
- •Rotate your API keys periodically
- •If compromised, disable the key immediately from Dashboard
Example Request
curl https://apis.opengateway.ai/v1/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_API_KEY" \-d '{"model": "openai/gpt-4o-mini","messages": [{"role": "user", "content": "Hello!"}]}'