/api/v1/maps/static- Request credits
- 4
- Required scopes
maps
Current plan limits
Free includes Routing, Route Optimization, Geocoding and Matrix within plan limits, plus a limited Truck Routing trial. Map Matching, Isochrone, Fuel Estimate and other separate APIs require a paid plan. Road Data and AI have separate Business requirements.
Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.
Current plans and pricingUsage and limits
Four palettes: light, dark, navigation and minimal. Images are 128–512 px per side; zoom is 1–14. Simplified rendering includes source attribution; custom Studio layers and effects are not rendered.
Request example
Send your key in the Authorization: Bearer header. Coordinates use [longitude, latitude]. Set OSRM_API_KEY in your server environment; never expose a secret in browser code.
cURL
curl --fail-with-body -X POST "https://osrmroute.com/api/v1/maps/static" \
-H "Authorization: Bearer $OSRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"center":[13.405,52.52],"zoom":12,"width":512,"height":512,"style":"light"}' \
--output map.pngResponse
Content-Type: image/png