# Terrains

> Canonical URL: https://docs.mountaya.com/en/apis/tiles/reference/terrains/
> Last updated: 2026-11-26
> Rules for agents: https://docs.mountaya.com/llms.txt#rules-for-agents

The base maps, their sources, sprites and glyphs, and the elevation raster, served through this API so a map draws its base map under the credential it sends here.

 Each route is an address a map renderer is handed and fetches on its own.

## The Terrain object

A built-in terrain: the base map itineraries and zones are drawn on, such as the summer topographic map or satellite imagery. `variants` carries its light and dark renditions, `locales` its display name per language.

- `id` (string (uuid), required): Identifier of the terrain. `slug` is the value a person reads; this is the one the catalog keys on.

- `locales` (object, required): The terrain's display name per language. Render from here rather than from `slug`: the slug is a stable identifier and is not translated.
  - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
  - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
  - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
  - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
  - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
  - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
  - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.

- `slug` (string, required): Stable, URL-safe identifier of the terrain. Unlike the display name in `locales`, it does not change between languages or releases. Lowercase letters, digits and single hyphens, the same shape every slug on this surface carries.

- `variants` (object, required): The light and dark renditions of this terrain. Both are always present, so a client follows the user's color scheme without fetching the catalog again.
  - `dark` (object, required): The rendition to draw under a dark color scheme.
    - `style` (object, required): This rendition as a complete map style document, for a client that renders the terrain as it is given.
      - `url` (string (uri), required): URL of the style document, ready to hand to a map renderer unmodified. Uncapped, unlike a URL a caller supplies: Mountaya issues this one, so there is no untrusted input for a ceiling to bound.
    - `tiles` (object, required): This rendition as a tile source alone, described by a TileJSON document, for a client composing a style of its own.
      - `size` (integer (int32), required, one of: `512`): The tile size to declare when this source is added to a map. Only one value is served, and declaring a different one offsets every zoom level.
      - `url` (string (uri), required): URL of the TileJSON document describing this rendition's tiles: where they are fetched from, their zoom range and their attribution. It is the Tile API's `getTerrainTileJson`, whose tile template is the Tile API's `getTerrainTile`, so the tiles are drawn under the credential a map sends there, and no URL carries a credential of Mountaya's. It is a resolvable address rather than a tile template, so register it as the source's `url` rather than among its `tiles`, and hand it to the map renderer unmodified. Uncapped, unlike a URL a caller supplies: Mountaya issues this one, so there is no untrusted input for a ceiling to bound.
  - `light` (object, required): The rendition to draw under a light color scheme.
    - `style` (object, required): This rendition as a complete map style document, for a client that renders the terrain as it is given.
      - `url` (string (uri), required): URL of the style document, ready to hand to a map renderer unmodified. Uncapped, unlike a URL a caller supplies: Mountaya issues this one, so there is no untrusted input for a ceiling to bound.
    - `tiles` (object, required): This rendition as a tile source alone, described by a TileJSON document, for a client composing a style of its own.
      - `size` (integer (int32), required, one of: `512`): The tile size to declare when this source is added to a map. Only one value is served, and declaring a different one offsets every zoom level.
      - `url` (string (uri), required): URL of the TileJSON document describing this rendition's tiles: where they are fetched from, their zoom range and their attribution. It is the Tile API's `getTerrainTileJson`, whose tile template is the Tile API's `getTerrainTile`, so the tiles are drawn under the credential a map sends there, and no URL carries a credential of Mountaya's. It is a resolvable address rather than a tile template, so register it as the source's `url` rather than among its `tiles`, and hand it to the map renderer unmodified. Uncapped, unlike a URL a caller supplies: Mountaya issues this one, so there is no untrusted input for a ceiling to bound.

### An example Terrain

```json
{
  "id": "cad23e29-49da-4009-9f99-63dbcd963dc0",
  "slug": "topo",
  "locales": {
    "de": null,
    "en": {
      "name": "Summer topo"
    },
    "es": null,
    "fr": {
      "name": "Topo été"
    },
    "it": null,
    "ja": null,
    "zh": null
  },
  "variants": {
    "light": {
      "style": {
        "url": "https://tiles.mountaya.com/v1/terrains/topo/light/style"
      },
      "tiles": {
        "url": "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json",
        "size": 512
      }
    },
    "dark": {
      "style": {
        "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/style"
      },
      "tiles": {
        "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/tiles.json",
        "size": 512
      }
    }
  }
}
```

## Retrieve a terrain rendition as a map style document

### GET /v1/terrains/{terrain}/{variant}/style

- Operation: `getTerrainStyle`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one rendition of a terrain, light or dark, as a complete map style document in the MapLibre Style Specification, ready to hand to a map renderer unmodified. It is the address the layer catalog answers under `terrains[].variants.<variant>.style.url`, so a client reads it from the catalog rather than writing it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's. Every source of the style that fetches tiles carries its `tiles` template on `getTerrainSourceTile` rather than a `url` of its own, its `sprite` names `getTerrainSprite` and its `glyphs` names `getTerrainGlyph`, each under the same terrain and rendition as the style. A source that names no address, such as the provider's attribution-only source, reaches a client as the provider wrote it.

The answer is the style document itself, not wrapped in this API's envelope, because a renderer reads it as it arrives. This route is consumed as an address handed to a map renderer rather than called directly, so the generated SDKs bind no method for it.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200`

The style document, with every source, sprite and glyph address on this API.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the style document itself, not an envelope.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/style" \
  -H "X-API-Key: pk_your_publishable_key" | jq '{version, sprite, glyphs, sources: (.sources | keys)}'
```

**TypeScript**

```typescript
// Hand this URL to your map library: it cannot set a header, so the credential rides the query.
const url = `https://tiles.mountaya.com/v1/terrains/topo/light/style?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/style",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

Response 200:

```json
{
  "version": 8,
  "name": "Summer topo",
  "sources": {
    "topo-planet": {
      "type": "vector",
      "tiles": [
        "https://tiles.mountaya.com/v1/terrains/topo/light/sources/topo-planet/{z}/{x}/{y}"
      ],
      "minzoom": 0,
      "maxzoom": 14,
      "attribution": "<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>"
    }
  },
  "sprite": "https://tiles.mountaya.com/v1/terrains/topo/light/sprites/sprite",
  "glyphs": "https://tiles.mountaya.com/v1/terrains/topo/light/glyphs/{fontstack}/{range}.pbf",
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": {
        "background-color": "#f8f4f0"
      }
    }
  ]
}
```

## Retrieve a terrain rendition as a TileJSON tile source

### GET /v1/terrains/{terrain}/{variant}/tiles.json

- Operation: `getTerrainTileJson`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one rendition of a terrain, light or dark, as a raster tile source described by a TileJSON document, for a client composing a style of its own rather than drawing the terrain's. It is the address the layer catalog answers under `terrains[].variants.<variant>.tiles.url`, so a client reads it from the catalog rather than writing it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's. The document's `tiles` template is `getTerrainTile`.

The answer is the TileJSON document itself, not wrapped in this API's envelope, because a renderer reads it as it arrives. This route is consumed as an address handed to a map renderer rather than called directly, so the generated SDKs bind no method for it.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200`

The TileJSON document, its `tiles` template on this API.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the TileJSON document itself, not an envelope.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json" \
  -H "X-API-Key: pk_your_publishable_key" | jq '{tiles, minzoom, maxzoom}'
```

**TypeScript**

```typescript
// Hand this URL to your map library: it cannot set a header, so the credential rides the query.
const url = `https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

Response 200:

```json
{
  "tilejson": "2.0.0",
  "tiles": [
    "https://tiles.mountaya.com/v1/terrains/topo/light/{z}/{x}/{y}"
  ],
  "minzoom": 0,
  "maxzoom": 22,
  "bounds": [
    -180,
    -85.0511,
    180,
    85.0511
  ],
  "attribution": "<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>"
}
```

## Retrieve a raster tile of a terrain rendition

### GET /v1/terrains/{terrain}/{variant}/{z}/{x}/{y}

- Operation: `getTerrainTile`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one raster tile of a terrain rendition at the given zoom level, x and y coordinates, as an image whose format the `Content-Type` header says. It is the `tiles` template of the rendition's TileJSON document, `getTerrainTileJson`, with the `{z}`, `{x}` and `{y}` placeholders intact, and a map library expands and fetches it on its own schedule, so the generated SDKs bind no method for it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

- `z` (integer (int32), in path, required): Zoom level. Higher values show more detail over a smaller area. On a publishable-key request for anything but the base map (a terrain's tiles, the tiles of the sources its style draws and the elevation raster's), the organization's zoom-bounds safety rule narrows the accepted range, and a `z` outside it is a 400 naming `z`, so a structurally valid value can still be refused. Each layer's `zoom_min` and `zoom_max` in the specification say where a map should ask for tiles; they are not a refusal. A specification served to a publishable key reports them already narrowed to that rule, so a map that follows it asks only for a `z` the rule accepts.

- `x` (integer (int32), in path, required): Tile column index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `x`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

- `y` (integer (int32), in path, required): Tile row index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `y`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200` `image/png`, `image/jpeg`, `image/webp`

The tile, as a PNG (`image/png`), a JPEG (`image/jpeg`) or a WebP (`image/webp`) image, as the `Content-Type` header says.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug, or the rendition holds no tile at those coordinates: a square past the zoom range or outside the bounds its TileJSON document declares, which a renderer that follows that document never asks for, or a square inside them that the provider holds no tile on, in whose place a renderer draws the parent tile. The tile coordinates are checked before the slug, so a request failing them is a `400` even when the slug names no terrain.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the tile's bytes, not JSON.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/12/2126/1458" \
  -H "X-API-Key: pk_your_publishable_key" -o tile.png
```

**TypeScript**

```typescript
// A map library requests each tile itself and cannot set a header, so the credential rides the query.
const tiles = `https://tiles.mountaya.com/v1/terrains/topo/light/{z}/{x}/{y}?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/12/2126/1458",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
with open("tile.png", "wb") as file:
    file.write(response.content)
```

## Retrieve a terrain rendition's sprite index or sprite sheet

### GET /v1/terrains/{terrain}/{variant}/sprites/{sprite_file}

- Operation: `getTerrainSprite`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one of the four sprite files of a terrain rendition: `sprite.json`, the index of the icons the style draws, `sprite.png`, the sheet they are cut from, and `sprite@2x.json` and `sprite@2x.png`, the same at twice the pixel density. A map renderer derives all four from the `sprite` address of the terrain's style, `getTerrainStyle`, and fetches the ones the screen needs on its own, so the generated SDKs bind no method for it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

- `sprite_file` (string, in path, required): The sprite file a map renderer asks for: `sprite.json` and `sprite.png`, the index and the sheet of the terrain's icons, or `sprite@2x.json` and `sprite@2x.png`, the same at twice the pixel density. A renderer derives all four from the `sprite` URL of the terrain's style, so read them from there rather than writing them. Any other name is a `400` naming `sprite_file`.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200`

The sprite index (`application/json`) for a `.json` file, or the sprite sheet (`image/png`) for a `.png` one.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug, or the rendition's style names no sprite.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# An index is JSON, a sheet a PNG.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/sprites/sprite@2x.json" \
  -H "X-API-Key: pk_your_publishable_key" | jq 'keys | length'
```

**TypeScript**

```typescript
// Hand this URL to your map library: it cannot set a header, so the credential rides the query.
const url = `https://tiles.mountaya.com/v1/terrains/topo/light/sprites/sprite%402x.json?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/sprites/sprite@2x.json",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
with open("download", "wb") as file:
    file.write(response.content)
```

Response 200:

```json
{
  "mountain_peak": {
    "x": 0,
    "y": 0,
    "width": 15,
    "height": 15,
    "pixelRatio": 1
  }
}
```

## Retrieve a tile of a source a terrain rendition's style draws

### GET /v1/terrains/{terrain}/{variant}/sources/{terrain_source}/{z}/{x}/{y}

- Operation: `getTerrainSourceTile`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one tile of one of the sources a terrain rendition's style draws from, vector or raster, at the given zoom level, x and y coordinates. It is the `tiles` template every source of `getTerrainStyle` that fetches tiles carries, under the same terrain and rendition as the style, with the `{z}`, `{x}` and `{y}` placeholders intact, and a map renderer expands and fetches it on its own schedule, so the generated SDKs bind no method for it.

A vector source answers a Mapbox Vector Tile (`application/x-protobuf`), and a raster one an image, as the `Content-Type` header says. A zero-length vector tile is a valid empty one, and is the answer for a square inside the source's range that the source holds nothing on.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

- `terrain_source` (string, in path, required): The identifier of one of the tile sources the rendition's style draws from, as the `tiles` URL template of that source in the style names it. The set follows the terrains and changes with them, so read it from the style rather than writing it. An identifier the rendition's style does not name is a `404`, even when another terrain's style names it.

- `z` (integer (int32), in path, required): Zoom level. Higher values show more detail over a smaller area. On a publishable-key request for anything but the base map (a terrain's tiles, the tiles of the sources its style draws and the elevation raster's), the organization's zoom-bounds safety rule narrows the accepted range, and a `z` outside it is a 400 naming `z`, so a structurally valid value can still be refused. Each layer's `zoom_min` and `zoom_max` in the specification say where a map should ask for tiles; they are not a refusal. A specification served to a publishable key reports them already narrowed to that rule, so a map that follows it asks only for a `z` the rule accepts.

- `x` (integer (int32), in path, required): Tile column index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `x`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

- `y` (integer (int32), in path, required): Tile row index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `y`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200` `application/x-protobuf`, `image/png`, `image/jpeg`, `image/webp`

The tile: a Mapbox Vector Tile (`application/x-protobuf`) for a vector source, or a PNG (`image/png`), JPEG (`image/jpeg`) or WebP (`image/webp`) image for a raster one, as the `Content-Type` header says. A square inside the vector source's range that it holds nothing on, open sea or past the poles, is a zero-length vector tile.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug, the rendition's style does not name that source, or the source holds no tile at those coordinates: a square past the zoom range or outside the bounds the style declares for it, which a renderer that follows the style never asks for, or, for a raster or raster-dem source, a square inside them that the provider holds no tile on, in whose place a renderer draws the parent tile. A vector source's square of that kind is a zero-length tile instead. The tile coordinates are checked before the terrain and the source, so a request failing them is a `400` even when neither is published.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the tile's bytes, not JSON. Read the source identifier from the
# style's `sources` rather than writing it.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/sources/topo-planet/12/2126/1458" \
  -H "X-API-Key: pk_your_publishable_key" -o tile.mvt
```

**TypeScript**

```typescript
// A map library requests each tile itself and cannot set a header, so the credential rides the query.
const tiles = `https://tiles.mountaya.com/v1/terrains/topo/light/sources/topo-planet/{z}/{x}/{y}?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/sources/topo-planet/12/2126/1458",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
with open("tile.mvt", "wb") as file:
    file.write(response.content)
```

## Retrieve a range of glyphs for a terrain style's labels

### GET /v1/terrains/{terrain}/{variant}/glyphs/{fontstack}/{glyph_range}

- Operation: `getTerrainGlyph`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns the glyphs of one font stack for a block of 256 Unicode code points, as the protocol-buffer glyph format a map renderer draws text with. It is the `glyphs` template every terrain style, `getTerrainStyle`, carries, under the same terrain and rendition as the style, and a renderer expands it with the font stack and the code-point range each label needs and fetches it on its own, so the generated SDKs bind no method for it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `terrain` (string, in path, required): Terrain slug, such as `topo` or `winter`. It is the `slug` this API's `getTileLayers`, and the Map Studio API's `getLayers`, report for each terrain, and it carries that field's shape exactly: lowercase letters, digits and single hyphens. A slug the catalog does not list is a `404`. Every terrain the catalog lists is served to every credential this API takes: a base map carries no organization's data, so no safety rule narrows which terrain is drawn.

- `variant` (string, in path, required, one of: `light`, `dark`): The rendition of the terrain: `light` for a light color scheme, `dark` for a dark one. Every terrain the catalog lists publishes both.

- `fontstack` (string, in path, required): The font stack a style's text layer names under `text-font`, its fonts joined by commas, as a map renderer puts it in the `glyphs` URL template of the terrain's style. A rendition publishes a stack when each of its fonts is one the rendition's style names under `text-font`, or one of the fonts a map renderer asks for a text layer that names none (`Open Sans Regular` and `Arial Unicode MS Regular`). A stack naming any other font is a `404`, even when another terrain's style names it.

- `glyph_range` (string, in path, required): The block of 256 Unicode code points the glyphs are asked for, as a map renderer writes it into the `glyphs` URL template: its first and last code points joined by a hyphen, with the `.pbf` extension, such as `0-255.pbf` or `256-511.pbf`. A block that does not start at a multiple of 256 and end 255 later, or one past `65280-65535.pbf`, is a `400` naming `glyph_range`.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200` `application/x-protobuf`

The glyph range, as protocol-buffer bytes (`application/x-protobuf`).

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: No terrain is published under that slug, or the stack names a font the rendition does not publish: one its style does not name under `text-font`, and not one of the fonts a map renderer asks for a text layer that names none.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the glyph range's bytes, not JSON. The font stack is URL-encoded.
curl -s "https://tiles.mountaya.com/v1/terrains/topo/light/glyphs/Noto%20Sans%20Regular/0-255.pbf" \
  -H "X-API-Key: pk_your_publishable_key" -o 0-255.pbf
```

**TypeScript**

```typescript
// Hand this URL to your map library: it cannot set a header, so the credential rides the query.
const url = `https://tiles.mountaya.com/v1/terrains/topo/light/glyphs/Noto%20Sans%20Regular/0-255.pbf?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/terrains/topo/light/glyphs/Noto%20Sans%20Regular/0-255.pbf",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
with open("0-255.pbf", "wb") as file:
    file.write(response.content)
```

## Retrieve the elevation raster as a TileJSON tile source

### GET /v1/elevation/tiles.json

- Operation: `getElevationTileJson`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns the elevation raster a renderer reads heights out of as a `raster-dem` source described by a TileJSON document, with the `encoding` its pixels are decoded with. It is the address the layer catalog answers under `elevation.url`, so a client reads it from the catalog rather than writing it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's. The document's `tiles` template is `getElevationTile`.

The answer is the TileJSON document itself, not wrapped in this API's envelope, because a renderer reads it as it arrives. This route is consumed as an address handed to a map renderer rather than called directly, so the generated SDKs bind no method for it.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200`

The TileJSON document, its `tiles` template on this API.

**Errors** `400`, `401`, `402`, `403`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the TileJSON document itself, not an envelope.
curl -s "https://tiles.mountaya.com/v1/elevation/tiles.json" \
  -H "X-API-Key: pk_your_publishable_key" | jq '{tiles, encoding, maxzoom}'
```

**TypeScript**

```typescript
// Hand this URL to your map library: it cannot set a header, so the credential rides the query.
const url = `https://tiles.mountaya.com/v1/elevation/tiles.json?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/elevation/tiles.json",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

Response 200:

```json
{
  "tilejson": "2.0.0",
  "tiles": [
    "https://tiles.mountaya.com/v1/terrains/topo/light/{z}/{x}/{y}"
  ],
  "minzoom": 0,
  "maxzoom": 22,
  "bounds": [
    -180,
    -85.0511,
    180,
    85.0511
  ],
  "attribution": "<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>"
}
```

## Retrieve a tile of the elevation raster

### GET /v1/elevation/{z}/{x}/{y}

- Operation: `getElevationTile`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns one tile of the elevation raster at the given zoom level, x and y coordinates: an image whose pixels encode height rather than colour, in the `encoding` the elevation TileJSON document, `getElevationTileJson`, names. It is that document's `tiles` template, with the `{z}`, `{x}` and `{y}` placeholders intact, and a map renderer expands and fetches it on its own schedule, so the generated SDKs bind no method for it.

Mountaya fetches it from its base-map provider and answers it with every address it holds rewritten to point at this API, so a map renderer reaches the whole base map here, under the credential it sends here, and no answer carries a credential of Mountaya's.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain, exactly as an overlay tile does. A share token carries its own authority and needs none. A session token beside the key changes nothing about what is served: a base map is the same for every caller.

Recorded as the organization's Tile API usage under the resource type `terrain`, on the surface the request comes from, and never counted toward the organization's per-minute limit or its monthly allowance: a base map is the frame every other layer is drawn in, and drawing it is Mountaya's cost rather than the organization's, so a spent monthly allowance never refuses it either. One bound holds it instead, on every surface and in place of the surface's others: 6,000 a minute per client IP address, policy `"address"`, and a request past it is a `429` with `Retry-After`. The organization's zoom bounds and geographic boundaries do not apply to it.

**Path parameters**

- `z` (integer (int32), in path, required): Zoom level. Higher values show more detail over a smaller area. On a publishable-key request for anything but the base map (a terrain's tiles, the tiles of the sources its style draws and the elevation raster's), the organization's zoom-bounds safety rule narrows the accepted range, and a `z` outside it is a 400 naming `z`, so a structurally valid value can still be refused. Each layer's `zoom_min` and `zoom_max` in the specification say where a map should ask for tiles; they are not a refusal. A specification served to a publishable key reports them already narrowed to that rule, so a map that follows it asks only for a `z` the rule accepts.

- `x` (integer (int32), in path, required): Tile column index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `x`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

- `y` (integer (int32), in path, required): Tile row index at the given zoom level, from 0 to 2^z - 1 inclusive. An index at or past 2^z addresses no tile and is a `400` naming `y`, as a negative or non-integer one is, so an index computed wrongly is refused before anything is drawn or fetched for it.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200` `image/webp`, `image/png`

The tile, as a WebP (`image/webp`) or PNG (`image/png`) image, as the `Content-Type` header says.

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. No overlay allowlist and no overlay time control applies here: a base map is not an overlay.
- `404`: The raster holds no tile at those coordinates: a square past the zoom range or outside the bounds its TileJSON document declares, which a renderer that follows that document never asks for, or a square inside them that the provider holds no tile on, in whose place a renderer draws the parent tile.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
# The body is the tile's bytes, not JSON.
curl -s "https://tiles.mountaya.com/v1/elevation/12/2126/1458" \
  -H "X-API-Key: pk_your_publishable_key" -o elevation.webp
```

**TypeScript**

```typescript
// A map library requests each tile itself and cannot set a header, so the credential rides the query.
const tiles = `https://tiles.mountaya.com/v1/elevation/{z}/{x}/{y}?publishable_key=${publishableKey}`;
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/elevation/12/2126/1458",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
with open("elevation.webp", "wb") as file:
    file.write(response.content)
```

**Error answers the operations of this page share**

- `TooManyRequests` (`429`): A bound the request's surface is held to is spent: for the organization's own clients and its hosted embed, the organization's per-minute limit or its monthly allowance, or, under a key sent without a session token or with one minted without `user_id`, the bound on the client's IP address, an IPv6 address counted by its `/64` prefix; for an Embedded Studio, the bound of the member its session names, or of its client IP address for a session minted without `user_id`, or its organization's; for a share link, the bound on the client's IP address or the bound of the organization that owns the link; for Mountaya's web application, the 6,000 a minute of the person signed in to it, which carries no rate-limit fields. Or the client's IP address has had 60 unknown share tokens refused within the minute, or 60 unknown publishable keys, a key refused again within seconds counted once, and the token or the key it sends was not resolved moments earlier. Every one carries `Retry-After`: for a per-minute bound, the seconds left in the minute; for a spent monthly allowance, the whole seconds until the organization's next billing period begins, until which every request of the organization's own clients and of its hosted embed, specifications included, is refused; for a share token or a publishable key refused because its address had 60 unknown ones refused, the seconds left in that minute. A share token or a publishable key resolved moments earlier is never refused that last way. `RateLimit-Policy` and `RateLimit` say which bound was spent, except on the refusal of an unknown share token or of an unknown publishable key, which no bound of the organization's counts: that answer carries no `RateLimit-Policy` or `RateLimit` field.
