📸Studio
Rendered images of the sky
The studio endpoints render an image and return a URL to it. Both take the same observer and time, and differ only in what they draw.
What changed from v2
time sits beside observer, not inside it. v2 nested date within the observer object. A moment is not a property of a place, and every other endpoint treats them separately.
Elevation is accepted. v2's studio endpoints took only latitude and longitude and assumed sea level.
✨ Star Chart
Renders a chart of the sky as seen from the observer's location at a given instant, and returns a URL to the image.
The chart can be framed either on a point in the sky, with a zoom level, or on a named constellation.
The application key, sent as Authorization: Bearer <key>. Keys are
never accepted in the query string, where they would be recorded in
logs and browser history.
What the studio endpoints share. time sits beside observer
rather than inside it as v2 had it; a moment is not a property of a
place.
pngPossible values: Named visual theme.
defaultThe rendered image.
The request could not be parsed.
The application key was missing or not recognised.
The request was understood but a parameter was unacceptable.
POST /api/v3/studio/star-chart HTTP/1.1
Host: api.astronomyapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 217
{
"observer": {
"latitude": 1,
"longitude": 1,
"elevation": 1
},
"time": "2026-01-01T00:00:00.000Z",
"format": "png",
"style": "default",
"view": {
"type": "text",
"parameters": {
"zoom": 3,
"position": {
"rightAscension": 1,
"declination": 1
}
}
}
}{
"data": {
"imageUrl": "https://example.com"
}
}A chart can be framed either on a point in the sky with a zoom level, or on a named constellation.
v2 wrapped the position in a further equatorial object. There is only one frame involved, so v3 does not.
🌒 Moon Phase
Renders the Moon as it appears from the observer's location at a given instant, and returns a URL to the image.
The application key, sent as Authorization: Bearer <key>. Keys are
never accepted in the query string, where they would be recorded in
logs and browser history.
What the studio endpoints share. time sits beside observer
rather than inside it as v2 had it; a moment is not a property of a
place.
pngPossible values: The rendered image.
The request could not be parsed.
The application key was missing or not recognised.
The request was understood but a parameter was unacceptable.
POST /api/v3/studio/moon-phase HTTP/1.1
Host: api.astronomyapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 286
{
"observer": {
"latitude": 1,
"longitude": 1,
"elevation": 1
},
"time": "2026-01-01T00:00:00.000Z",
"format": "png",
"view": {
"type": "portrait-simple",
"orientation": "north-up"
},
"style": {
"moonStyle": "sketch",
"backgroundStyle": "stars",
"backgroundColor": "text",
"headingColor": "text",
"textColor": "text"
}
}{
"data": {
"imageUrl": "https://example.com"
}
}Notes
Images are cached. An identical request returns the same URL without re-rendering.
format accepts png or svg, and defaults to png.
Last updated