Gengxi API Developer Docs

Authentication

Authenticate Gengxi API requests safely with a Bearer API key or supported key headers.

Bearer authentication

OpenAI-compatible examples use the Authorization header. API key formats may vary; do not rely on a particular prefix.

httpCopy
Authorization: Bearer YOUR_API_KEY

Other supported headers

Protocol-specific clients may send either of the following headers when their configuration requires it.

httpCopy
x-api-key: YOUR_API_KEY
x-goog-api-key: YOUR_API_KEY

Key safety

  • Store keys in environment variables or a secret manager.
  • Never ship a privileged key in browser or mobile client code.
  • Use separate keys for separate applications and environments.
  • Disable or rotate a key if it may have been exposed.