# GhostShorts API: Text Messages (fake_text_message) Your own chat conversation (written by you: nothing is generated for it) rendered as an iMessage, WhatsApp, Instagram or Tinder chat over gameplay footage, with each message voiced by an AI voice for "me" and one for "them". Returns one MP4; pass cutAfterMessage to get the exact millisecond where the next message appears, for splicing. Output: one 1080x1920 (9:16) MP4. This guide: https://api.ghostshorts.com/v1/templates/fake_text_message.txt All templates: https://api.ghostshorts.com/v1/llms.txt ## Base URL and auth Base URL: https://api.ghostshorts.com Auth: send your API key on every request as the header "Authorization: Bearer gs_live_..." Create a key at https://ghostshorts.com/app/settings/api-keys (the key is shown once). Keys use your plan's videos and credits; there is no separate API plan. Plans: https://ghostshorts.com/pricing ## Flow 1. Optional and free: POST /v1/estimate with the same {"template", "inputs"} body returns the cost without spending anything. 2. POST /v1/videos with {"template": "fake_text_message", "inputs": {...}} (optional "webhookUrl"). It answers 202 with the video object; keep its "id". 3. Poll GET /v1/videos/{id} every 10-20 s until "status" is "completed" or "failed" (or "cancelled" if you cancelled it). In between you may see queued, preparing_media, generating_script, narrating and rendering. A queued video can be cancelled with POST /v1/videos/{id}/cancel. 4. On "completed", "downloadUrl" is a public link (no key needed) valid for 7 days. Give it to the user exactly as returned. On "failed", "error" is { code, message }. This template has no free preview step. Webhook (optional): pass "webhookUrl" (public https) and we POST { id, type, createdAt, data } to it, where type is video.completed or video.failed and data is the video object. Deliveries carry the header X-GhostShorts-Signature: t=,v1=.">, keyed with webhooks.signingSecret from GET /v1/me minus its whsec_ prefix. Verification code: https://api.ghostshorts.com/v1/llms.txt Idempotency: send an "Idempotency-Key" header (any unique string up to 255 characters) on every POST. Retrying with the same key and body within 24 hours replays the first answer, so nothing is created or charged twice. ## Inputs (the "inputs" object for template "fake_text_message") Fields marked optional may be omitted; the default shown is applied. Unknown fields are refused with 400 INVALID_INPUT. - platform (string, optional, default imessage, one of [imessage, whatsapp, instagram, tinder, ios]): Chat skin. "ios" is accepted as an alias of "imessage". - theme (string, optional, default dark, one of [dark, light]): Light or dark chat skin. - contact (object, required) - contact.name (string, required, 1-40 chars): The contact shown in the chat header. - contact.avatarAssetId (string, optional): An image asset you own (or a system image) for the contact avatar. - messages (array of object, required, 1-80 items): The conversation, in order. - messages[].sender (string, required, one of [me, them]): "me" is the phone owner (right-hand bubbles); "them" is the contact. - messages[].text (string, optional, 1-500 chars): The message text. Send text or imageAssetId, not both. - messages[].imageAssetId (string, optional): An image asset you own (or a system image) shown as a photo message, held 3 seconds. - messages[].delayMs (integer, optional, 0-10000): Gap in milliseconds before this message appears. Defaults to the pacing preset. - messages[].timestampLabel (string, optional, 1-40 chars): Timestamp row shown above this message, e.g. "Today 8:12 PM". - messages[].gapLabel (string, optional, 1-40 chars): A time-gap row shown before this message, e.g. "4 days later". Fixed at voice-generation time (900 ms). - messages[].receipt (string, optional, 1-30 chars): Receipt label under this message, free text, e.g. "Read 8:14 PM" or "Delivered". - messages[].typingIndicatorBefore (boolean, optional): Show a typing bubble before this message (at least 800 ms; fixed at voice-generation time). - pacing (string, optional, default normal, one of [fast, normal, slow]): Default gap for messages without delayMs: fast 0 ms, normal 0 ms, slow 1000 ms. - voices (object, optional) - voices.enabled (boolean, optional, default true): Must be true: every Text Messages video is voiced (the bubble timing comes from the voice clips). - voices.me (string, optional, default pNInz6obpgDQGcFmaJgB, one of 47 ids listed with names at GET /v1/options): Voice for "me". See GET /v1/options voices tagged fake_text_message. - voices.them (string, optional, default EXAVITQu4vr4xnSDxMaL, one of 47 ids listed with names at GET /v1/options): Voice for "them". - background (object, optional) - background.category (string, optional, one of [Minecraft, Mario Kart, GTA V, Subway Surfers, Satisfying, Backrooms, Roblox]): Pick any background from this category (GET /v1/options backgrounds.categories). - background.assetId (string, optional): A background video id from GET /v1/options backgrounds.assets, or your own upload. - background.ownUrl (string, optional, 1-2048 chars): Your own footage by public https URL. Video is converted for rendering (H.264 baseline, 1080x1920, cropped to fill, silent); files up to 300 MB / 10 min. - music (object, optional) - music.assetId (string, optional): Background music id from GET /v1/options music. Omit for none. - music.ownUrl (string, optional, 1-2048 chars): Your own track by public https URL. Converted to MP3 for rendering; files up to 30 MB / 10 min. - music.volume (integer, optional, 0-100): 0-100. Default 30. - captions (array of object, optional, max 20 items): Text captions pinned to messages, up to 20. - captions[].afterMessage (integer, required, min 1): 1-based number of the message this caption follows (at most the number of messages). - captions[].text (string, required, 1-120 chars): Caption text. - captions[].delayMs (integer, optional, default 0, 0-10000): Milliseconds after that message appears. Default 0. - captions[].position (string, optional, default below_card, one of [below_card, above_card]): Default below_card. - hookText (object, optional): Hook shown before the conversation. - hookText.text (string, required, 1-120 chars): The hook line. - hookText.seconds (number, optional, default 2, 0.5-10): How long the hook holds before the chat starts. Default 2. - endCard (object, optional): End card shown after the last message. - endCard.line1 (string, required, 1-80 chars) - endCard.line2 (string, optional, 1-80 chars) - endCard.seconds (number, optional, default 2.5, 0.5-10): How long the end card holds. Default 2.5. - sfx (object, optional): Message sounds, each default false. Honoured, but silent until the sound library is uploaded. - sfx.send (boolean, optional, default false) - sfx.receive (boolean, optional, default false) - sfx.typing (boolean, optional, default false) - layout (object, optional): Chat card layout. - layout.style (string, optional, default card_over_background, one of [card_over_background]): The chat card over the background video. - layout.cardWidthPct (integer, optional, default 80, 40-100): Card width as a percentage of the frame. Default 80. - layout.cardHeight (string, optional, default fit, one of [full, fit]): fit (default): the card grows with the conversation. full: fixed-height card, the wizard's legacy look. - cutAfterMessage (integer, optional, 1-80): 1-based message number. The video reports cutAtMs: where message N+1 appears (or the end of the video when N is the last message), so you can split the MP4 there. ## Example request Set GS_KEY to your key first (export GS_KEY=gs_live_...). curl -X POST https://api.ghostshorts.com/v1/videos \ -H "Authorization: Bearer $GS_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: fake-text-message-example-001" \ --data-binary @- <<'JSON' { "template": "fake_text_message", "inputs": { "platform": "imessage", "theme": "light", "contact": { "name": "Maya" }, "hookText": { "text": "i texted \"haha yeah\". convo died. this line fixed it.", "seconds": 2 }, "messages": [ { "sender": "them", "text": "ok that hike shot is unreal, where even was that", "timestampLabel": "Today 8:12 PM" }, { "sender": "me", "text": "north shore trail. went up with my brother" }, { "sender": "them", "text": "jealous. I keep saying I'll do a real hike this fall" }, { "sender": "me", "text": "you should. october up there is the best" }, { "sender": "them", "text": "ok convince me. would you go again if I came?" }, { "sender": "me", "text": "haha yeah", "receipt": "Read 8:14 PM" }, { "sender": "me", "text": "you come with me and I'll make sure there's a good view waiting at the end", "gapLabel": "4 days later", "receipt": "Delivered" }, { "sender": "them", "text": "a good view is a strong offer. when are we going?", "typingIndicatorBefore": true } ], "captions": [ { "afterMessage": 8, "text": "a question back. we're in.", "delayMs": 300, "position": "below_card" } ], "endCard": { "line1": "That is how you revive a dead chat.", "line2": "Save this for later.", "seconds": 2.5 }, "sfx": { "send": false, "receive": false, "typing": false }, "layout": { "style": "card_over_background", "cardWidthPct": 78, "cardHeight": "fit" }, "background": { "category": "Subway Surfers" }, "pacing": "normal", "cutAfterMessage": 6 }, "webhookUrl": "https://example.com/ghostshorts/webhook" } JSON Response: 202 Accepted, header Location: /v1/videos/cmuhd9xa1001008l4c6hn2r7b { "id": "cmuhd9xa1001008l4c6hn2r7b", "template": "fake_text_message", "status": "queued", "stage": "Queued", "progress": null, "projectId": null, "exportId": null, "downloadUrl": null, "downloadExpiresAt": null, "error": null, "creditsCharged": null, "estimatedSecondsRemaining": 90, "createdAt": "2026-09-24T15:00:00.000Z", "completedAt": null, "cutAtMs": null } Once completed, GET /v1/videos/cmuhd9xa1001008l4c6hn2r7b answers (example values): { "id": "cmuhd9xa1001008l4c6hn2r7b", "template": "fake_text_message", "status": "completed", "stage": "Done", "progress": 100, "projectId": "cmuhd9xaa001108l4f4jw8m3d", "exportId": "cmuhdaq5t001208l4b0kc6s1g", "downloadUrl": "https://api.ghostshorts.com/v1/d/Wd2kF7nR0tY5qA9mC4xL8hV3bJ6gS1pEuZoIeNiKrTs", "downloadExpiresAt": "2026-10-01T15:01:08.000Z", "error": null, "creditsCharged": { "narration": 0, "render": 0, "videos": 1 }, "estimatedSecondsRemaining": null, "createdAt": "2026-09-24T15:00:00.000Z", "completedAt": "2026-09-24T15:01:08.000Z", "cutAtMs": 14267 } ## Credits - voices: 1 credit per minute of voiced text, estimated at 15 characters per second (legacy plans); included on current plans within fair use - render: 1 video from the monthly allowance (current plans); export counter on legacy plans Plan and balance are checked before anything runs, so a 402 refusal costs nothing. creditsCharged on the video says what was actually charged. ## Notes - The conversation is yours; nothing is generated for it. - Each message stays on screen for the length of its voice clip; delayMs (or pacing) adds a gap before it. - With no background fields, the Subway Surfers default background is used. - Own media by URL is fetched before anything is charged. The same URL is reused for 30 days without re-fetching; up to 20 new URLs per day. Failures: MEDIA_FETCH_FAILED, MEDIA_INVALID, MEDIA_TOO_LONG, MEDIA_QUOTA_EXCEEDED. - Gap rows and typing bubbles are timed into the narration when voices are generated, so they are fixed for the video. - sfx toggles are honoured but play nothing until the sound library is uploaded. - hookText, endCard, captions, sfx and layout are objects; hookText is { text, seconds? }, not a bare string. - cutAtMs on the video is null until the render is queued, and null when cutAfterMessage was not sent. ## Errors Errors are JSON with Content-Type application/problem+json: { type, title, status, detail, code }. Branch on "code". 400 INVALID_INPUT adds "errors": [{ path, message, code }]. Every 402 adds "upsell" and "plansUrl" (https://ghostshorts.com/pricing). A 429 carries Retry-After. Full reference: https://ghostshorts.com/developers/errors - 401 MISSING_API_KEY: No Authorization: Bearer header was sent. - 401 INVALID_API_KEY: The key is unknown or has been revoked. Create a new one in Settings. - 402 SUBSCRIPTION_REQUIRED: This step needs an active plan. The response carries plansUrl. - 402 INSUFFICIENT_CREDITS: Not enough credits for this step. Top up or wait for your plan to renew. - 402 VIDEO_ALLOWANCE_EXHAUSTED: This month's video allowance is used up. - 402 SOFT_CAP_REACHED: A fair-use limit for this period was reached. - 400 INVALID_INPUT: The body does not match the schema. The errors array names each field. Also sent as 413 for a body over 2 MB. - 400 INVALID_WEBHOOK_URL: webhookUrl must be a public https URL. - 404 NOT_FOUND: No such endpoint, or no such video, project or download link on this account. - 409 IDEMPOTENCY_IN_PROGRESS: A request with this Idempotency-Key is still running. Retry after Retry-After. - 422 IDEMPOTENCY_KEY_REUSED: This Idempotency-Key was already used with a different body. Use a new key for a new request. - 429 RATE_LIMITED: Too many requests. Wait for Retry-After seconds. - 429 CONCURRENCY_LIMIT: Three videos are already in progress on this account. Retry after one finishes. - 503 SERVICE_UNAVAILABLE: The video queue is briefly unavailable. Nothing was charged; retry shortly. A video that fails has "status": "failed" and "error": { code, message }; error.message always says what happened. Codes for this template: - MEDIA_FETCH_FAILED: Your background or music URL could not be downloaded: not public https, not reachable, refused, or larger than 300 MB (video) / 30 MB (audio). - MEDIA_INVALID: The file at your URL is not a usable video or audio file. - MEDIA_TOO_LONG: The file at your URL is longer than 10 minutes. - MEDIA_QUOTA_EXCEEDED: More than 20 new media URLs today. Reuse a URL (free for 30 days) or wait. - BACKGROUND_UNAVAILABLE: The background video or category you picked has no usable footage. Pick one from GET /v1/options. - MUSIC_UNAVAILABLE: The music id is not in the library. Pick one from GET /v1/options music. - IMAGE_UNAVAILABLE: An avatar or photo id is not an image you can use. - VOICE_TTS_FAILED: The voice provider failed while recording. - RENDER_FAILED: The render failed. Create the video again. - INTERRUPTED: Processing was interrupted. Create the video again; contact support if narration was charged. - CANCELLED: You cancelled the video while it was queued. ## Timing Renders usually take about a minute; own-media imports add about 30 seconds the first time; the first attempt occasionally takes several minutes before the automatic retry succeeds. Machine-readable: https://api.ghostshorts.com/v1/openapi.json Templates: https://api.ghostshorts.com/v1/templates Options (voices, backgrounds, music, caption presets): https://api.ghostshorts.com/v1/options