# Generate a mindmap from a topic **POST /mindmaps/generate** 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. ## Servers - Local development server: http://localhost:8080/api (Local development server) - Production server: https://api.huy-devops.site/api (Production server) ## Authentication methods - Bearer auth ## Parameters ### Body: application/json (object) - **topic** (string) The main topic or subject for the mindmap generation - **model** (string) The AI model to use for generation - **provider** (string) The AI service provider - **language** (string) The language for the mindmap content (ISO 639-1 code) - **maxDepth** (integer) Maximum depth of the mindmap branches (default 3) - **maxBranchesPerNode** (integer) Maximum number of branches per node (default 5) ## Responses ### 200 Mindmap generated successfully #### Body: application/json (object) - **success** (boolean) - **code** (integer(int32)) - **message** (string) - **data** (object) Response schema for mindmap generation with hierarchical structure ### 400 Bad Request - Invalid input data or malformed request #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) ### 401 Unauthorized - Invalid or missing authentication token #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) ### 500 Internal Server Error #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) [Powered by Bump.sh](https://bump.sh)