API reference

Every route the API serves. Generated, not written.

This reference renders from the OpenAPI document the server emits about itself, checked in and gated in CI, so it cannot describe a route the deployed API does not serve. Even the curl commands are generated, example values included. Base URL: https://api.orr.sh. Version 0.1.0. Every data endpoint works without a key (60 requests/minute per IP); create an account for an API key and plan-rate limits.

meta

Service liveness

get/health

curl 'https://api.orr.sh/health'
  • 200HealthThe service is up
Response fields · Health
Health

Service liveness.

FieldTypeDescription
servicestring
statusstring

atmosphere

International Standard Atmosphere state

get/v1/atmosphere

ISA state for a geometric altitude, computed with the standard-atmosphere crate.

curl 'https://api.orr.sh/v1/atmosphere?altitude_m=1000'
ParameterTypeDescription
altitude_mnumber (double)Geometric altitude, metres, -500 to 86000
  • 200AtmosphereResponseISA temperature, pressure, and density at the altitude
  • 400ProblemMissing or out-of-range altitude_m
  • 429ProblemRate limit exceeded
Response fields · AtmosphereResponse
AtmosphereResponse

ISA state at an altitude.

FieldTypeDescription
density_kg_m3number (double)Air density, kg/m^3.
geopotential_altitude_mnumber (double)Geopotential altitude corresponding to the geometric input, metres.
inputInput
modelstringThe atmosphere model behind the numbers.
pressurePressure
sourcestringWhere the computation comes from.
temperatureTemperature
Input
FieldTypeDescription
altitude_kindstringHow the altitude is measured (`geometric`).
altitude_mnumber (double)The altitude the state was computed for, metres.
Pressure

Pressure in pascals and hectopascals.

FieldTypeDescription
hpanumber (double)
panumber (double)
Temperature

Temperature in kelvin and degrees Celsius.

FieldTypeDescription
cnumber (double)
knumber (double)

weather

Weather intelligence (the V1 beachhead)

get/v1/weather/forecast

Hourly point forecast, one time series per requested variable.

curl 'https://api.orr.sh/v1/weather/forecast?lat=35&lon=-100&vars=temperature_2m,wind_speed_80m,ghi'
ParameterTypeDescription
latnumber (double)Latitude, WGS84 degrees, -90 to 90
lonnumber (double)Longitude, WGS84 degrees, -180 to 180
varsstringComma-separated canonical variable ids. Served today: temperature_2m, wind_speed_10m, wind_direction_10m, wind_speed_80m, wind_direction_80m, ghi
model?stringModel: auto (default) or gfs; other models return 400 until they are served with published verification
horizon_hours?integer (int32)Hourly points to return, starting at the current hour, 1 to 96 (default 48)
  • 200ForecastResponseOne hourly series per requested variable from the freshest published GFS cycle covering the horizon, with model lineage
  • 400ProblemMissing or invalid parameters, an unsupported variable, or an unserved model
  • 429ProblemRate limit exceeded
  • 503ProblemNo published GFS cycle covers the requested horizon
Response fields · ForecastResponse
ForecastResponse

Point forecast: one hourly time series per requested variable, with the producing model run's lineage.

FieldTypeDescription
cyclestring (date-time)Issue time of the producing model cycle.
locationLonLat
modelWeatherModelThe model that answered (`auto` resolves to the only served model today; more arrive with published verification).
seriesTimeSeries[]
LonLat

A longitude/latitude point in WGS84 degrees.

FieldTypeDescription
latnumber (double)Latitude in degrees, -90..90.
lonnumber (double)Longitude in degrees, -180..180.
WeatherModel

Which model (or blend) backs a forecast.

one of: auto · nbm · hrrr · gfs · ecmwf

TimeSeries

A dense series for one variable at one place: the common API response.

FieldTypeDescription
locationLonLatWhere the series applies.
pointsTimeSeriesPoint[]The ordered points.
sourcestringWhich connector/source produced this.
unitstringCanonical unit string for the values in this series.
variableVariableIdWhich variable this series reports.
TimeSeriesPoint

A single point in a [`TimeSeries`].

FieldTypeDescription
atstring (date-time)When this point applies.
valuenumber (double)The value, in the series' unit.
VariableId

Canonical variable identifiers, stable across all providers and domains.

one of: temperature_2m · wind_speed_10m · wind_direction_10m · wind_speed_80m · wind_direction_80m · wind_speed_100m · wind_direction_100m · precipitation · pressure_msl · ghi · load · solar_generation · wind_generation · lmp

get/v1/weather/observations

Recent station observations near a point.

curl 'https://api.orr.sh/v1/weather/observations?lat=32.9&lon=-97.04&var=temperature_2m'
ParameterTypeDescription
latnumber (double)Latitude, WGS84 degrees, -90 to 90
lonnumber (double)Longitude, WGS84 degrees, -180 to 180
varstringCanonical variable id. Observed: temperature_2m, wind_speed_10m, wind_direction_10m, pressure_msl, precipitation
since?stringReturn values at or after this RFC 3339 instant, at most 7 days back (default: the last 24 hours)
  • 200ObservationsResponseObservations from the nearest reporting NWS station, oldest first, with the station named
  • 400ProblemMissing or invalid parameters, a variable stations do not observe, or a `since` beyond the observation window
  • 404ProblemThe point is outside the NWS observing network
  • 429ProblemRate limit exceeded
  • 503ProblemThe observations source is unreachable
Response fields · ObservationsResponse
ObservationsResponse

Recent observed values near a point, from the nearest reporting station.

FieldTypeDescription
locationLonLatThe requested point; records carry the station's own coordinates.
observationsObservation[]The records, oldest first.
stationObsStationThe nearest station that reported the variable in the window - or, when none did, the nearest station asked (with `observations` empty).
unitstringCanonical unit for every value in `observations`.
variableVariableId
LonLat

A longitude/latitude point in WGS84 degrees.

FieldTypeDescription
latnumber (double)Latitude in degrees, -90..90.
lonnumber (double)Longitude in degrees, -180..180.
Observation

A single observed or analysed value at a place and time.

FieldTypeDescription
atstring (date-time)When the value applies.
locationLonLatWhere the value applies.
sourcestringWhich connector/source produced this (lineage for trust and debugging).
valuenumber (double)The value, in the variable's canonical unit.
variableVariableIdWhich variable this measures.
VariableId

Canonical variable identifiers, stable across all providers and domains.

one of: temperature_2m · wind_speed_10m · wind_direction_10m · wind_speed_80m · wind_direction_80m · wind_speed_100m · wind_direction_100m · precipitation · pressure_msl · ghi · load · solar_generation · wind_generation · lmp

ObsStation

The station whose instruments answered an observations request.

FieldTypeDescription
idstringNWS station identifier, e.g. `KDFW`.
locationLonLatStation coordinates, WGS84.
namestringHuman-readable site name.

get/v1/weather/wind

Wind at a height above ground, for wind-energy work.

curl 'https://api.orr.sh/v1/weather/wind?lat=35&lon=-100&height_m=120'
ParameterTypeDescription
latnumber (double)Latitude, WGS84 degrees, -90 to 90
lonnumber (double)Longitude, WGS84 degrees, -180 to 180
height_mnumber (double)Height above ground to report wind at, metres, 10 to 300 (modern turbine hubs sit at 80-160 m)
  • 200WindResponseWind at the requested height from the freshest published GFS cycle, with the shear derivation and model lineage
  • 400ProblemMissing or invalid parameters
  • 429ProblemRate limit exceeded
  • 503ProblemNo recent GFS cycle is reachable
Response fields · WindResponse
WindResponse

Wind at the requested height at a point, with model lineage.

FieldTypeDescription
locationLonLat
modelModelRun
sourcestringData source and license; attribution travels with the data.
windHubHeightWind
LonLat

A longitude/latitude point in WGS84 degrees.

FieldTypeDescription
latnumber (double)Latitude in degrees, -90..90.
lonnumber (double)Longitude in degrees, -180..180.
ModelRun

The model run behind a served value. A forecast always carries both its issue time and its valid time.

FieldTypeDescription
cyclestring (date-time)When the model run was initialised (issue time).
forecast_hourinteger (int32)Hours from issue to valid.
gridstringGrid the values were sampled from.
namestringProducing model.
valid_atstring (date-time)The moment the values describe.
HubHeightWind

Wind extrapolated to a requested height above ground: the hub-height product (docs/DECISIONS.md D9).

FieldTypeDescription
anchorsWindAnchor[]The two model levels the profile was anchored on, lower first.
direction_deg?number | nullMeteorological wind direction (degrees the wind blows *from*), taken at the upper model level, the one nearest a turbine hub; direction veer above that anchor is not modeled. `None` in near-calm air.
height_mnumber (double)The requested height above ground, metres.
shear_exponentnumber (double)The power-law exponent the extrapolation used.
shear_methodShearMethodWhere that exponent came from.
speed_m_snumber (double)Wind speed at that height, m/s, by the power law.
WindAnchor

One model anchor level, reported back so a caller can see what the extrapolation stood on.

FieldTypeDescription
height_mnumber (double)Height above ground, metres.
speed_m_snumber (double)Wind speed at that height, m/s.
ShearMethod

How the shear exponent behind a hub-height answer was obtained.

one of: two_level · fallback_one_seventh

energy

Power-system data, keyed by ISO zone

get/v1/energy/load

System load (demand) for a zone.

curl 'https://api.orr.sh/v1/energy/load?zone=ERCOT'
ParameterTypeDescription
zonestringBalancing authority / ISO zone, e.g. ERCOT, CAISO, MISO, PJM, SPP, NYISO, ISONE
since?stringReturn values at or after this RFC 3339 instant (default: last 24 hours)
  • 200LoadResponseHourly system demand for the zone from the EIA grid monitor, oldest first
  • 400ProblemMissing or invalid parameters
  • 429ProblemRate limit exceeded
  • 503ProblemThe EIA data source is unreachable
Response fields · LoadResponse
LoadResponse

System load for a zone.

FieldTypeDescription
series?TimeSeries | null
zonestringThe balancing authority / ISO zone asked about.
TimeSeries

A dense series for one variable at one place: the common API response.

FieldTypeDescription
locationLonLatWhere the series applies.
pointsTimeSeriesPoint[]The ordered points.
sourcestringWhich connector/source produced this.
unitstringCanonical unit string for the values in this series.
variableVariableIdWhich variable this series reports.
LonLat

A longitude/latitude point in WGS84 degrees.

FieldTypeDescription
latnumber (double)Latitude in degrees, -90..90.
lonnumber (double)Longitude in degrees, -180..180.
TimeSeriesPoint

A single point in a [`TimeSeries`].

FieldTypeDescription
atstring (date-time)When this point applies.
valuenumber (double)The value, in the series' unit.
VariableId

Canonical variable identifiers, stable across all providers and domains.

one of: temperature_2m · wind_speed_10m · wind_direction_10m · wind_speed_80m · wind_direction_80m · wind_speed_100m · wind_direction_100m · precipitation · pressure_msl · ghi · load · solar_generation · wind_generation · lmp

get/v1/energy/prices

Locational marginal prices for a zone (optionally one node/hub).

curl 'https://api.orr.sh/v1/energy/prices?zone=ERCOT'
ParameterTypeDescription
zonestringBalancing authority / ISO zone, e.g. ERCOT, CAISO, MISO, PJM
node?stringNode or hub within the zone
since?stringReturn values at or after this RFC 3339 instant (default: last 24 hours)
  • 200PricesResponseLMP series for the zone and node, null when the zone has no price source yet
  • 400ProblemMissing or invalid parameters
  • 429ProblemRate limit exceeded
  • 503ProblemThe price data source is unreachable
Response fields · PricesResponse
PricesResponse

Locational marginal prices for a zone.

FieldTypeDescription
node?string | nullThe specific node or hub, when one was requested.
series?TimeSeries | null
zonestringThe balancing authority / ISO zone asked about.
TimeSeries

A dense series for one variable at one place: the common API response.

FieldTypeDescription
locationLonLatWhere the series applies.
pointsTimeSeriesPoint[]The ordered points.
sourcestringWhich connector/source produced this.
unitstringCanonical unit string for the values in this series.
variableVariableIdWhich variable this series reports.
LonLat

A longitude/latitude point in WGS84 degrees.

FieldTypeDescription
latnumber (double)Latitude in degrees, -90..90.
lonnumber (double)Longitude in degrees, -180..180.
TimeSeriesPoint

A single point in a [`TimeSeries`].

FieldTypeDescription
atstring (date-time)When this point applies.
valuenumber (double)The value, in the series' unit.
VariableId

Canonical variable identifiers, stable across all providers and domains.

one of: temperature_2m · wind_speed_10m · wind_direction_10m · wind_speed_80m · wind_direction_80m · wind_speed_100m · wind_direction_100m · precipitation · pressure_msl · ghi · load · solar_generation · wind_generation · lmp

account

Self-serve accounts and API keys. Data endpoints work without a key at 60 requests/minute per IP; a free key raises that to 300.

post/v1/accounts

Create an account and its first API key.

curl -X POST 'https://api.orr.sh/v1/accounts' \
  -H 'content-type: application/json' \
  -d '{"email":"trader@example.com","password":"correct-horse-battery"}'
  • 201AccountCreatedAccount created; the key secret is shown only here
  • 400ProblemInvalid email or password shape
  • 409ProblemAn account with this email already exists
  • 429ProblemRate limit exceeded
Response fields · AccountCreated
AccountCreated

A new account with its first API key.

FieldTypeDescription
account_idstring
api_keyIssuedKeyThe first API key. The secret is shown exactly once.
emailstring
planPlanIdPlan the account starts on (free; upgrade paths come with the console).
IssuedKey

A freshly minted API key. The secret appears here and never again; store it now.

FieldTypeDescription
key_idstringThe key id, safe to log and show; use it to revoke the key.
secretstringThe key secret (`orrery_sk_...`), shown exactly once. Send it as `Authorization: Bearer <secret>`.
PlanId

The published plan tiers.

one of: free · build · pro · scale

post/v1/auth/login

Verify credentials and see the account and its keys.

curl -X POST 'https://api.orr.sh/v1/auth/login' \
  -H 'content-type: application/json' \
  -d '{"email":"trader@example.com","password":"correct-horse-battery"}'
  • 200AccountViewCredentials verified; the account and its key metadata
  • 401ProblemEmail or password is incorrect
  • 429ProblemRate limit exceeded
Response fields · AccountView
AccountView

The account behind a successful login.

FieldTypeDescription
account_idstring
emailstring
keysKeySummary[]Metadata for every live key on the account.
planPlanId
KeySummary

One key's metadata (never the secret).

FieldTypeDescription
created_atstringWhen the key was minted, RFC 3339 UTC.
key_idstring
PlanId

The published plan tiers.

one of: free · build · pro · scale

post/v1/keys

Mint an additional API key.

curl -X POST 'https://api.orr.sh/v1/keys' \
  -H 'content-type: application/json' \
  -d '{"email":"trader@example.com","password":"correct-horse-battery"}'
  • 201IssuedKeyKey minted; the secret is shown only here
  • 401ProblemEmail or password is incorrect
  • 429ProblemRate limit exceeded
Response fields · IssuedKey
IssuedKey

A freshly minted API key. The secret appears here and never again; store it now.

FieldTypeDescription
key_idstringThe key id, safe to log and show; use it to revoke the key.
secretstringThe key secret (`orrery_sk_...`), shown exactly once. Send it as `Authorization: Bearer <secret>`.

post/v1/keys/revoke

Revoke an API key by id.

curl -X POST 'https://api.orr.sh/v1/keys/revoke' \
  -H 'content-type: application/json' \
  -d '{"email":"trader@example.com","key_id":"ok_1a2b3c4d5e6f","password":"correct-horse-battery"}'
  • 200RevokedKey revoked
  • 401ProblemEmail or password is incorrect
  • 404ProblemNo such key on this account
  • 429ProblemRate limit exceeded
Response fields · Revoked
Revoked

Revocation outcome.

FieldTypeDescription
key_idstring
revokedboolean

get/v1/me

The identity behind the presented API key.

curl 'https://api.orr.sh/v1/me' \
  -H "Authorization: Bearer $ORRERY_API_KEY"
  • 200MeThe account, plan, and limits behind the key
  • 401ProblemMissing, unknown, or revoked API key
  • 429ProblemRate limit exceeded
Response fields · Me
Me

The identity and limits behind the presented API key.

FieldTypeDescription
account_idstring
emailstring
included_requests_per_monthinteger (int64)Requests included per month before overage, per the published plans.
key_idstringThe key that authenticated this request.
planPlanId
requests_per_minuteinteger (int32)Requests per minute this key may make (the plan's pooled rate).
usage?Usage | null
PlanId

The published plan tiers.

one of: free · build · pro · scale

Usage

This calendar month's usage against the plan's allowance.

FieldTypeDescription
cheaper_plan?PlanId | null
includedinteger (int64)Requests included this month before overage.
overage_usdnumber (double)Overage accrued so far, in USD. Zero at or under the allowance, and always zero on the free plan, which stops rather than billing.
resets_atstringWhen the counter resets, RFC 3339 UTC (the first of the next month).
spend_cap_usd?number | nullThe effective spend cap in USD. `null` on the free plan (it hard-stops at the allowance). For paid plans, the customer-set value if any, otherwise the plan default (2x monthly price).
usedinteger (int64)Requests counted this month. Account routes, the plan catalog, and `/health` are not counted.

get/v1/plans

The published plans and their prices.

curl 'https://api.orr.sh/v1/plans'
  • 200PlanCatalogThe published plan catalog and its upgrade crossovers
  • 429ProblemRate limit exceeded
Response fields · PlanCatalog
PlanCatalog

The catalog: every tier, plus the volumes at which moving up costs less than staying put.

FieldTypeDescription
plansPublishedPlan[]Every published tier, cheapest first.
upgrade_atCrossover[]Where the ladder's rungs meet. At and above `monthly_requests`, `to` is the cheaper plan - we publish this rather than let a customer overpay in overage without noticing.
PublishedPlan

One published tier, exactly as the gateway enforces it.

FieldTypeDescription
included_requests_per_monthinteger (int64)Requests included each calendar month before overage.
month_to_monthbooleanNo minimum term and no auto-renew trap. Always true.
monthly_price_usdnumber (double)Flat monthly price in USD. Month-to-month; cancel any time.
overage_per_1k_usd?number | nullUSD per 1,000 requests past the included volume. `null` means the plan does not serve past its allowance at any price - it stops (HTTP 402) rather than billing, which is true of the free plan only.
planPlanIdThe plan identifier, as it appears on `GET /v1/me`.
requests_per_minuteinteger (int32)Requests per minute this plan may make (the pooled steady-state rate).
PlanId

The published plan tiers.

one of: free · build · pro · scale

Crossover

Where two adjacent rungs meet: the monthly volume at which the lower plan plus its overage costs exactly what the higher plan costs flat.

FieldTypeDescription
fromPlanIdThe plan being outgrown.
monthly_requestsinteger (int64)The monthly request volume where the two cost the same.
toPlanIdThe plan that becomes the cheaper answer at (and above) this volume.

signup

Early-access list (double opt-in)

get/v1/confirm

Finish a double opt-in: match the token, flip to confirmed, render the page.

curl 'https://api.orr.sh/v1/confirm?e=you@example.com&t=one-time-token-from-the-email'
ParameterTypeDescription
estringSubscriber email address
tstringOne-time confirmation token from the email
  • 200Confirmed onto the list; a branded HTML page
  • 400Missing, malformed, or stale link; a branded HTML page
  • 500Backend failure; a branded HTML page

post/v1/subscribe

Capture a signup: validate, store the row, best-effort send the confirm email.

curl -X POST 'https://api.orr.sh/v1/subscribe' \
  -H 'content-type: application/json' \
  -d '{"email":"you@example.com"}'
  • 202SubscribeStatusAccepted. If the address is not already confirmed, a double opt-in email is on its way. Identical whether the address is new or already on the list, by design.
  • 400ProblemNot a valid email address
  • 500ProblemThe subscription store is unavailable
Response fields · SubscribeStatus
SubscribeStatus

Subscribe outcome. Deliberately uniform for every case (new address, repeat of a pending one, already confirmed) so the response cannot be used to probe which addresses are already on the list.

FieldTypeDescription
statusstringAlways `ok`: the signup was accepted.

billing

Subscriptions. Paddle is the merchant of record; Orrery's own meter stays the source of truth for usage.

post/v1/billing/checkout

Start a subscription.

curl -X POST 'https://api.orr.sh/v1/billing/checkout' \
  -H "Authorization: Bearer $ORRERY_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"plan":"build"}'
  • 201CheckoutCreatedCheckout created; open it to pay
  • 400ProblemThat plan cannot be purchased
  • 401ProblemMissing, unknown, or revoked API key
  • 503ProblemBilling is not configured on this deployment
Response fields · CheckoutCreated
CheckoutCreated

A checkout ready to be opened.

FieldTypeDescription
checkout_url?string | nullA hosted checkout page for this transaction, when the vendor returned one. `null` means use the transaction id with Paddle.js instead.
planPlanIdThe plan this checkout would put the account on.
transaction_idstringThe Paddle transaction id. Pass it to Paddle.js as `_ptxn` to open the overlay checkout in place.
PlanId

The published plan tiers.

one of: free · build · pro · scale