Skip to main content
Reference

Authentication

Every request authenticates with an API key sent as a Bearer token. Keys are issued to paid plans and scoped to your account.

1. Get a key

On a Developer or Enterprise plan, create and manage keys from your API keys dashboard. A key is shown once at creation — store it somewhere safe. Don't see plans? View pricing.

2. Send the key

Pass the key in the Authorization header. A data request (metered as api_requests):

curl https://patternsight-platform.fly.dev/v1/games/powerball/frequency \
  -H "Authorization: Bearer $PATTERNSIGHT_API_KEY"

An agentic request — swarm picks — needs the Ultra (Enterprise) tier and is metered as agentic_analyses:

curl -X POST https://patternsight-platform.fly.dev/v1/games/powerball/picks \
  -H "Authorization: Bearer $PATTERNSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"strategy": "balanced", "count": 1}'

Metering

Usage is counted per key against two monthly meters: api_requests (data and descriptive analysis) and agentic_analyses (swarm picks and backtests). Agentic calls are charged only on a successful result — a 503 engine error costs nothing. Track remaining quota from the dashboard or GET /v1/account/usage.

Errors

Errors return a JSON body { error, code } with the HTTP status below.

StatusCodeMeaning
401Missing, invalid, or revoked key.
403NO_PLATFORM_ACCESSReturned when provisioning a key from the dashboard if your plan does not include API access — not on /v1 calls. Upgrade to Developer or Enterprise.
429Monthly cap or per-key burst exceeded. The response names the meter and its reset date.
400GAME_NOT_SUPPORTEDPicks/backtest are not available for that game yet; data and analysis are.
400HONESTY_VIOLATIONA result was blocked by the honesty gate and not returned. Fail-closed by design.
503The analysis engine is briefly unavailable. No usage is charged — retry shortly.