# Compute API playground

https://zodiacs.org/developers/playground/ sends a documented request to the hosted compute API, runs the same request with the API's own code in the browser, and compares both answers with the documented one. This twin lists every request it offers and how to reproduce each without a browser.

Engine: @zodiacs/engine 1.0.0. API: https://zodiacs.org/api/v1/
Every request with its documented answer, as JSON: https://zodiacs.org/developers/playground/examples.json (schema zodiacs.playground-examples.v1).

## Reproducing an answer

- Send the body with POST and `Content-Type: application/json` to the endpoint. No key is needed; requests from one address are rate limited.
- An answer reproduces the documented one when the two are equal as JSON. A receipt that names the runtime's tzdb (`receipt.timeResolution.runtimeTzdb`, `receipt.provenance.runtime`) follows the server's runtime, and so does the digest that cites it.
- Check a citation by recomputing it: `cite.receipt` is `sha256:` and the hex SHA-256 of the receipt's RFC 8785 canonical JSON.
- To open a request in the playground, use its link below. A link carries a request only when someone chose to put it in, after the `#`.

## Documented requests

### chart.utc: A UTC instant at Greenwich, Placidus houses

POST /api/v1/chart, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=chart.utc

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/chart \
  --header 'Content-Type: application/json' \
  --data-raw '{"utc":"2000-01-01T12:00:00Z","latitude":51.4779,"longitude":-0.0015,"houseSystem":"placidus"}'
~~~

Documented citation digest: `sha256:6bf76330b4d42cace9cfc0e798075a270ec64bd312bd68e1f159937bf1303c56`.

### chart.local: Local civil time in an IANA zone, whole-sign houses

POST /api/v1/chart, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=chart.local

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/chart \
  --header 'Content-Type: application/json' \
  --data-raw '{"local":{"date":"1990-06-15","time":"14:30","zone":"Europe/Paris"},"latitude":48.8566,"longitude":2.3522,"houseSystem":"whole"}'
~~~

Documented citation digest: `sha256:4cb4617ff4504f9298e00d47bca417a3cc480b4966138b125cbc0f83184c0f1f`.

### positions.two: Three bodies at two instants

POST /api/v1/positions, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=positions.two

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/positions \
  --header 'Content-Type: application/json' \
  --data-raw '{"instants":["2026-09-29T12:00:00Z","2026-12-31T00:00:00-05:00"],"bodies":["Sun","Moon","Mercury"]}'
~~~

Documented citation digest: `sha256:9acf0150e43bc62eb25cac07c92d82d35638acb8620e12b1a15226f2d52906c9`.

### houses.koch: Koch cusps at Sydney

POST /api/v1/houses, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=houses.koch

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/houses \
  --header 'Content-Type: application/json' \
  --data-raw '{"utc":"2026-06-21T12:00:00Z","latitude":-33.8688,"longitude":151.2093,"houseSystem":"koch"}'
~~~

Documented citation digest: `sha256:0e7d8929bb80897235699e1a886746de04501770a7fa20df9fc01fed132d5ffe`.

### events.october: A month of ingresses, stations and lunations for three bodies

POST /api/v1/events, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=events.october

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/events \
  --header 'Content-Type: application/json' \
  --data-raw '{"from":"2026-10-01T00:00:00Z","to":"2026-11-01T00:00:00Z","bodies":["Sun","Mercury","Venus"],"kinds":["ingress","station","lunation"]}'
~~~

Documented citation digest: `sha256:4d660d22074331aacedaed1a9e2a5ef9b040dce0e591c062a371306950c85c86`.

### time.pinned: A wall time before 1970 with the birthplace longitude, read on the pinned zone history, which the server's time zone data disputes

POST /api/v1/time, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=time.pinned

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/time \
  --header 'Content-Type: application/json' \
  --data-raw '{"local":{"date":"1947-07-01","time":"12:00","zone":"Europe/Stockholm"},"longitude":18.07}'
~~~

Documented citation digest: `sha256:153c99f0ad80b236b20421b542441b4eb81b317968c4646e15da6ac1562913d7`.

### time.gap: A wall time the spring clock change skipped

POST /api/v1/time, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=time.gap

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/time \
  --header 'Content-Type: application/json' \
  --data-raw '{"local":{"date":"2026-03-29","time":"02:30","zone":"Europe/Paris"}}'
~~~

Documented citation digest: `sha256:153c99f0ad80b236b20421b542441b4eb81b317968c4646e15da6ac1562913d7`.

### time.julian: A date written in the Julian calendar, with the country for the calendar note

POST /api/v1/time, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=time.julian

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/time \
  --header 'Content-Type: application/json' \
  --data-raw '{"local":{"date":"1917-10-25","time":"12:00","zone":"Europe/Moscow"},"calendar":"julian","country":"RU"}'
~~~

Documented citation digest: `sha256:153c99f0ad80b236b20421b542441b4eb81b317968c4646e15da6ac1562913d7`.

### time.atlas: A place of the time atlas whose clock tzdb does not record: Strasbourg under German summer time in 1916

POST /api/v1/time, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=time.atlas

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/time \
  --header 'Content-Type: application/json' \
  --data-raw '{"local":{"date":"1916-06-01","time":"12:00","zone":"Europe/Paris"},"atlasPlace":"fr-strasbourg"}'
~~~

Documented citation digest: `sha256:153c99f0ad80b236b20421b542441b4eb81b317968c4646e15da6ac1562913d7`.

### elections.london: Three days in London with the Moon waxing and not void of course, Mercury direct and Jupiter in an angular house

POST /api/v1/elections, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=elections.london

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/elections \
  --header 'Content-Type: application/json' \
  --data-raw '{"from":"2026-12-09T00:00:00Z","to":"2026-12-12T00:00:00Z","conditions":[{"kind":"phase","phase":"waxing"},{"kind":"void-of-course","not":true},{"kind":"retrograde","body":"Mercury","not":true},{"kind":"angular","body":"Jupiter"}],"place":{"latitude":51.5072,"longitude":-0.1276,"houseSystem":"placidus"}}'
~~~

Documented citation digest: `sha256:2cfcb9f180307d27935717178b5fc75f0088d29378c65cea4f633acb2a2d3def`.

### sky-fact.retrograde: Is Mercury retrograde on a date in a zone? It stations that day.

POST /api/v1/sky-fact, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=sky-fact.retrograde

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/sky-fact \
  --header 'Content-Type: application/json' \
  --data-raw '{"kind":"retrograde","body":"Mercury","date":"2026-10-24","zone":"America/New_York"}'
~~~

Documented citation digest: `sha256:ea86f4751db3f355fa4e2e4d03a565774cf2c6893366496972553b76bd6cd358`.

### sky-fact.phase: Is there a full moon on a date, in every zone?

POST /api/v1/sky-fact, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=sky-fact.phase

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/sky-fact \
  --header 'Content-Type: application/json' \
  --data-raw '{"kind":"phase","phase":"full","date":"2026-10-26"}'
~~~

Documented citation digest: `sha256:d6bf32e043b5a792cb1c7410592b8c24a443b6749d6fa89073730c3677d901db`.

### sky-fact.sign: Is the Moon in Aries at an instant?

POST /api/v1/sky-fact, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=sky-fact.sign

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/sky-fact \
  --header 'Content-Type: application/json' \
  --data-raw '{"kind":"sign","body":"Moon","sign":"aries","instant":"2026-09-29T12:00:00Z"}'
~~~

Documented citation digest: `sha256:8c0112fb50b859f7020b1ae4cb2d96db2ee6a26e92111a4e9274536c598978c4`.

### sky-fact.aspect: Is the Moon trine Saturn on a date in a zone? The aspect begins that morning.

POST /api/v1/sky-fact, documented status 200. Open it: https://zodiacs.org/developers/playground/?example=sky-fact.aspect

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/sky-fact \
  --header 'Content-Type: application/json' \
  --data-raw '{"kind":"aspect","body":"Moon","other":"Saturn","aspect":"trine","date":"2026-10-14","zone":"Europe/London"}'
~~~

Documented citation digest: `sha256:51a86f2bfa27f2a36df3665eea3da9bacf21829d0c270eb064045640aa3353ac`.

## Refusals a body provokes

### chart.invalid-request: Refused: a latitude at a pole

POST /api/v1/chart, documented status 400. Open it: https://zodiacs.org/developers/playground/?example=chart.invalid-request

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/chart \
  --header 'Content-Type: application/json' \
  --data-raw '{"utc":"2000-01-01T12:00:00Z","latitude":90,"longitude":0}'
~~~

### chart.invalid-json: Refused: a body that is not JSON

POST /api/v1/chart, documented status 400. Open it: https://zodiacs.org/developers/playground/?example=chart.invalid-json

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/chart \
  --header 'Content-Type: application/json' \
  --data-raw '{"utc": '
~~~

### events.budget-exhausted: Refused: an events window longer than 92 days

POST /api/v1/events, documented status 422. Open it: https://zodiacs.org/developers/playground/?example=events.budget-exhausted

~~~sh
curl --silent --show-error https://zodiacs.org/api/v1/events \
  --header 'Content-Type: application/json' \
  --data-raw '{"from":"2026-01-01T00:00:00Z","to":"2026-07-01T00:00:00Z"}'
~~~
