Authentication

Authentication

Every request to the Nexotao API requires an API key in the form sk-nexo-.... Create and manage keys in the dashboard under the API Keys menu.

Sending the API key

Two ways, depending on the format you use:

For /v1/chat/completions, use the Authorization: Bearer header.

-H "Authorization: Bearer sk-nexo-..."

Key security

🚫

Never embed a key in client code (browser, mobile apps) or a public repo. A leaked key lets anyone drain your balance, and spent balance cannot be recovered.

  • Treat your key like a password.
  • Store it in an environment variable or a secret manager on the server side.
  • If a key leaks, revoke it in the dashboard and create a new one. A revoked key stops working immediately.
  • One account can have multiple keys — separate them per application so you can revoke them individually.

An invalid or revoked key returns 401 Unauthorized. See API Reference for the list of error codes.