Sky Quality
All endpoints are prefixed with /v1/sky/. Forecasts are computed by Pxie from a global weather model (CMC GDPS).
Coverage: Global, about 15 km resolution. New model runs twice a day (00Z and 12Z), available roughly 5–6 hours after run time; Pxie checks for a new run every hour.
Forecast steps: every 3 hours from now out to 72 hours, so a full forecast has up to 25 entries.
Data source: weather model (CMC GDPS) from Environment and Climate Change Canada. All sky products are Pxie-built.
Attribution: required on every plan when you show or redistribute sky data: “Data Source: Environment and Climate Change Canada” (ECCC Data Server End-use Licence). Responses carry it in the X-Pxie-Attribution header. /legend needs none.
Common Parameters
Section titled “Common Parameters”| Param | Type | Required | Description |
|---|---|---|---|
lat |
float | yes | Latitude (-90 to 90) |
lon |
float | yes | Longitude (-180 to 180) |
hours |
int | no | Forecast hours (default: 72, max: 72) |
Every JSON response includes model_run (the model run used, e.g. 20260311/00Z), run_age_seconds (seconds since the model run) and a stale boolean. When the data pipeline falls behind, stale becomes true; if the run exceeds 48 hours old the endpoint returns 503 rather than serve an outdated forecast. The /chart endpoint conveys the same signal via the X-Pxie-Data-Age and X-Pxie-Stale response headers.
GET /cloud-cover
Section titled “GET /cloud-cover”Credits: 3 | Tier: Builder+
Total cloud cover forecast with a 1–5 quality scale. The response also has low_pct, mid_pct and high_pct fields for cloud layers; the current weather model publishes total cloud only, so these are normally null.
curl -H "X-API-Key: YOUR_KEY" \ "https://api.pxie.ai/v1/sky/cloud-cover?lat=45.5&lon=-75.5&hours=24"{ "lat": 45.5, "lon": -75.5, "model": "CMC GDPS", "model_run": "20260311/00Z", "run_age_seconds": 7200, "stale": false, "coverage": "Global", "forecast": [ { "valid_utc": 1741686000, "hour": 0, "total_pct": 35.2, "low_pct": null, "mid_pct": null, "high_pct": null, "score": 2, "label": "Mostly Clear" } ]}Cloud Cover Scale
Section titled “Cloud Cover Scale”| Score | Label | Total Cloud % |
|---|---|---|
| 1 | Clear | < 10% |
| 2 | Mostly Clear | 10–30% |
| 3 | Partly Cloudy | 30–60% |
| 4 | Mostly Cloudy | 60–85% |
| 5 | Overcast | > 85% |
Source: Pxie, using data from Environment and Climate Change Canada (attribution required)
GET /transparency
Section titled “GET /transparency”Credits: 3 | Tier: Builder+
Atmospheric transparency forecast on a 1–5 scale.
curl -H "X-API-Key: YOUR_KEY" \ "https://api.pxie.ai/v1/sky/transparency?lat=45.5&lon=-75.5&hours=24"{ "lat": 45.5, "lon": -75.5, "model": "Pxie", "model_source": "CMC GDPS", "model_run": "20260311/00Z", "run_age_seconds": 7200, "stale": false, "coverage": "Global", "forecast": [ { "valid_utc": 1741686000, "hour": 0, "pwat_mm": 12.4, "extinction_mag": 0.19, "scale": 2, "label": "Good" } ]}Transparency Scale
Section titled “Transparency Scale”| PWAT (mm) | Extinction (mag/airmass) | Scale | Label |
|---|---|---|---|
| < 5 | ~0.13 | 1 | Exceptional |
| 5–15 | ~0.20 | 2 | Good |
| 15–30 | ~0.30 | 3 | Average |
| 30–50 | ~0.42 | 4 | Poor |
| > 50 | ~0.55 | 5 | Very Poor |
Extinction values are referenced to a dry, high-altitude site; the sea-level Rayleigh + ozone minimum is roughly 0.14–0.16 mag/airmass, so the lowest values are only reachable at elevation.
Source: Pxie, using data from Environment and Climate Change Canada (attribution required)
GET /seeing
Section titled “GET /seeing”Credits: 3 | Tier: Builder+
Astronomical seeing forecast as FWHM in arcseconds. Seeing responds to real synoptic conditions — upper-level jet shear and atmospheric stability — and typically ranges from sub-arcsecond at high, calm sites to several arcseconds under a strong jet stream.
curl -H "X-API-Key: YOUR_KEY" \ "https://api.pxie.ai/v1/sky/seeing?lat=45.5&lon=-75.5&hours=24"{ "lat": 45.5, "lon": -75.5, "model": "Pxie", "model_source": "CMC GDPS", "model_run": "20260311/00Z", "run_age_seconds": 7200, "stale": false, "coverage": "Global", "forecast": [ { "valid_utc": 1741686000, "hour": 0, "seeing_arcsec": 1.85, "r0_cm": 6.2, "scale": 3, "label": "Average" } ]}Seeing Scale
Section titled “Seeing Scale”| Arcsec | Scale | Label |
|---|---|---|
| < 0.8 | 1 | Excellent |
| 0.8–1.5 | 2 | Good |
| 1.5–2.5 | 3 | Average |
| 2.5–4.0 | 4 | Poor |
| > 4.0 | 5 | Bad |
Source: Pxie, using data from Environment and Climate Change Canada (attribution required)
GET /conditions
Section titled “GET /conditions”Credits: 5 | Tier: Builder+
Combined sky conditions forecast with an overall observing score. Returns cloud cover, transparency, seeing, darkness, and moon interference in a single call.
curl -H "X-API-Key: YOUR_KEY" \ "https://api.pxie.ai/v1/sky/conditions?lat=45.5&lon=-75.5&hours=24"{ "lat": 45.5, "lon": -75.5, "model": "Pxie", "model_source": "CMC GDPS", "model_run": "20260311/00Z", "run_age_seconds": 7200, "stale": false, "coverage": "Global", "forecast": [ { "valid_utc": 1741686000, "hour": 0, "cloud": { "total_pct": 15.0, "low_pct": null, "mid_pct": null, "high_pct": null, "score": 2, "label": "Mostly Clear" }, "transparency": { "pwat_mm": 8.5, "extinction_mag": 0.16, "scale": 2, "label": "Good" }, "seeing": { "seeing_arcsec": 1.4, "r0_cm": 8.1, "scale": 2, "label": "Good" }, "darkness": 0.95, "twilight_stage": "astronomical", "moon": { "illumination_pct": 12.3, "phase_name": "Waxing Crescent", "visibility_factor": 0.15 }, "observing_score": 82 } ]}Observing Score
Section titled “Observing Score”observing_score runs from 0 (unusable) to 100 (ideal). Cloud cover matters most; darkness, seeing, transparency and moon interference also count. /transparency, /seeing and /conditions also return model_source, the weather model behind the run.
Source: Pxie, using data from Environment and Climate Change Canada (attribution required)
GET /chart
Section titled “GET /chart”Credits: 5 | Tier: Builder+
Color-coded strip chart returned as a PNG image. Rows for cloud cover, transparency, seeing, darkness, and moon interference across the forecast period.
| Param | Type | Required | Description |
|---|---|---|---|
lat |
float | yes | Latitude |
lon |
float | yes | Longitude |
hours |
int | no | Forecast hours (default: 72, max: 72) |
width |
int | no | Image width in pixels (400–1800, default: 900) |
curl -H "X-API-Key: YOUR_KEY" \ "https://api.pxie.ai/v1/sky/chart?lat=45.5&lon=-75.5&hours=48&width=900" \ -o sky-chart.pngReturns Content-Type: image/png. Ideal for embedding in dashboards, apps, and websites. The X-Pxie-Data-Age (seconds since the model run) and X-Pxie-Stale (true/false) response headers report the model-run age.
Color Coding
Section titled “Color Coding”| Row | Good | Bad |
|---|---|---|
| Cloud | Deep blue (clear) | White (overcast) |
| Transparency | Green (exceptional) | Red (very poor) |
| Seeing | Green (excellent) | Red (bad) |
| Darkness | Black (night) | Yellow (day) |
| Moon | Dark (no interference) | Bright (full moon) |
Cells with no available data render in solid gray.
Source: Pxie, using data from Environment and Climate Change Canada (attribution required)
GET /legend
Section titled “GET /legend”Credits: 0 | Tier: All (including Xplorer)
Colour swatches and labels for each row of the /chart image, so you can draw a matching legend in your own UI. Static metadata; no parameters.
curl -H "X-API-Key: YOUR_KEY" "https://api.pxie.ai/v1/sky/legend"{ "metrics": { "cloud": { "title": "Cloud cover", "swatches": [["Overcast", "#ffffff"], ["75%", "#dbe7f7"], ["50%", "#8ebaff"], ["25%", "#316dff"], ["Clear", "#0a1628"]] } }}metrics has one entry per chart row (cloud, transparency, seeing, darkness, moon) plus no_data for gray cells; only cloud is shown above.
Source: Pxie
