For the complete documentation index, see llms.txt. This page is also available as Markdown.

📸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

Render a star chart

post

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.

Authorizations
AuthorizationstringRequired

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.

Body

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.

timestring · date-timeRequired
formatstring · enumOptionalDefault: pngPossible values:
stylestringOptional

Named visual theme.

Example: default
viewone ofRequired
or
Responses
200

The rendered image.

application/json
post/studio/star-chart
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

Render the Moon's phase

post

Renders the Moon as it appears from the observer's location at a given instant, and returns a URL to the image.

Authorizations
AuthorizationstringRequired

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.

Body

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.

timestring · date-timeRequired
formatstring · enumOptionalDefault: pngPossible values:
Responses
200

The rendered image.

application/json
post/studio/moon-phase
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