Generate a hierarchical mindmap structure from a given topic using AI. The endpoint creates a mindmap with a central concept and nested branches representing main ideas and sub-ideas.
Body
Required
-
The main topic or subject for the mindmap generation
Minimum length is
1, maximum length is500. -
The AI model to use for generation
Values are
gpt-4o,gpt-4-turbo,gpt-3.5-turbo,claude-3-opus,claude-3-sonnet, orclaude-3-haiku. -
The AI service provider
Values are
openai,anthropic, orgoogle. -
The language for the mindmap content (ISO 639-1 code)
Values are
en,vi,fr,es,de,ja, orzh. -
Maximum depth of the mindmap branches (default 3)
Minimum value is
1, maximum value is5. Default value is3. -
Maximum number of branches per node (default 5)
Minimum value is
1, maximum value is10. Default value is5.
curl \
--request POST 'https://api.huy-devops.site/api/mindmaps/generate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"model":"gpt-4o","topic":"Python Programming","language":"en","provider":"openai"}'
{
"model": "gpt-4o",
"topic": "Python Programming",
"language": "en",
"provider": "openai"
}
{
"model": "claude-3-sonnet",
"topic": "Web Development Fundamentals",
"language": "en",
"provider": "anthropic"
}
{
"code": 200,
"data": {
"content": "Python Programming",
"children": [
{
"content": "Core Concepts",
"children": [
{
"content": "Variables & Data Types"
},
{
"content": "Functions"
}
]
},
{
"content": "Advanced Topics",
"children": [
{
"content": "Decorators"
},
{
"content": "Async Programming"
}
]
}
]
},
"message": "Mindmap generated successfully",
"success": true
}
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2025-05-04T09:42:00Z"
}
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2025-05-04T09:42:00Z"
}
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2025-05-04T09:42:00Z"
}