Skip to main content
Authenticated Sharpe API requests under 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

  1. 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.
  2. Create your key from the API key dashboard. Creating a key without an active plan answers 402.
Each account has one API key. The REST API and the MCP server both use it and share the plan’s monthly quota.

A key without an active plan

A key whose plan has ended answers 401 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.
Once you have your key, store it in an environment variable:
Store your key
Verify the key works by making a test request:
Verify your key

Pass your API key as a Bearer token in the Authorization 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 the X-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:
integer
Maximum number of requests allowed per minute on your plan.
integer
Number of requests remaining in the current window.
integer
Unix timestamp (seconds) when the rate limit window resets.
integer
Monthly request quota of your plan. It resets on the 1st of each month (UTC).
integer
Monthly requests remaining in the current billing period.
string
ISO 8601 timestamp when the monthly quota resets. Included when the quota store returns a reset timestamp.
string
Unique identifier for the request. Include this when contacting support.
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
See plans and rate limits