Authentication and API Keys
Authenticate requests with a GonkaGate API key.
Use GET /v1/models as a first GonkaGate auth check before you debug request bodies. A 200 OK response means the Bearer header was accepted, the key passed the current access checks, and the request reached the model catalog.
Verify the key with one request
- If you do not have a key yet, sign in and open Dashboard → API Keys to create one.
- Save the full secret when GonkaGate shows it.
- Send it in the
Authorizationheader:
export GONKAGATE_API_KEY="gp-your-api-key"
curl https://api.gonkagate.com/v1/models \
-H "Authorization: Bearer $GONKAGATE_API_KEY"Expected result: 200 OK with a model list.
Use this request as a quick auth smoke test, not as a full key diagnosis. 429 insufficient_quota belongs to billable routes such as POST /v1/chat/completions, and 503 service_unavailable here means the model catalog is temporarily unavailable, not that the Bearer header is wrong.
Bearer header format
Authorization: Bearer gp-your-api-keyKeep the key in a server-side runtime or secret manager. Do not ship it in browser code, mobile bundles, or public repos.
Store and rotate the key
- Save the full secret when it is first shown, because GonkaGate does not reveal it again later.
- Store the key outside source control, preferably in environment variables or a secret manager.
- Rotate by creating the replacement key first, moving traffic, then disabling the old key.
- If a key may be exposed, stop using it and rotate it immediately.
Common first auth responses
Need exact diagnostics for the current key? Use API key WhoAmI.
See also
- Quickstart to send your first
chat.completionsrequest after authentication works. - Rate Limit Handling for current
/v1request, token, and concurrency limits. - GonkaGate API Error Handling for retry vs stop decisions after auth succeeds.
- Pricing if the real problem is
insufficient_quota, not invalid authentication.