Authentication

All API requests use the same base URL and API key authentication.

Base URL

https://shark.ai/api/v1

SDK clients should usually set their base URL to https://shark.ai/api/v1.

API Key

Send your key as a Bearer token:

Authorization: Bearer sk-your-api-key

The gateway also accepts x-api-key for clients that cannot set an Authorization header.

Optional Headers

HeaderDescription
X-App-UIDEnd-user identifier for tracking and analytics.
X-App-User-CreditsOptional user balance pre-check. Returns 402 when the estimated request cost exceeds this value.
X-Tracing-IDCustom tracing ID. A UUID is generated when omitted.