Skip to main content
StrikeStrike
Overview

Authentication

API keys, the Bearer header, idempotency and key rotation.

Every API request carries your API key as a Bearer token. The base URL is https://strike-ai.eu.

HTTP
Authorization: Bearer YOUR_API_KEY

strike_ai.Client reads the key from STRIKE_API_KEY. You can also pass it in code: Client(api_key=...).

Python
import os
from strike_ai import Client

client = Client(api_key=os.environ["STRIKE_API_KEY"])

Keep keys out of source control. Load them from the environment or a secret manager.

Get a key

  1. Sign in.
  2. Open API keys in the console.
  3. Create a key. The full key is shown when you create it. The list shows only its prefix after that.

An account can have up to 25 active keys. Creating one more returns 409 key_limit.

Endpoints that need a key

EndpointKey
POST /v1/systemoneRequired
GET /v1/modelsRequired
POST /v1/tracesRequired
DELETE /v1/retention/{request_id}Required. Must be the key, or another key of the same account, that made the request.
GET /healthNot needed
GET /v1/public/pricingNot needed

Console routes under /v1/console/* are for the Strike console. They use your console session, not an API key.

Idempotency

Send Idempotency-Key on POST /v1/systemone to make a retry safe:

HTTP
Idempotency-Key: ticket-4411-refund

The same key with the same body, on the same API key, returns the stored response for 24 hours. A different body with the same key runs a new request. The cache lives in one API process, so a retry that lands on another process can run again.

Rotate a key

  1. Create a second key in the console.
  2. Point your clients at it.
  3. Check that traffic shows on the new key, then revoke the old one.

Revocation is immediate: every request looks the key up, and a revoked key gets 401 authentication_error.

Strike AI | Authentication