Blue Whale APIBlue Whale API

Authentication

Authenticate requests with an API key

All API requests use Bearer Token authentication.

Request Header Format

Authorization: Bearer sk-YOUR-KEY

Replace sk-YOUR-KEY with an API key created in the console.

Key Creation and Lifecycle

  • Create keys on the "Tokens" page of the console; you can create multiple keys for different environments
  • A key can be disabled or deleted at any time; deletion takes effect immediately
  • Do not hard-code real keys in browsers, client bundles, or public repositories

Authentication Failures

A missing, invalid, or disabled key returns 401, with an OpenAI-compatible error envelope (message contains the request id of this call):

{
  "error": {
    "message": "Invalid token (request id: ...)",
    "type": "new_api_error",
    "code": ""
  }
}

For the full list, see Error Codes.