---
title: "Narrated TikTok Video via API Prompt for Cursor"
description: "A prompt for your coding agent that picks a voice, makes a narrated slideshow video with the PostQueen API and saves it as a TikTok draft. With a sample."
canonical_url: "https://postqueen.ai/prompts/a-video-from-code"
markdown_url: "https://postqueen.ai/prompts/a-video-from-code.md"
last_updated: "2026-09-25"
llms_txt: "https://postqueen.ai/llms.txt"
---

# Make a narrated TikTok video with the public API

For developers who want to script short narrated videos and keep them as TikTok drafts.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=prompt-page-hero) [All prompts](https://postqueen.ai/prompts) $0 due today. Cancel in one click.

Prompt ![TikTok](https://postqueen.ai/assets/channels/tiktok.svg)

Using the PostQueen public API, pick a voice with loadVoices, generate an Image Text Slides video about [how our app plans a week of dinners], then create a TikTok draft with it for [Friday 9 October] at [18:00].

Works best with ![Claude Code](https://postqueen.ai/assets/agents/claude-code.svg) ![Codex](https://postqueen.ai/assets/agents/codex.svg) ![Cursor](https://postqueen.ai/assets/agents/cursor.png) and any agent connected to PostQueen

What your agent does

## The API calls, in order.

1. `POST /video/function` `image-text-slides, loadVoices` Lists the voices the narrated slides can use, with their ids.
2. `POST /generate-video` `vertical, voice id, prompt` Makes the narrated slideshow and returns it from your media library.
3. `GET /integrations` `tiktok` Finds the id of your TikTok channel.
4. `POST /posts` `type: draft` Creates the TikTok draft with the video for Friday 9 October at 18:00.

These are the real PostQueen public API calls in the code your agent writes. It writes them on its own; you only send the prompt.

The result

## Drafts on your calendar, not surprises.

Everything waits as a draft. Open any post to change the words, the picture or the time, then schedule it when it is right.

- A version for each network, within its limits
- Nothing goes out until you schedule it
- Change the text, time or media on the calendar

Variations

## Make it your own.

- Print the first five voices and wait for me to pick one.
- Label the video as made with AI in the TikTok settings.
- Send it to my TikTok inbox instead, so I can finish it in the TikTok app.

Tips

## Before you send it.

- The video uses AI credits from your plan. Creator has 150 AI credits a month, Growth 300, Pro 500.
- Narrated slides work during the 7-day trial, so you can try this before your first payment.
- Send the API key as the Authorization header with no Bearer prefix. Admins find it under Connections, API Keys.

## More prompts like this

- [Video and images ![TikTok](https://postqueen.ai/assets/channels/tiktok.svg) A slideshow from the terminal Developers Open the prompt](https://postqueen.ai/prompts/a-slideshow-from-the-terminal)
- [Video and images ![TikTok](https://postqueen.ai/assets/channels/tiktok.svg) Post a folder of screenshots Developers Open the prompt](https://postqueen.ai/prompts/post-a-folder-of-screenshots)
- [Video and images ![Instagram](https://postqueen.ai/assets/channels/instagram.svg) ![TikTok](https://postqueen.ai/assets/channels/tiktok.svg) A short video for Reels and TikTok Small business Open the prompt](https://postqueen.ai/prompts/a-short-video-for-reels-and-tiktok)
- [Video and images ![TikTok](https://postqueen.ai/assets/channels/tiktok.svg) ![YouTube](https://postqueen.ai/assets/channels/youtube.svg) An 8-second teaser Creators Open the prompt](https://postqueen.ai/prompts/an-8-second-teaser)

### Copy it. Your agent does the rest.

Connect your agent to PostQueen and send the prompt. The drafts wait on your calendar.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=band-prompt-page) $0 due today. Cancel in one click.
