Aller au contenu principal
API

Cette page est en anglais.

Authentication

Base URL: https://strike-ai.eu (SDK default).

Strike authenticates API requests with a Bearer token (your API key).

Send the key

HTTP header:

HTTP
Authorization: Bearer YOUR_API_KEY

strikeflow reads the key from STRIKE_API_KEY or StrikeModel(api_key=...).

Python
import os
import strikeflow as strike

os.environ["STRIKE_API_KEY"] = "your_key_here"
strike.configure()

Never commit keys to source control or docs. Use environment variables or a secret manager.

Obtain a key

  1. Sign in to the Strike console.
  2. Open API keys.
  3. Create a key and copy it once (prefix is shown in the list; full secret only at creation).

Keys are stored hashed server-side. Revoke unused keys from the same page.

What requires a key

EndpointAuth
POST /v1/systemoneRequired
GET /v1/modelsRequired
POST /v1/tracesRequired for trace ingest

The SDK sends Authorization: Bearer <STRIKE_API_KEY> on decision and trace requests.

Console sign-in

Console routes (/v1/console/*) are for the Strike console only. Sign in to the console with your account; your API key does not work there.

Idempotency

Optional header on POST /v1/systemone:

HTTP
Idempotency-Key: your-stable-key

Repeating the same key and body returns the cached response. The cache is per API worker. STRIKE_IDEMPOTENCY_TTL_SECONDS defaults to 86400 (24 hours). STRIKE_IDEMPOTENCY_MAX defaults to 2048 entries.

Rotate a key

  1. Create a second key in the console and copy the secret once.
  2. Point clients at the new key (STRIKE_API_KEY or your secret store).
  3. Confirm traffic on the new prefix, then revoke the old key on the same page.

Revocation is immediate. Requests with the old secret return 401.