Generate Map Endpoint
POST
/ai/generate-map/
const url = 'https://example.com/api/ai/generate-map/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"prompt":"example","language":"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/api/ai/generate-map/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "example", "language": "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
map_id
required
Map Id
string
map_name
required
Map Name
string
explanation
required
Explanation
string
datasets_used
required
Datasets Used
Array<string>
Example generated
{ "map_id": "example", "map_name": "example", "explanation": "example", "datasets_used": [ "example" ]}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}