Quickstart
1. Get an API Key
Section titled “1. Get an API Key”Sign up at pxie.ai and create an API key from the dashboard. Keys start with pxie_live_.
The free Xplorer tier gives you 500 credits once, at sign-up (valid 90 days) — enough to explore the API.
2. Make Your First Call
Section titled “2. Make Your First Call”All requests require an X-API-Key header.
curl -H "X-API-Key: pxie_live_YOUR_KEY" \ https://api.pxie.ai/v1/space-weather/kpPython
Section titled “Python”import httpx
r = httpx.get( "https://api.pxie.ai/v1/space-weather/kp", headers={"X-API-Key": "pxie_live_YOUR_KEY"},)print(r.json())JavaScript
Section titled “JavaScript”const res = await fetch("https://api.pxie.ai/v1/space-weather/kp", { headers: { "X-API-Key": "pxie_live_YOUR_KEY" },});const data = await res.json();console.log(data);3. Understand the Response
Section titled “3. Understand the Response”{ "time_utc": "2026-03-11T18:00:00", "kp": 3.33, "status": "observed"}Every response includes normalized field names (snake_case) and UTC timestamps. time_utc is passed through as the source publishes it.
4. Check Your Credits
Section titled “4. Check Your Credits”Every successful response carries an X-Pxie-Credits-Remaining header with your
balance. Your full balance and expiry dates are on the
dashboard.
Each endpoint costs a specific number of credits per call. See Credits & Billing for details.
Next Steps
Section titled “Next Steps”- Authentication — API key management and IP allowlisting
- Credits & Billing — Tiers, costs, and top-ups
- Space Weather Endpoints — All space weather endpoints
- Astronomy Endpoints — Moon, sun, and darkness
