osrmroute-com Text-to-style preview API
The Text-to-style preview API from osrmroute-com — 1 operation(s) for text-to-style preview.
The Text-to-style preview API from osrmroute-com — 1 operation(s) for text-to-style preview.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/osrmroute-com:osrmroute-com-text-to-style-preview-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OSRMRoute Text-to-style preview API
version: 1.1.0
description: 'OSRMRoute — Maps, Routing, Truck Routing, Search, Road Data, Studio and integration APIs. Use `Authorization: Bearer ` unless an operation documents another flow. Legacy APIs also accept the key query parameter; New geospatial APIs, MCP and private map delivery require Bearer authentication. Mobile challenge/token endpoints use device attestation instead. Coordinates and units are documented per operation: GeoJSON uses longitude,latitude; some legacy and background-job inputs use latitude,longitude. Examples are illustrative, not guaranteed current results. Guides · Mobile Access · MCP · Postman collection.'
contact:
name: OSRMRoute Support
url: https://osrmroute.com/contact
email: support@osrmroute.com
termsOfService: https://osrmroute.com/terms
servers:
- url: https://osrmroute.com
security:
- bearerAuth: []
- apiKeyQuery: []
tags:
- name: Text-to-style preview
paths:
/api/v1/studio/preview:
post:
tags:
- Text-to-style preview
operationId: previewTextStyle
summary: Preview style commands
description: 'ai=true enables Business AI (1,000 shared operations/month, maximum prompt 1,000 characters; 500 otherwise). Preview uses one AI operation and zero API credits. Requires provider activation. Explicit studio scope. Zero credits; five requests per minute. Semicolon-separated English commands: dark; water #123456; hide buildings. Presets, palette colors and layer visibility only. Does not save or publish. Omitted design starts with the default design.'
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
prompt:
type: string
minLength: 1
maxLength: 1000
ai:
type: boolean
default: false
design:
type: object
properties:
preset:
type: string
enum:
- light
- dark
- navigation
- minimal
colors:
type: object
properties:
land:
type: string
pattern: ^#[0-9a-fA-F]{6}$
water:
type: string
pattern: ^#[0-9a-fA-F]{6}$
park:
type: string
pattern: ^#[0-9a-fA-F]{6}$
road:
type: string
pattern: ^#[0-9a-fA-F]{6}$
highway:
type: string
pattern: ^#[0-9a-fA-F]{6}$
building:
type: string
pattern: ^#[0-9a-fA-F]{6}$
label:
type: string
pattern: ^#[0-9a-fA-F]{6}$
required:
- land
- water
- park
- road
- highway
- building
- label
visible:
type: object
properties:
roads:
type: boolean
buildings:
type: boolean
parks:
type: boolean
labels:
type: boolean
pois:
type: boolean
boundaries:
type: boolean
required:
- roads
- buildings
- parks
- labels
- pois
- boundaries
center:
type: array
minItems: 2
maxItems: 2
items:
type: number
description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
zoom:
type: number
minimum: 0
maximum: 20
overlays:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
enum:
- point
- line
- polygon
color:
type: string
visible:
type: boolean
coordinates:
type: array
items:
type: array
minItems: 2
maxItems: 2
items:
type: number
description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
required:
- id
- name
- type
- color
- visible
- coordinates
datasets:
type: array
items:
type: string
format: uuid
maxItems: 5
allowedOrigins:
type: array
items:
type: string
brand:
type: string
interactions:
type: object
properties:
search:
type: boolean
legend:
type: boolean
popups:
type: boolean
clustering:
type: boolean
required:
- search
- legend
- popups
categories:
type: object
description: Optional category styling configuration, as returned by Studio.
required:
- preset
- colors
- visible
- center
- zoom
- overlays
required:
- prompt
examples:
request:
value:
prompt: 'dark; water #123456; hide buildings'
ai: false
responses:
'200':
description: Success. Examples are illustrative; results vary with input and source data.
content:
application/json:
schema:
type: object
properties:
design:
type: object
properties:
preset:
type: string
enum:
- light
- dark
- navigation
- minimal
colors:
type: object
properties:
land:
type: string
pattern: ^#[0-9a-fA-F]{6}$
water:
type: string
pattern: ^#[0-9a-fA-F]{6}$
park:
type: string
pattern: ^#[0-9a-fA-F]{6}$
road:
type: string
pattern: ^#[0-9a-fA-F]{6}$
highway:
type: string
pattern: ^#[0-9a-fA-F]{6}$
building:
type: string
pattern: ^#[0-9a-fA-F]{6}$
label:
type: string
pattern: ^#[0-9a-fA-F]{6}$
required:
- land
- water
- park
- road
- highway
- building
- label
visible:
type: object
properties:
roads:
type: boolean
buildings:
type: boolean
parks:
type: boolean
labels:
type: boolean
pois:
type: boolean
boundaries:
type: boolean
required:
- roads
- buildings
- parks
- labels
- pois
- boundaries
center:
type: array
minItems: 2
maxItems: 2
items:
type: number
description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
zoom:
type: number
minimum: 0
maximum: 20
overlays:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
enum:
- point
- line
- polygon
color:
type: string
visible:
type: boolean
coordinates:
type: array
items:
type: array
minItems: 2
maxItems: 2
items:
type: number
description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
required:
- id
- name
- type
- color
- visible
- coordinates
datasets:
type: array
items:
type: string
format: uuid
maxItems: 5
allowedOrigins:
type: array
items:
type: string
brand:
type: string
interactions:
type: object
properties:
search:
type: boolean
legend:
type: boolean
popups:
type: boolean
clustering:
type: boolean
required:
- search
- legend
- popups
categories:
type: object
description: Optional category styling configuration, as returned by Studio.
required:
- preset
- colors
- visible
- center
- zoom
- overlays
changes:
type: array
items:
type: string
saved:
type: boolean
enum:
- false
method:
type: string
enum:
- explicit_style_commands
- ai_style_preview
required:
- design
- changes
- saved
- method
example:
design:
preset: dark
colors:
land: '#101c2b'
water: '#123456'
park: '#18382f'
road: '#40536a'
highway: '#6295b5'
building: '#26364b'
label: '#c7d9e9'
visible:
roads: true
buildings: false
parks: true
labels: true
pois: true
boundaries: true
center:
- 49.8671
- 40.4093
zoom: 11
overlays: []
changes:
- preset:dark
- colors.water:#123456
- visible.buildings:false
saved: false
method: explicit_style_commands
'400':
description: Invalid input. `invalid_query` Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
example:
error: invalid_query
code: invalid_query
problem_code: invalid_query
type: https://osrmroute.com/docs/platform#invalid_query
title: Request failed
status: 400
detail: invalid_query
instance: urn:uuid:00000000-0000-4000-8000-000000000001
request_id: 00000000-0000-4000-8000-000000000001
retryable: false
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'401':
description: Missing or invalid authentication. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'402':
description: Insufficient credits. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: Scope, account or plan restriction. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'404':
description: Resource not found. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'413':
description: Payload too large. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'422':
description: Request cannot be fulfilled. `unsupported_style_command` Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
example:
error: unsupported_style_command
code: unsupported_style_command
problem_code: unsupported_style_command
type: https://osrmroute.com/docs/platform#unsupported_style_command
title: Request failed
status: 422
detail: unsupported_style_command
instance: urn:uuid:00000000-0000-4000-8000-000000000001
request_id: 00000000-0000-4000-8000-000000000001
retryable: false
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'429':
description: Rate, quota or concurrency limit. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'502':
description: Invalid or unavailable upstream. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'503':
description: Service temporarily unavailable. See the returned error code. Failed operations are not charged.
content:
application/problem+json:
schema:
type: object
properties:
error:
type: string
code:
type: string
problem_code:
type: string
type:
type: string
format: uri
title:
type: string
status:
type: integer
minimum: 0
detail:
type: string
instance:
type: string
request_id:
type: string
format: uuid
retryable:
type: boolean
required:
- error
- code
- problem_code
- type
- title
- status
- detail
- instance
- request_id
- retryable
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
components:
securitySchemes:
apiKeyQuery:
type: apiKey
in: query
name: key
bearerAuth:
type: http
scheme: bearer