Authentication

How to authenticate to the Raid AI API with your bearer token.

The Raid AI API authenticates every request with a secret API token, sent as a bearer token in the Authorization header.

Where to find your token

Create and manage tokens from the dashboard: open API Keys, click Create Key, choose the scopes (which detection endpoints the key may call) and an optional expiry, then copy the token — it's shown only once. You can revoke a key at any time, and a request made with a revoked or expired key returns 401 Unauthorized.

Scopes

Each key is granted one or more scopes, and a key may only call the endpoints it's scoped for:

ScopeEndpoints
image/api/app/image-forensics/*
audio/api/app/voice-analysis/*
fact-check/api/app/fact-checking/*

Calling an endpoint your key isn't scoped for returns 403 Forbidden.

Keep your token secret

Your API token carries the full permissions and credit balance of your account. Never embed it in client-side code, mobile apps, public repositories, or browser requests your users can inspect. Call the Raid AI API from your server, and store the token in an environment variable or a secrets manager. If a token leaks, contact us to rotate it.

Sending your token

Send the token as a bearer token in the Authorization header:

curl -X POST "https://api.raidxai.com/api/app/image-forensics/process" \
  -H "Authorization: Bearer <your-token>" \
  -F "imageFiles=@photo.jpg"

Errors

A missing or invalid token returns 401 Unauthorized:

{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API token." } }

On this page