create_style
Create a hosted map style. Provide a name, optionally a named base to start from (light, dark, streets, midnight, navigator-day, navigator-night, fleet, outdoor, dataviz, backdrop, print - call list_style_layers for what each one is for), and optionally a theme document ({base: "light"|"dark", palette: {slot: colour}, layers: {layer_id: overrides}}). The named base is laid down first and the theme document is merged over it, so "streets with darker water" is one call; with neither, the style starts from the default theme. A theme may also set worldview (ISO 3166-1 alpha-2, accepted: AE, KR, SA, US) to display that jurisdiction's official names for a small curated registry of renamed features; omitted, labels keep the OSM on-the-ground names. Returns the generated style_id (pass it to set_palette / set_layer_paint) and the compiled style URL for MapLibre.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Optional named base to start from, e.g. "streets", "midnight", "navigator-night", "fleet". Call `list_style_layers` for the catalogue, including which bases expect an overlay of their own. The base's whole document is laid down first and `theme` is merged over it, so a base plus two palette entries is a complete style. Omitted, the style starts from the default light theme as it always did. | |
| name | Yes | Human-readable style name; its kebab-case slug seeds the style id. | |
| theme | No | Optional theme document (palette/layer overrides). Merged over `base` when one is given; on its own, it replaces the default theme outright. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| theme | Yes | The theme document that was stored. | |
| version | Yes | The published version (always 1 on create). | |
| style_id | Yes | The generated style id — pass it to `set_palette`, `set_layer_paint` and `get_style`. | |
| style_url | Yes | Immutable URL of the compiled style at this version. |