Authentication

Every request carries your key as a Bearer token. There is nothing else to sign.

Send Authorization: Bearer rk_… with every request. The OpenAI SDKs do this when you pass the key as api_key / apiKey.

curl

curl https://api.airuntime.dev/v1/chat/completions \
  -H "Authorization: Bearer $TOKENS_PAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'

Your key

  • Keys start with rk_. Each is a 256-bit random secret; we store only its SHA-256 digest, so we can’t show it again.
  • It is shown once, right after your first payment. Keep it in an environment variable or a secret manager, never in client-side code or a repository.
  • Lost or leaked? On your Profile, turn the key off and get a new one. Your balance stays the same.

Call from your server

The API refuses browser requests from other websites (HTTP 403, authorization_customer_api_origin_denied), because a key in a web page is a key anyone can copy. Call it from your backend, a script or a CLI.

Authentication errors

Authentication errors
StatusCodeMeaning
401authentication_workspace_api_key_invalidThe key is malformed or incomplete.
401authorization_customer_runtime_deniedThe key is turned off, expired or wrong.
401invalid_api_keyNo key, or not an rk_ key.
403authorization_customer_api_origin_deniedCalled from a browser on another website.

Get a key, then make your first call.

From $5, plus a 5% top-up fee (minimum $0.79). No subscription; paid credit never expires.

Add credit