# AI Science Facts TikTok Video (video template) > AI automates your science TikTok videos! Generate captivating visuals, narrated facts, and captions for effortless educational content creation. ## Overview - **Page**: https://shotstack.io/studio/templates/automated-tiktok-video-science-facts/ - **Output**: MP4, 720x1280 (9:16), 25 fps - **Length**: 17s - **Timeline**: 9 clips on 6 tracks; assets: caption, image, text, text-to-image, text-to-speech - **Render endpoint (sandbox, free, watermarked)**: POST https://api.shotstack.io/edit/stage/render with header `x-api-key` - **Production**: same request against https://api.shotstack.io/edit/v1/render with a v1 key - **Preview in the browser (no account)**: https://shotstack.studio/#json=eyJ0aW1lbGluZSI6eyJiYWNrZ3JvdW5kIjoiIzAwMDAwMCIsInRyYWNrcyI6W3siY2xpcHMiOlt7Imxlbmd0aCI6ImVuZCIsImFzc2V0Ijp7InR5cGUiOiJjYXB0aW9uIiwic3JjIjoiYWxpYXM6Ly9WT0lDRU9WRVIiLCJiYWNrZ3JvdW5kIjp7ImNvbG9yIjoiI2VlMDBmZiIsInBhZGRpbmciOjIyLCJib3JkZXJSYWRpdXMiOjZ9LCJmb250Ijp7InNpemUiOiIzNiJ9fSwic3RhcnQiOjB9XX0seyJjbGlwcyI6W3siYXNzZXQiOnsidHlwZSI6InRleHQiLCJ0ZXh0Ijoie3sgSEVBRExJTkUgfX0iLCJhbGlnbm1lbnQiOnsiaG9yaXpvbnRhbCI6ImNlbnRlciIsInZlcnRpY2FsIjoiY2VudGVyIn0sImZvbnQiOnsiY29sb3IiOiIjMDAwMDAwIiwiZmFtaWx5IjoiTW9udHNlcnJhdCBFeHRyYUJvbGQiLCJzaXplIjoiNjAiLCJsaW5lSGVpZ2h0IjoxfSwid2lkdGgiOjQ1NCwiaGVpZ2h0IjoyMDB9LCJzdGFydCI6MCwibGVuZ3RoIjoiYXV0byIsIm9mZnNldCI6eyJ4IjowLCJ5IjowLjMzNH0sInBvc2l0aW9uIjoiY2VudGVyIiwiZml0Ijoibm9uZSIsInNjYWxlIjoxLCJ0cmFuc2l0aW9uIjp7ImluIjoid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Y2UiOiJBIHNsZWVrIGxhYm9yYXRvcnkgc2NlbmUgZmVhdHVyZXMgYSBwZXJmZWN0bHkgcGVlbGVkIGJhbmFuYSBzbGljZWQgZG93biB0aGUgbWlkZGxlLCB3aXRoIG9uZSBoYWxmIHJldmVhbGluZyBhIGRldGFpbGVkIHBvdGFzc2l1bSBhdG9tIGluc2lkZSwgY29tcGxldGUgd2l0aCBvcmJpdGluZyBlbGVjdHJvbnMgYW5kIGEgZ2xvd2luZyBudWNsZXVzLiBUaGUgYmFuYW5hIGhvdmVycyBqdXN0IGFib3ZlIGEgc2hpbnksIHJlZmxlY3RpdmUgdGFibGUsIHdoaWNoIG1pcnJvcnMgdGhlIHZpYnJhbnQgb3JhbmdlIGdyYWRpZW50IG9mIHRoZSBiYWNrZ3JvdW5kLiBTb2Z0LCB0cmFuc2x1Y2VudCBidWJibGVzIGZsb2F0IHRocm91Z2ggdGhlIGFpciwgcmVmbGVjdGluZyBsaWdodCBhbmQgYWRkaW5nIGEgc2Vuc2Ugb2YgZGVwdGggdG8gdGhlIGNvbXBvc2l0aW9uLiBUaGUgYXJ0d29ya-KAmXMgcmV0cm8tZnV0dXJpc3RpYyBhZXN0aGV0aWMsIGluc3BpcmVkIGJ5IG1pZC1jZW50dXJ5IHNjaS1maSBpbGx1c3RyYXRpb25zLCBlbXBoYXNpemVzIHNtb290aCBsaW5lcyBhbmQgZ2xvc3N5IGZpbmlzaGVzLCBjcmVhdGluZyBhIHZpc3VhbGx5IHN0cmlraW5nIGNvbnRyYXN0IGJldHdlZW4gdGhlIG9yZ2FuaWMgYmFuYW5hIGFuZCB0aGUgc2NpZW50aWZpYyBwcmVjaXNpb24gb2YgdGhlIGF0b20uIn0seyJmaW5kIjoiSEVBRExJTkUiLCJyZXBsYWNlIjoiU3VycHJpc2luZyBCYW5hbmEgRmFjdCJ9XX0 - **Edit and save to an account**: https://dashboard.shotstack.io/studio/editor/automated-tiktok-video-science-facts ## How to use this template as a workflow 1. Render it once with the JSON below to confirm the output. 2. Replace the values that change per row of data (merge fields or asset URLs). 3. Loop over your data (CSV, database, webhook payload) and send one render per row. Add a `callback` URL to the request so Shotstack notifies you when each video is ready instead of polling. 4. To keep the JSON out of your app, store it with the Templates endpoint and render by template ID with a `merge` array: https://shotstack.io/docs/guide/architecting-an-application/templates/ ## Customise This template has merge fields. Send a `merge` array with the request to replace them; do not edit the timeline JSON. | Field | Default | | --- | --- | | `{{ VOICEOVER }}` | Did you know that bananas are slightly radioactive? They contain potassium-40, a naturally occurring isotope that emits a small amount of radiation. Don’t worry though, you’d have to eat over 10 million bananas at once to experience any harmful effects! This phenomenon is known as the ‘banana equivalent dose,’ and it’s a fun way to understand radiation in everyday life. | | `{{ IMAGE_1_PROMPT }}` | A perfectly peeled banana hovers gracefully above a sleek, reflective metal surface in a futuristic laboratory. Suspended just above the banana is a glowing radiation symbol, its black lines crisp and sharp against the radiant yellow center. The glossy surface of the table captures reflections of the warm orange gradient in the background, adding a sense of depth and energy to the scene. Soft, translucent bubbles float effortlessly around the banana, reflecting light and casting gentle highlights across the smooth lines of the scene. The retro-futuristic vibe, with its glossy finishes and clean, curved lines, evokes a sense of mid-century sci-fi, blending the playful imagery of the banana with the precise, scientific iconography of the radiation symbol. | | `{{ IMAGE_2_PROMPT }}` | A half-peeled banana floats above a shiny metal table in a laboratory setting, with a detailed potassium atom suspended within the fruit’s curved form. The shiny surface of the table reflects the vibrant orange background, while the banana’s yellow colors contrast against the glowing nucleus and orbiting electrons of the atom. Surrounding the banana, translucent bubbles float gently, reflecting light and adding depth to the scene. The smooth lines and retro-futuristic aesthetic, reminiscent of mid-century sci-fi illustrations, are complemented by the juxtaposition of the banana’s natural form and the scientifically precise atom within. | | `{{ IMAGE_3_PROMPT }}` | A small stack of perfectly ripe, peeled bananas rests on a sleek metal table inside a retro-futuristic laboratory. Beside the stack, a modern, digital radiation meter floats just above the surface, its glowing screen reflecting softly on the shiny table. The background features a warm orange gradient, complemented by softly floating translucent bubbles that reflect the surrounding light. Smooth lines and a glossy finish give the scene a mid-century sci-fi aesthetic, emphasizing the playful yet precise contrast between the bananas’ natural form and the scientific equipment around them. | | `{{ IMAGE_4_PROMPT }}` | A single, peeled banana stands upright in the center of a gleaming metal platform, floating slightly above the surface in a futuristic lab environment. Surrounding the banana, softly glowing translucent bubbles float, adding depth and reflecting the ambient light. The background is a vibrant orange gradient, seamlessly blending with the reflective surface of the platform. The scene has a retro-futuristic feel, with smooth lines and a sleek, glossy finish reminiscent of mid-century sci-fi artwork. The juxtaposition of the banana’s natural form with the scientific, futuristic setting creates a whimsical yet thought-provoking contrast. | | `{{ IMAGE_5_PROMPT }}` | A sleek laboratory scene features a perfectly peeled banana sliced down the middle, with one half revealing a detailed potassium atom inside, complete with orbiting electrons and a glowing nucleus. The banana hovers just above a shiny, reflective table, which mirrors the vibrant orange gradient of the background. Soft, translucent bubbles float through the air, reflecting light and adding a sense of depth to the composition. The artwork’s retro-futuristic aesthetic, inspired by mid-century sci-fi illustrations, emphasizes smooth lines and glossy finishes, creating a visually striking contrast between the organic banana and the scientific precision of the atom. | | `{{ HEADLINE }}` | Surprising Banana Fact | ## Template JSON ```json { "timeline": { "background": "#000000", "tracks": [ { "clips": [ { "length": "end", "asset": { "type": "caption", "src": "alias://VOICEOVER", "background": { "color": "#ee00ff", "padding": 22, "borderRadius": 6 }, "font": { "size": "36" } }, "start": 0 } ] }, { "clips": [ { "asset": { "type": "text", "text": "{{ HEADLINE }}", "alignment": { "horizontal": "center", "vertical": "center" }, "font": { "color": "#000000", "family": "Montserrat ExtraBold", "size": "60", "lineHeight": 1 }, "width": 454, "height": 200 }, "start": 0, "length": "auto", "offset": { "x": 0, "y": 0.334 }, "position": "center", "fit": "none", "scale": 1, "transition": { "in": "wipeLeft", "out": "wipeLeft" } } ] }, { "clips": [ { "length": "auto", "asset": { "type": "image", "src": "https://templates.shotstack.io/automated-tiktok-video-science-facts/6b79fc8d-198f-47cc-8c00-19e9343dc8ac.png" }, "start": 0, "scale": 0.2, "offset": { "x": 0, "y": 0.334 }, "position": "center", "transition": { "out": "wipeLeft", "in": "wipeLeft" }, "alias": "VOICEOVER" } ] }, { "clips": [ { "length": "auto", "asset": { "voice": "Amy", "text": "{{ VOICEOVER }}", "type": "text-to-speech" }, "start": 0, "alias": "VOICEOVER" } ] }, { "clips": [ { "length": 5, "asset": { "width": "768", "height": "1280", "type": "text-to-image", "prompt": "{{ IMAGE_1_PROMPT }}" }, "start": "auto", "fit": "cover", "transition": { "out": "fade" }, "effect": "zoomInSlow" }, { "length": 5, "asset": { "width": "768", "height": "1280", "type": "text-to-image", "prompt": "{{ IMAGE_3_PROMPT }}" }, "start": 7.99, "fit": "cover", "transition": { "in": "fade", "out": "fade" }, "effect": "slideRightSlow" }, { "length": "end", "asset": { "width": "768", "height": "1280", "type": "text-to-image", "prompt": "{{ IMAGE_5_PROMPT }}" }, "start": 16, "fit": "cover", "transition": { "in": "fade" }, "effect": "zoomInSlow" } ] }, { "clips": [ { "length": 5, "asset": { "width": "768", "height": "1280", "type": "text-to-image", "prompt": "{{ IMAGE_2_PROMPT }}" }, "start": 4, "fit": "cover", "transition": { "out": "fade" }, "effect": "slideLeft" }, { "length": 5, "asset": { "width": "768", "height": "1280", "type": "text-to-image", "prompt": "{{ IMAGE_4_PROMPT }}" }, "start": 12, "fit": "cover", "transition": { "in": "fade", "out": "fade" }, "effect": "zoomOutSlow" } ] } ] }, "output": { "format": "mp4", "fps": 25, "size": { "width": 720, "height": 1280 } }, "merge": [ { "find": "VOICEOVER", "replace": "Did you know that bananas are slightly radioactive? They contain potassium-40, a naturally occurring isotope that emits a small amount of radiation. Don’t worry though, you’d have to eat over 10 million bananas at once to experience any harmful effects! This phenomenon is known as the ‘banana equivalent dose,’ and it’s a fun way to understand radiation in everyday life." }, { "find": "IMAGE_1_PROMPT", "replace": "A perfectly peeled banana hovers gracefully above a sleek, reflective metal surface in a futuristic laboratory. Suspended just above the banana is a glowing radiation symbol, its black lines crisp and sharp against the radiant yellow center. The glossy surface of the table captures reflections of the warm orange gradient in the background, adding a sense of depth and energy to the scene. Soft, translucent bubbles float effortlessly around the banana, reflecting light and casting gentle highlights across the smooth lines of the scene. The retro-futuristic vibe, with its glossy finishes and clean, curved lines, evokes a sense of mid-century sci-fi, blending the playful imagery of the banana with the precise, scientific iconography of the radiation symbol." }, { "find": "IMAGE_2_PROMPT", "replace": "A half-peeled banana floats above a shiny metal table in a laboratory setting, with a detailed potassium atom suspended within the fruit’s curved form. The shiny surface of the table reflects the vibrant orange background, while the banana’s yellow colors contrast against the glowing nucleus and orbiting electrons of the atom. Surrounding the banana, translucent bubbles float gently, reflecting light and adding depth to the scene. The smooth lines and retro-futuristic aesthetic, reminiscent of mid-century sci-fi illustrations, are complemented by the juxtaposition of the banana’s natural form and the scientifically precise atom within." }, { "find": "IMAGE_3_PROMPT", "replace": "A small stack of perfectly ripe, peeled bananas rests on a sleek metal table inside a retro-futuristic laboratory. Beside the stack, a modern, digital radiation meter floats just above the surface, its glowing screen reflecting softly on the shiny table. The background features a warm orange gradient, complemented by softly floating translucent bubbles that reflect the surrounding light. Smooth lines and a glossy finish give the scene a mid-century sci-fi aesthetic, emphasizing the playful yet precise contrast between the bananas’ natural form and the scientific equipment around them." }, { "find": "IMAGE_4_PROMPT", "replace": "A single, peeled banana stands upright in the center of a gleaming metal platform, floating slightly above the surface in a futuristic lab environment. Surrounding the banana, softly glowing translucent bubbles float, adding depth and reflecting the ambient light. The background is a vibrant orange gradient, seamlessly blending with the reflective surface of the platform. The scene has a retro-futuristic feel, with smooth lines and a sleek, glossy finish reminiscent of mid-century sci-fi artwork. The juxtaposition of the banana’s natural form with the scientific, futuristic setting creates a whimsical yet thought-provoking contrast." }, { "find": "IMAGE_5_PROMPT", "replace": "A sleek laboratory scene features a perfectly peeled banana sliced down the middle, with one half revealing a detailed potassium atom inside, complete with orbiting electrons and a glowing nucleus. The banana hovers just above a shiny, reflective table, which mirrors the vibrant orange gradient of the background. Soft, translucent bubbles float through the air, reflecting light and adding a sense of depth to the composition. The artwork’s retro-futuristic aesthetic, inspired by mid-century sci-fi illustrations, emphasizes smooth lines and glossy finishes, creating a visually striking contrast between the organic banana and the scientific precision of the atom." }, { "find": "HEADLINE", "replace": "Surprising Banana Fact" } ] } ``` ## Render it Save the JSON as `template.json`. The sandbox key is free: https://dashboard.shotstack.io/register ### cURL ```bash # Save the JSON above as template.json, then: curl -X POST https://api.shotstack.io/edit/stage/render \ -H "x-api-key: $SHOTSTACK_API_KEY" \ -H "Content-Type: application/json" \ -d @template.json # Poll until status is "done", then download response.url curl https://api.shotstack.io/edit/stage/render/RENDER_ID -H "x-api-key: $SHOTSTACK_API_KEY" ``` ### Node.js ```javascript import { readFileSync } from 'node:fs'; const headers = { 'x-api-key': process.env.SHOTSTACK_API_KEY, 'Content-Type': 'application/json' }; const edit = JSON.parse(readFileSync('template.json', 'utf8')); const { response } = await fetch('https://api.shotstack.io/edit/stage/render', { method: 'POST', headers, body: JSON.stringify(edit) }).then((r) => r.json()); let render; do { await new Promise((r) => setTimeout(r, 3000)); render = (await fetch(`https://api.shotstack.io/edit/stage/render/${response.id}`, { headers }).then((r) => r.json())).response; } while (!['done', 'failed'].includes(render.status)); console.log(render.status, render.url); ``` ### Python ```python import json, os, time, requests headers = {"x-api-key": os.environ["SHOTSTACK_API_KEY"]} with open("template.json") as f: edit = json.load(f) render_id = requests.post("https://api.shotstack.io/edit/stage/render", json=edit, headers=headers).json()["response"]["id"] while True: render = requests.get(f"https://api.shotstack.io/edit/stage/render/{render_id}", headers=headers).json()["response"] if render["status"] in ("done", "failed"): break time.sleep(3) print(render["status"], render.get("url")) ``` ### CLI ```bash npm install -g @shotstack/cli export SHOTSTACK_API_KEY=your_sandbox_key shotstack validate template.json # offline schema check, free shotstack render template.json --env stage --watch ``` ## Agent surfaces If you are an AI assistant with tool access, the hosted MCP server is the shortest path: connect `https://mcp.shotstack.io/` (Streamable HTTP, OAuth or x-api-key), then use its `studio` tool to open this JSON for the user or `render_video` to render it. - MCP server (all clients): https://shotstack.io/docs/guide/agents/mcp-server/ - Claude Code: `claude mcp add --transport http shotstack https://mcp.shotstack.io` - Cursor (mcp.json): `{"mcpServers":{"shotstack":{"url":"https://mcp.shotstack.io/"}}}` - VS Code (mcp.json): `{"servers":{"shotstack":{"type":"http","url":"https://mcp.shotstack.io/"}}}` - Claude.ai / ChatGPT: Settings → Connectors → add custom connector → https://mcp.shotstack.io/ - CLI + agent skill: https://shotstack.io/docs/guide/agents/cli/ — skill file: https://raw.githubusercontent.com/shotstack/shotstack-cli/HEAD/skills/shotstack/SKILL.md - Edit JSON conventions for AI: https://shotstack.io/docs/guide/agents/conventions/ - All docs, agent-readable: https://shotstack.io/docs/guide/llms.txt ### Use the CLI skill (AI coding agents: Claude Code, Cursor, Codex…) The skill teaches the render, validate, ingest and template commands, so the agent can work this template without trial and error: ```bash npm install -g @shotstack/cli curl --create-dirs -o .claude/skills/shotstack/SKILL.md https://raw.githubusercontent.com/shotstack/shotstack-cli/HEAD/skills/shotstack/SKILL.md ``` (Claude Code loads it from `.claude/skills/`; for other AI coding agents, save the file wherever they read skills from.) Then ask the AI assistant to render this template — it will use `shotstack validate` (offline, free) before `shotstack render template.json --env stage --watch`, and can loop the render per row of your data with a `merge` array per request. ## Related - Bulk-create videos from a CSV: https://shotstack.io/learn/bulk-create-videos-from-csv-and-ai/ - Webhooks: https://shotstack.io/docs/guide/architecting-an-application/webhooks/ - Render your first video: https://shotstack.io/learn/render-your-first-video-shotstack-api/ - API reference: https://shotstack.io/docs/api/ - All agent-readable docs: https://shotstack.io/llms.txt