> For the complete documentation index, see [llms.txt](https://docs.autocontentapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autocontentapi.com/quick-start/quizzes/from-topic.md).

# Create a Quiz from a Topic Prompt

Let the service research a topic and build quiz questions automatically. Provide a `topic` and optional `text` for extra guidance.

```bash
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outputType": "quiz",
    "topic": "Trends in renewable energy storage",
    "text": "Write 10 questions aimed at college-level students.",
    "quizDifficulty": "medium"
  }'
```

**Tips**

* Add `text` to define audience and tone.
* Use `quizDifficulty` to adjust how challenging the questions are.

## Try it in code

* [C#](/code-samples/quizzes/csharp/from-topic.md)
* [Node.js](/code-samples/quizzes/nodejs/from-topic.md)
* [Java](/code-samples/quizzes/java/from-topic.md)
* [PHP](/code-samples/quizzes/php/from-topic.md)
* [Python](/code-samples/quizzes/python/from-topic.md)
