Developer API

Send a script, get an MP4 or a PNG back. The engine behind every tool, over plain HTTP.

Quick start

One call. The video URL comes back when it's rendered:

curl -X POST 'https://txtreel.com/api/render?wait=1' \
  -H 'content-type: application/json' \
  -d '{"platform":"whatsapp","theme":"dark","contact":{"name":"Mom"},
       "script":"Mom: who is Jessica\nme: what?? why\n[pause 1.5]\nMom: she just called the house"}'

Reddit threads use the same endpoints with "platform": "reddit":

curl -X POST 'https://txtreel.com/api/render?wait=1' \
  -H 'content-type: application/json' \
  -d '{"platform":"reddit","subreddit":{"name":"AmItheAsshole"},
       "script":"title: AITA for skipping my sister\u0027s wedding?\nbody: She uninvited my boyfriend.\nsleepy_joe: NTA\n> OP: thank you"}'

Endpoints

POST/api/render

Queues an MP4. Returns 202 with { id, status, queuePosition, statusUrl }. Add ?wait=1 to block until it's done.

GET/api/renders/:id

{ status: queued | bundling | rendering | done | error, progress, queuePosition, url, durationSeconds, error }

POST/api/still

{ conversation, frame? } → { url } of a 1080×1920 PNG. Default frame: the last one.

POST/api/validate

Checks the input without rendering: errors, or duration and message count. Not rate-limited.

GET/api/schema

JSON Schema of both formats, plus the script syntax.

Every endpoint takes the conversation JSON (see /api/schema), or the same object with a plain-text script instead of messages (or of post + comments for Reddit). Photos are https URLs or data: URIs.

Limits

  • Free, no key needed. Fair use: about 30 videos and 120 screenshots per hour per network, videos up to 3 minutes.
  • Over the limit you get 429 with a Retry-After header; when the queue is full, 503. Need more? Ask for a key, sent as Authorization: Bearer ….
  • Rendered files are deleted after 24 hours: download them, don't hotlink them.

Chat script

them: hey, you up?
me: yeah why
[pause 1.5]            wait 1.5 s
--- Today 9:41 PM      date/time separator
me: [photo URL] caption a photo (URL, local file path, or an uploaded photo's number)
[them reacts ❤️]       reaction on my last message
[read]                 they read my messages
===                    everything above is already on screen at the start
=== scroll 3           same, but open on the oldest message and skim down in 3 s
# comment

platform: imessage, whatsapp or instagram. Other fields: theme, contact (name, avatar, subtitle, unread, verified), statusBar, startTime, speed, keyboard, sounds, composerTyping, autoRead, endHold.

Reddit script

title: AITA for not going to my sister's wedding?
body: First paragraph of the post (optional, one line per paragraph)
body: Second paragraph
[photo URL]                    a photo in the post (URL, file path or uploaded photo's number)
sleepy_joe: A top-level comment
> OP: A reply by the post's author (blue OP label)
>> sleepy_joe [2.1K 3h]: A reply to that reply, with its votes and age
[91 more replies]              collapsed replies under the comment above
[pause 2]                      wait 2 s
# comment

From an AI assistant

The same engine is an MCP server at https://txtreel.com/mcp: see Claude and ChatGPT.