Open History to see the last commit
1import type {
2 BytePlusVideoModel,
3 BytePlusVideoResolution,
4} from '@tanstack/ai-byteplus'
5
6/**
7 * One-click presets replicating the BytePlus Ark playground's video templates.
8 *
9 * Captured 2026-08-01 from the console's static asset config
10 * (`exp_asset_library_v1`) plus the English prompt each card renders into the
11 * composer. Every asset below is an unsigned public object in Ark's own
12 * presets bucket and is **hotlinked, never downloaded** — the adapter passes
13 * URIs straight through to the provider, so nothing is fetched or base64'd on
14 * the way.
15 *
16 * The console's own defaults come with them: reference-generation mode, Auto
17 * ratio, 720p, "Smart length" (a model-chosen duration, i.e. `duration: -1`)
18 * and sound on.
19 */
20
21/** Ark presets bucket root for the playground's template media. */
22const BASE =
23 'https://ark-common-storage-prod-cn-beijing.tos-cn-beijing.volces.com/presets/experience/gen_video/templates/reference'
24
25/**
26 * Which prompt part a template asset becomes. The kind *is* the routing: the
27 * adapter maps every video part to `reference_video` and every audio part to
28 * `reference_audio` regardless of `metadata.role`, and reads the role only on
29 * images (`'reference'` → `reference_image`).
30 */
31export type SeedanceTemplateMediaKind = 'image' | 'video' | 'audio'
32
33export interface SeedanceTemplateMedia {
34 kind: SeedanceTemplateMediaKind
35 url: string
36 /**
37 * Chip label, written as the `@`-token the prompt uses for this asset so
38 * the ordinals stay legible once the media is attached.
39 */
40 label: string
41}
42
43export interface SeedanceTemplate {
44 id: string
45 name: string
46 blurb: string
47 /** Sample result the console shows on the card. */
48 previewUrl: string
49 /** The console's official English prompt, verbatim. */
50 prompt: string
51 /** Attached in this order; `@Video1` is the first video, and so on. */
52 media: Array<SeedanceTemplateMedia>
53}
54
55/**
56 * Templates need multimodal reference media (video and audio prompt parts),
57 * which is the Seedance 2.0 family only — applying one switches the model.
58 */
59export const SEEDANCE_TEMPLATE_MODEL: BytePlusVideoModel =
60 'dreamina-seedance-2-0-260128'
61
62/** The console generates templates at 720p. */
63export const SEEDANCE_TEMPLATE_RESOLUTION: BytePlusVideoResolution = '720p'
64
65/**
66 * The `@Video1` / `@Image1` / `@Audio1` ordinals in these prompts are the
67 * console's own authoring syntax. The console rewrites them to internal
68 * `<<<video_1_1>>>` markers before sending; we deliberately do not reproduce
69 * that, and send the `@`-token prose alongside ordered role-tagged parts.
70 *
71 * LIVE-VERIFIED 2026-08-01 through this studio: template 3 on
72 * `dreamina-seedance-2-0-260128`, 720p, adaptive ratio, two reference videos,
73 * shortened to 4s to keep the run cheap (task `cgt-20260801081634-zlhvm`).
74 * Ark accepted the prose as written — no 400 — and *honoured the ordinals*:
75 * the output's first frame reproduces `@Video1`'s overhead framing and the
76 * last frame reproduces `@Video2`'s finished drawing, with generated
77 * storyboard shots in between. So the tokens are worth keeping verbatim.
78 *
79 * If a future model rejects them, rewrite them in plain language ("the first
80 * reference video") rather than reproducing the console's markers.
81 */
82export const SEEDANCE_TEMPLATES: ReadonlyArray<SeedanceTemplate> = [
83 {
84 id: 'tpl-2a98d017',
85 name: 'Music video from art style',
86 blurb: 'Scores a track to the look of a still',
87 previewUrl: `${BASE}/reference/14_3.mp4`,
88 prompt:
89 'Create a music video for @Audio1 inspired by the visual art style of @Image1.',
90 media: [
91 { kind: 'image', url: `${BASE}/reference/14_1.png`, label: '@Image1' },
92 { kind: 'audio', url: `${BASE}/reference/14_2.wav`, label: '@Audio1' },
93 ],
94 },
95 {
96 id: 'tpl-lx-24',
97 name: 'Kitten cinematic journey',
98 blurb: 'One unbroken take, forest to festive home',
99 previewUrl: `${BASE}/timeline/55_5.mp4`,
100 prompt:
101 "Create a 15-second cinematic short in 4K/60fps HDR with subtle film grain, using a palm-sized, adorable orange-and-white kitten as the sole visual focus, continuously tracked in a single flowing narrative from a cool forest sanctuary to a festive ancient town and finally into a warm New Year home, with no hard cuts and all transitions driven naturally by the kitten's running path. Employ cinematic follow shots with shallow depth of field and filmic camera movement, gradually shifting the color tone from cool blue-green forest light to warm red town sidelight and then to soft yellow indoor glow. The kitten runs through the forest, steps onto a bluestone path that transitions into an old town, rubs against a bronze door knocker and pushes open a vermilion door, then enters a warmly lit home where it sprints to a child's feet and leaps into the child's arms in slow motion; the child smiles, hugs the kitten close, and the kitten nuzzles their chin as family silhouettes glow softly behind them. Light Chinese-style orchestral music follows the motion and swells gently into a festive peak as the frame holds in warm yellow light with subtle golden bokeh and slightly intensified film grain, ending on a tender, immersive cinematic moment with no dialogue or subtitles.",
102 media: [
103 { kind: 'video', url: `${BASE}/timeline/55_1.mp4`, label: '@Video1' },
104 { kind: 'video', url: `${BASE}/timeline/55_2.mp4`, label: '@Video2' },
105 { kind: 'video', url: `${BASE}/timeline/55_3.mp4`, label: '@Video3' },
106 ],
107 },
108 {
109 id: 'tpl-f370edd7',
110 name: 'Child draws a dinosaur',
111 blurb: 'Interpolates the middle between two clips',
112 previewUrl: `${BASE}/timeline/25_3.mp4`,
113 prompt:
114 'Using @Video1 as the opening and @Video2 as the ending, generate the complete process of a child drawing a dinosaur. Storyboard-style shots are allowed.',
115 media: [
116 {
117 kind: 'video',
118 url: `${BASE}/timeline/25_1.mp4`,
119 label: '@Video1 (opening)',
120 },
121 {
122 kind: 'video',
123 url: `${BASE}/timeline/25_2.mp4`,
124 label: '@Video2 (ending)',
125 },
126 ],
127 },
128 {
129 id: 'tpl-lx-20',
130 name: 'Art gallery epilogue',
131 blurb: 'Extends a clip to 15s with scored backing',
132 previewUrl: `${BASE}/timeline/49_4.mp4`,
133 prompt:
134 'Extend @Video1 to a total length of 15 seconds with a warm, healing, and emotionally rich tone, using slow motion, soft lighting, and a warm color filter. The sequence transitions into a bright art gallery where white walls filled with oil paintings are softly lit as visitors move through with quiet admiration; it then follows a gentle, grown-up female protagonist in a simple long dress as she tenderly touches her artwork and smiles, accepts flowers from a viewer in a warm close-up, and finally resolves in an overhead wide shot of her standing at the center of the gallery, paintings behind and smiling audiences before her, surrounded by floating light particles as the frame holds. Use @Audio1 as continuous background music with subtle sparkling light sound effects at the opening transition, no dialogue, and maintain a warm white and creamy yellow palette with soft, shadowless gallery lighting and balanced color saturation.',
135 media: [
136 { kind: 'video', url: `${BASE}/timeline/49_1.mp4`, label: '@Video1' },
137 { kind: 'audio', url: `${BASE}/timeline/49_2.mp3`, label: '@Audio1' },
138 ],
139 },
140 {
141 id: 'tpl-lx-06',
142 name: 'Tech-park concept dive',
143 blurb: 'Borrows one clip’s camera move, one still’s skyline',
144 previewUrl: `${BASE}/reference/35_4.mp4`,
145 prompt:
146 "Following the camera movement style of @Video1, create a conceptual technology park video using @Image1 as the opening frame. The high-rise buildings in the image serve as the visual core, with a first-person aerial dive-in perspective that descends smoothly toward the central tower. Maintain a controlled, cinematic forward-and-downward motion to emphasize scale, structure, and spatial depth, highlighting the park's futuristic architecture, clean geometry, and advanced technological atmosphere. The camera movement remains fluid and immersive, reinforcing a strong sense of innovation and high-tech identity throughout the sequence.",
147 media: [
148 { kind: 'video', url: `${BASE}/reference/35_1.mp4`, label: '@Video1' },
149 // The prompt calls this the "opening frame", but reference and frame
150 // modes are mutually exclusive on the wire, and the console sends it in
151 // reference mode — so it goes as a reference image, not a first frame.
152 { kind: 'image', url: `${BASE}/reference/35_2.png`, label: '@Image1' },
153 ],
154 },
155]