---
title: "Generate Topic Content"
method: POST
path: "/admin/topics/{topic_id}/generate"
tags: ["admin"]
---

# Generate Topic Content

`POST /admin/topics/{topic_id}/generate`

Generate content for a topic using AI.

## Path parameters

- `topic_id` string, required — The ID of the topic to generate content for

## Request body

- GenerateContentRequest
  - `content_type` 'course' | 'exercise' | 'correction' | 'exercise_correction' | 'all', required
  - `custom_prompt` string

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/8d495ed916c6/schema)
