Authentication

Send your Cruxy API key as a Bearer token in the Authorization header on every authenticated request.

Every authenticated endpoint reads one header: Authorization: Bearer followed by your cxy_live_ key. To mint a key, confirm it works, and store it safely, see Get your API key.

The Authorization header

Send the key on every authenticated request:

curl https://api.cruxy.ai/api/v1/me \
  -H "Authorization: Bearer $CRUXY_API_KEY"

The same key and header work on the OpenAI-compatible routes, POST /v1/chat/completions and GET /v1/models: point an OpenAI client at the base URL https://api.cruxy.ai/v1 and give it your Cruxy key as its API key. Migrate from OpenAI covers the rest of the switch.

Endpoints that take no key

These endpoints are public:

EndpointWhy it is public
POST /api/v1/device/code, POST /api/v1/device/tokenDevice login issues keys.
POST /api/v1/auth/oauth/start, POST /api/v1/auth/oauth/tokenNative sign-in issues keys.
GET /api/status, GET /api/health, GET /api/readyPlatform status and health probes.

When the key is rejected

A 401 unauthorized means the key is missing, malformed, unknown, expired, or revoked: the same answer for each. A signed-in key stops working at its expires_at; see Expiry and revocation. Check the Authorization header, then verify the key.

A 403 means the key is valid but its authority does not cover the call:

codeMeaning
key_scope_forbiddenThe key is not scoped for this endpoint family, or for the memory, rules, or files feature a request field asked for.
model_not_allowedThe key's model allowlist excludes the requested tier.
key_read_onlyThe key may not perform billable operations.

A 403 never clears by waiting: re-scope the key or issue a new one. Errors and retries lists every error code.

Next steps

Was this page helpful?