Getting Started
Authentication
Bearer-Token, Workspace-Scopes, OAuth, BYOK.
Anirag unterstützt drei Authentifizierungs-Mechanismen.
1 · API-Key (Bearer-Token)
Empfohlen für Server-to-Server-Calls. Im Dashboard unter Settings → API Keys → New.
httpAuthorization: Bearer ar_live_...Scopes
- →
read— Query, Documents lesen. - →
write— Documents hochladen, Workspaces verwalten. - →
admin— User-Verwaltung, API-Key-Rotation.
Rotation
API-Keys können ohne Downtime rotiert werden. POST /v1/api-keys/rotate erzeugt einen neuen Key, alter Key bleibt 24 h aktiv für Übergangs-Phase.
2 · OAuth 2.0 (User-Context)
Für Embed-Widgets und User-facing Apps. Authorization-Code-Flow mit PKCE.
text1. Authorize: https://app.anirag.io/oauth/authorize?client_id=...&redirect_uri=...&code_challenge=...
2. Token: POST /v1/oauth/token (code → access_token + refresh_token)
3. Refresh: POST /v1/oauth/token (refresh_token → neues access_token)Access-Token sind 1 h gültig, Refresh-Token 30 Tage. Scopes wie bei API-Keys, plus user:profile.
3 · BYOK (Bring-Your-Own-Key)
Für LLM-Provider-Calls (Anthropic, OpenAI, Mistral, Aleph Alpha). Sie bringen Ihre Provider-Keys, Anirag verschlüsselt sie at-rest mit AES-256-GCM und routet die Calls.
bashcurl -X POST https://api.anirag.io/v1/byok \
-H "Authorization: Bearer $ANIRAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace": "ops",
"provider": "anthropic",
"key": "sk-ant-...",
"region": "eu"
}'Vorteile
- →Sie zahlen direkt beim Provider — keine Anirag-Marge auf LLM-Calls.
- →Provider-spezifische Rate-Limits gelten direkt.
- →Key-Hoheit liegt bei Ihnen — Rotation jederzeit möglich.
SSO
Im Dashboard unter Settings → SSO:
- →Google Workspace
- →Microsoft Entra ID
- →Okta (SAML 2.0)
- →Generic SAML 2.0
- →Auth0
Domain-Auto-Join: User mit @ihre-domain.de werden automatisch dem Workspace zugeordnet.