# Set Podcast Duration

Control the target length of the generated episode by sending `duration`. The service supports `short`, `default`, and `long` presets.

```bash
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outputType": "audio",
    "resources": [
      { "type": "youtube", "content": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
    ],
    "text": "Summarize the key arguments in plain language.",
    "duration": "short"
  }'
```

**Key fields**

* `duration`: One of `short`, `default`, or `long`.
* `resources`: Combine any supported source types; YouTube is shown here.
* `text`: Use instructions to steer tone or focus.

## Try it in code

* [C#](/code-samples/podcasts/csharp/set-duration.md)
* [Node.js](/code-samples/podcasts/nodejs/set-duration.md)
* [Java](/code-samples/podcasts/java/set-duration.md)
* [PHP](/code-samples/podcasts/php/set-duration.md)
* [Python](/code-samples/podcasts/python/set-duration.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/podcasts/set-duration.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.
