# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autocontentapi.com/quick-start/quizzes/from-topic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
