---
title: "`GET /styles/{spec}`: a compiled MapLibre style."
method: GET
path: "/styles/{spec}"
tags: ["styles"]
---

# \`GET /styles/{spec}\`: a compiled MapLibre style.

`GET /styles/{spec}`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/styles/{spec}`
- Auth: none declared

`spec` is `<id>@<version>.json` for an immutable version (cached
forever) or `<id>.json` for the latest (60 s TTL).

With `?api_key=snk_…`, the house basemap source is served as this
gateway's keyed TileJSON instead of the keyless tiles CDN, which refuses
browser pages outside mapmap.ai and localhost. The key is stamped the
same way the `/tiles` documents stamp it, so a website that loads a
hosted style with its key renders the basemap. Without a key in the
query the body is exactly as before.

## Path parameters

- `spec` string, required

## Query parameters

- `api_key` string
- `render` string

## Response `200`

The compiled MapLibre style (spec v8)

- object

## Other responses

- `404`: Hosted styles not configured, unknown style or version

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
