Render a Live Photo card
render_live_cardUse this when the user wants an Apple Live Photo, a short animated card, or an MP4 or GIF from a design you can draw in HTML. Pass cover_html (the still) and motion_html (the animation). Both must be self-contained: inline SVG, inline CSS and data: URLs only. A remote image, font, script or style sheet is refused with external_url. Optional width and height (even, default 1080 by 1440, at most 1080 by 1440), duration_ms (500 to 3000, default 3000), fps (15 or 30, default 15) and cover_ms (the video time the still is paired to, default 0). CSS animations and requestAnimationFrame are sampled on a virtual clock from 0 to duration_ms. Returns status queued, a job_id, and a message telling you to call live_card_status. It does not return the files itself. It cannot fetch a URL, import into Photos, or run longer than 3 seconds.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cover_html": "<p>Profile: Launch</p>",
"motion_html": "<style>@keyframes fade{from{opacity:0}to{opacity:1}}</style><div style=\"animation:fade 3s linear\">Launch</div>"
},
"name": "render_live_card"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second. Default 15. | |
| width | No | Even pixel width. Default 1080. | |
| height | No | Even pixel height. Default 1440. | |
| cover_ms | No | Time in the video the still is paired to. Default 0. Must be a whole frame and less than duration_ms. | |
| cover_html | Yes | Self-contained HTML for the still cover. Inline SVG, CSS and data: URLs only. | |
| duration_ms | No | Length in milliseconds, 500 to 3000, a whole number of frames at fps. Default 3000. | |
| motion_html | Yes | Self-contained HTML for the animation. CSS animations and requestAnimationFrame follow a virtual clock from 0 to duration_ms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | Yes | ||
| job_id | Yes | ||
| limits | No | ||
| source | Yes | ||
| status | Yes | ||
| message | Yes |