> 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/explainer-videos/from-custom-script.md).

# Create from a Custom Script

Provide a complete script marked with speaker labels (`SPEAKER_00`, `SPEAKER_01`, ...) to control every line in your video. Send it through the standard creation endpoint via the `text` field.

```bash
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outputType": "video",
    "format": "short",
    "voice1": 13,
    "voice2": 45,
    "text": "SPEAKER_00: Welcome back!\nSPEAKER_01: Today we dig into productivity hacks..."
  }'
```

**Tips**

* Keep each line prefixed with `SPEAKER_00:` or `SPEAKER_01:` so the service can match voices.
* Add optional `voice1` / `voice2` fields when you need precise host selection. These must be numeric IDs from `/content/GetVoices`; do not send voice names.
* Scripts over 5,000 characters may be rejected—split longer pieces into multiple videos.

## Try it in code

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