Skip to content

Authentication

All data endpoints require an API key passed via the X-API-Key header:

Terminal window
curl -H "X-API-Key: pxie_live_abc123..." \
https://api.pxie.ai/v1/space-weather/kp

Keys follow the format pxie_live_ followed by 43 URL-safe characters. Keys are stored as SHA-256 hashes — the plaintext is shown only once at creation time.

Action Method Endpoint
List keys GET /v1/users/keys
Create key POST /v1/users/keys
Revoke key DELETE /v1/users/keys/{id}

You can have up to 10 active keys. Each key is independently rate-limited.

These account endpoints are called from the dashboard with your sign-in session (see Dashboard Authentication), not with an API key.

Optionally restrict a key to specific IP addresses or CIDR ranges:

Terminal window
curl -X PUT \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"allowed_ips": ["203.0.113.0/24", "198.51.100.5"]}' \
https://api.pxie.ai/v1/users/keys/{key_id}/allowed-ips

When allowed_ips is set, requests from other IPs receive a 403 with code IP_BLOCKED.

Both IPv4 and IPv6 addresses and CIDR ranges are supported, up to 50 entries per key.

Set allowed_ips to null to remove the restriction.

The MCP server accepts the same API keys via Authorization: Bearer pxie_live_..., or OAuth 2.1 sign-in for web-based AI clients (claude.ai, ChatGPT connectors). MCP access requires the Builder plan or higher.

Dashboard and account management endpoints use Clerk JWT authentication via the Authorization: Bearer header. This is separate from API key auth used for data endpoints.

Status Meaning
401 Missing or invalid API key
403 IP not in allowlist, or endpoint not available on your tier
402 Insufficient credits
429 Rate limit exceeded