# Thai text (video template) > Using the Thai character set within a video. ## Overview - **Page**: https://shotstack.io/templates/thai-characters-video/ - **Output**: MP4, 1280x720 (16:9) - **Length**: 10s - **Timeline**: 1 clips on 1 tracks; assets: html - **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=eyJ0aW1lbGluZSI6eyJmb250cyI6W3sic3JjIjoiaHR0cHM6Ly9zaG90c3RhY2stYXNzZXRzLnMzLWFwLXNvdXRoZWFzdC0yLmFtYXpvbmF3cy5jb20vZm9udHMvU2FyYWJ1bi1SZWd1bGFyLnR0ZiJ9XSwic291bmR0cmFjayI6eyJzcmMiOiJodHRwczovL3Nob3RzdGFjay1hc3NldHMuczMtYXAtc291dGhlYXN0LTIuYW1hem9uYXdzLmNvbS9tdXNpYy9mcmVlcGQvZmlyZXdvcmtzLm1wMyIsImVmZmVjdCI6ImZhZGVJbkZhZGVPdXQifSwiYmFja2dyb3VuZCI6IiNkYThhZmMiLCJ0cmFja3MiOlt7ImNsaXBzIjpbeyJhc3NldCI6eyJ0eXBlIjoiaHRtbCIsImh0bWwiOiI8cD5TaG90c3RhY2sg4Lij4Lit4LiH4Lij4Lix4Lia4Lig4Liy4Lip4Liy4LmE4LiX4LiiPC9wPiIsImNzcyI6InAgeyBmb250LWZhbWlseTogJ1NhcmFidW4nOyBjb2xvcjogI2ZmZmZmZjsgZm9udC1zaXplOiAzMnB4OyB0ZXh0LWFsaWduOiBjZW50ZXI7IH0iLCJ3aWR0aCI6ODIwLCJoZWlnaHQiOjEwMH0sInN0YXJ0IjowLCJsZW5ndGgiOjEwLCJ0cmFuc2l0aW9uIjp7ImluIjoiZmFkZSIsIm91dCI6ImZhZGUifX1dfV19LCJvdXRwdXQiOnsiZm9ybWF0IjoibXA0IiwicmVzb2x1dGlvbiI6ImhkIn19 ## 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 no merge fields. Replace the asset URLs and text in the JSON with your own, or turn any value into a `{{ PLACEHOLDER }}` and pass a `merge` array per request. Swap points: 1 html, 1 soundtrack. ## Template JSON ```json { "timeline": { "fonts": [ { "src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/fonts/Sarabun-Regular.ttf" } ], "soundtrack": { "src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/music/freepd/fireworks.mp3", "effect": "fadeInFadeOut" }, "background": "#da8afc", "tracks": [ { "clips": [ { "asset": { "type": "html", "html": "
Shotstack รองรับภาษาไทย
", "css": "p { font-family: 'Sarabun'; color: #ffffff; font-size: 32px; text-align: center; }", "width": 820, "height": 100 }, "start": 0, "length": 10, "transition": { "in": "fade", "out": "fade" } } ] } ] }, "output": { "format": "mp4", "resolution": "hd" } } ``` ## 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