Documentation menu
Search docs…⌘K

API reference

Static map image (JSON body, for long paths)

Same image as `GET /v1/staticmap`, with a JSON body (up to 2 MB). Pass `routes[0].geometry` from `/v1/route` unchanged as `paths[].polyline`.

Endpoint

POSThttps://api.wayline.cloud/v1/staticmap
Bearer Auth

Requires an API key (authentication). Product overview: Static Maps API (JSON body). Billing: see units & pricing.

Request body

JSON object (StaticMapRequest). Points accept "lat,lng" strings, {lat, lng} objects or [lat, lng] arrays.

Request body fields
FieldTypeDescription
widthintegerDefault: 600
heightintegerDefault: 400
scaleintegerOne of: 1, 2Default: 1
formatstringOne of: png, jpg, webpDefault: png
paddingintegerDefault: 48
centerPointFlexible coordinate input accepted as string, object, or array.
zoominteger
pathsobject[]
markersobject[]

Response

200 — PNG or WebP image.

Response headers

  • X-Request-Id — Unique identifier for tracking and debugging this request.
  • X-Units-Charged — Units billed (1).
  • X-Map-Zoom — Zoom used (fitted or given).
  • X-Map-Center — Center used, `lat,lng`.
  • X-Cache — `HIT` when served from the server-side image cache (billed the same).

Errors

StatusWhen
400Bad request (invalid coordinates, out of coverage, too many elements, etc.).
401Missing or invalid API key, or expired key.
402Free quota exhausted, no payment method, account suspended, or the monthly spend limit you set was reached. Never billed. Raise or remove the limit in the dashboard (Billing) and retry; nothing else changes.
403Account disabled, key IP restriction failed, origin not allowed, or scope not permitted.
429Rate limit exceeded or test key daily quota reached.
500Internal server error.
503Upstream routing service temporarily unavailable.

Error bodies contain a code such as OUT_OF_COVERAGE — see the error reference.

Try it

Interactive API Console

POST /v1/staticmap

Sends a real request from your browser using a test key (free, never billed). The key stays in this browser tab only.

No key yet? Create a free test key.

Was this page helpful?