https://www.sharpe.ai/api/v1/* require an API key. The API supports two production-safe authentication methods: a Bearer token in the Authorization header (recommended) or an X-API-Key header. The API is paid-only: a key works while its account has an active plan, and there is no free tier and no keyless API.
Getting your API key
- Sign in and choose a plan at /dashboard/billing (Hobbyist, Pro or Commercial; see Rate limits for what each includes). Plans are paid in USDC, or any token swapped at checkout, through MoonPay Commerce.
- Create your key from the API key dashboard. Creating a key without an active plan answers
402.
A key without an active plan
A key whose plan has ended answers401 with type expired_api_key and the detail “This API key has no active plan. Subscribe or renew at https://www.sharpe.ai/dashboard/billing.” Nothing is charged automatically: renewal reminders arrive on each of the 5 days before the paid period ends, and the key keeps working for 3 days after it. Renew at /dashboard/billing and the same key works again.
Every account gets one trial before it needs a plan: 7 days and 250 requests, starting with the key’s first request (see Rate limits). A key issued before 2026-11-11 no longer answers for free: its first request after that day starts the same trial. Once the trial is over the key answers 401 expired_api_key with the detail “This account’s trial has ended. Choose a plan at https://www.sharpe.ai/pricing and this key works again.” until the account has a plan.
Two endpoints need no key: /v1/health and /v1/meta/coverage.
The full key is shown once immediately after creation. Store it in a secret manager or local environment variable before closing the dialog.
Store your key
Verify your key
Bearer token (recommended)
Pass your API key as a Bearer token in theAuthorization header. This is the standard approach and works with most HTTP clients out of the box.
Bearer token authentication
X-API-Key header
As an alternative, you can pass the key in theX-API-Key header. This is useful in environments where the Authorization header is reserved or stripped by a proxy.
X-API-Key authentication
Query parameters are not accepted
API keys must not be sent in URLs. Query strings are captured by browser history, server logs, analytics tools, and referrer headers, so?api_key= requests are rejected by default. Use Authorization: Bearer or X-API-Key instead.
Key format
When both supported authentication methods are present, the API uses this precedence order:Authorization: Bearer header > X-API-Key header. Only the highest-priority credential is evaluated.
All API keys follow a predictable format so you can identify them in logs and configuration:
Keys are 56 characters long including the prefix (8-character prefix + 48 hex characters). Treat them like passwords. Never commit them to source control or expose them in client-side code.
Rate limit and quota headers
Every authenticated v1 API response includes headers that tell you where you stand against your per-minute rate limit and monthly quota:ISO 8601 timestamp when the monthly quota resets. Included when the quota store returns a reset timestamp.
Example response headers
Security best practices
- Rotate keys regularly and immediately if you suspect a compromise
- Use environment variables to store keys instead of hardcoding them
- Revoke lost keys from the API key dashboard before creating replacements
- Restrict by IP if your plan supports IP allowlisting

