API authentication

Send your API key in the Authorization: Bearer header.

Create a key in your workspace and grant it the inference scope. Keys are shown once and can be revoked in the workspace. Do not place them in client-side code or a public repository.

The API endpoints on api.rynler.com use bearer keys. Browser session cookies do not authorize them. Generate a fresh Idempotency-Key for each inference request so you can distinguish retries from new work.

Key format and storage

A Rynler API key starts with ryn_ followed by 43 URL-safe characters generated from 32 random bytes. Rynler stores only a SHA-256 hash of the key, so a lost key cannot be recovered: create a new one. The key list shows each key's first 12 characters, its spend against its cap, when it was last used and whether it is active or revoked. A workspace can hold up to 20 active keys.

Sending the key

Send exactly Authorization: Bearer ryn_… on each request to https://api.rynler.com/v1. The same header authorizes GET /v1/models, which lists the models available to your key. Most SDKs set the header for you from their API key option, as in the quickstart example.

Authentication errors

A failed check returns HTTP 401 with an error object containing a code, a message and a requestId:

  • API_KEY_REQUIRED: the header is missing or does not contain a bearer key in the Rynler format.
  • API_KEY_INVALID: the key is unknown or revoked, or the account that owns it is not verified or is disabled.

An inference request from a valid key returns 403 TERMS_ACCEPTANCE_REQUIRED until the account owner accepts the current Terms and Conditions in the account.

Spending caps

Each key has a lifetime spending cap set when it is created. Before calling the model, a request reserves its maximum possible cost against both the workspace balance and the key's remaining cap, then settles against the tokens actually reported. If the reservation does not fit the key's cap, the request is refused with 429 KEY_QUOTA; if it does not fit the balance, with 402 INSUFFICIENT_CREDITS. Use one key per application or environment so a cap bounds the spend of that integration.

Rotation and revocation

To rotate a key, create a new key, deploy it to your server, confirm requests succeed, then revoke the old key in the workspace. Revocation applies to the next request: a revoked key returns API_KEY_INVALID. Revoke a key immediately if it appears in logs, a repository or a browser bundle.

Keep keys on the server

Never ship a key in a web page, mobile app or other client that users can inspect. Call Rynler from your backend, keep the key in an environment variable or secret manager, and let your own authentication decide which users may trigger a request.

Idempotency keys

Inference requests also require an Idempotency-Key header of 16 to 128 letters, digits, hyphens or underscores. A request without a valid value is rejected with 400 INVALID_REQUEST. Reusing a key that was already reserved returns 409 IDEMPOTENCY_CONFLICT without a new upstream call; see request limits and retries.

Start with the quickstart, then use the endpoint reference to build a request. Review usage pricing before adding credits.