> 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/podcasts/set-duration.md).

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