Authentication

All model endpoints authenticate with an API key.

Recommended header

http
Authorization: Bearer $MODELGO_API_KEY
Content-Type: application/json

Anthropic-style clients may also use:

http
x-api-key: $MODELGO_API_KEY
Content-Type: application/json

Gemini-style clients may also use:

http
x-goog-api-key: $MODELGO_API_KEY
Content-Type: application/json

When several are present, precedence is Authorization > x-api-key > x-goog-api-key.

Get & manage

  • Console: https://console.modelgo.ai
  • An API key is shown in full only once, at creation time
  • Revoking or disabling a key takes effect after the auth cache expires

Common failures

HTTPerror_classMeaning
401authMissing, invalid, disabled, or expired API key
403policyKey is valid but not allowed to call the model

See Errors & Rate Limits for the unified error shape.