Generate Map Endpoint
POST
/ai/generate-map/
const url = 'https://example.com/ai/generate-map/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"language":"example","prompt":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/ai/generate-map/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "language": "example", "prompt": "example" }'Generate a map from a natural language prompt using an LLM.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
MapGenerateResponse
object
datasets_used
required
Datasets Used
Array<string>
explanation
required
Explanation
string
map_id
required
Map Id
string
map_name
required
Map Name
string
Example generated
{ "datasets_used": [ "example" ], "explanation": "example", "map_id": "example", "map_name": "example"}Bad request — invalid query parameters or payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks access to this resource
Media type application/problem+json
Not found
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Bad gateway — an upstream provider failed
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json