Documentation menu
Offline territories
GET/territories/{id}/{version}/layers/{addr}/{file}
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused. |
|---|---|
| Price | 1 call per request. Class: standard. Published as unit_rules.default in /pricing.json. |
What it does
Unlike the small metadata routes, layer blobs are ~1 GB each, so they
are byte-metered against the calling identity's monthly download
allowance (DownloadMeter). Provisional keys are blocked (403);
operator (admin) keys, which carry no identity, are not metered.
Call it
bash
curl -fsS -X GET "https://api.mapmap.ai/territories/{id}/{version}/layers/{addr}/{file}" \
-H "Authorization: Bearer $MAPMAP_KEY"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Territory id |
| version | path | string | yes | Published package version |
| addr | path | string | yes | Blob address: 16 lowercase hex chars of the layer's BLAKE3 |
| file | path | string | yes | Blob file name, e.g. valhalla.tar.zst |
Responses
200The layer blob (tar + zstd)
206Partial content for a Range request
304Not modified
401No key, or a missing, malformed, unknown, revoked or expired one (
unauthorized); the body carries signup, docs and a one-call hint for a free keyapplication/problem+json · Problem
402Monthly offline-download allowance exhausted; body carries a machine-readable
download_allowance_exceeded upgrade pointer. Also: Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+jsonapplication/json
403Provisional key: territory downloads require a verified account. Also: The key may not call this: a browser key outside its scope (
scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)application/problem+json · Problem
404Unknown territory, version or blob
application/problem+json · Problem
416Unsatisfiable Range
application/problem+json · Problem
429Per-key rate limit (
rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)application/problem+json · Problem
504The request did not finish within the gateway's request deadline (
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Offline territories
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId get_layer