Three accepted key locations

On this page

The Gateway accepts a project API key in any of the locations below. Use whichever your SDK sends by default. The Gateway strips the key before forwarding to the provider.

Where the key goes#

LocationUsed by
Authorization: Bearer atp-…OpenAI SDK, Anthropic SDK, curl
x-goog-api-key: atp-…Google GenAI SDK (recommended for Gemini)
?key=atp-…Gemini REST clients. Logs scrub this query param — prefer the header form when possible.

When authentication fails#

If none of the three are present → 401. If the key is disabled or expired → 401.

Next steps

Was this page helpful?