---
title: "Generate a style from a text description"
method: POST
path: "/styles/intent"
tags: ["cartography"]
---

# Generate a style from a text description

`POST /styles/intent`

## Request

- Base URL: `https://api.mapsource.io`
- URL: `https://api.mapsource.io/styles/intent`
- Auth: HTTP bearer

Converts text into a semantic manifest and compiled style. Returns matched vocabulary, applied changes, the bundle hash, and validation results.

When to use: Create an initial basemap style from a description, then review the proposed manifest.

When not to use: Use compileStyle for an existing manifest or explicit property changes.

## Request body

- object
  - `intent` string, required: Text description of the desired basemap style.
  - `base` 'light' | 'dark' | 'operations' | 'solarized-light' | 'solarized-dark' | 'mapsource': Preset to build on. Defaults to one the intent implies.
  - `save` boolean: Save the result as a profile revision on this key.
  - `name` string: Profile name when saving.
  - `slug` string: Profile slug when saving.
  - `include` 'style': style also returns the compiled MapLibre document.

## Response `200`

Generate a style from a text description

- object
  - `schema` string
  - `intent` string
  - `base` string
  - `understood` boolean
  - `effects` object[]
    - `term` string
    - `rationale` string
    - `paths` string[]
  - `vocabulary` string[]
  - `patch` object
  - `manifest` object
  - `hash` string
  - `provenance` object
  - `issues` unknown[]
    - unknown
  - `profile` object

## Other responses

- `400`: Error with a stable machine code.
- `401`: Error with a stable machine code.
- `429`: Error with a stable machine code.
- `500`: Error with a stable machine code.

---

[API](https://skmtc.dev/mapsource/apis/mapsource-overpass-api.md) · [All operations](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/revisions/8af8c2769e7b?raw)
