API reference · Vidu
vidu/2.0/template-to-video
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
vidu/2.0/template-to-video01
Input Schema
4 parameters · 0 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
seed | integer | Optional | Random seed for generation |
template | string | Optional | AI video template to use. Pricing varies by template: Standard templates (hug, kiss, love_pose, etc.) cost 4 credits ($0.20), Premium templates (lunar_newyear, dynasty_dress, dreamy_wedding, etc.) cost 6 credits ($0.30), and Advanced templates (live_photo) cost 10 credits ($0.50). · Options: dreamy_wedding, romantic_lift, sweet_proposal, couple_arrival, cupid_arrow, pet_lovers, lunar_newyear, hug, kiss, dynasty_dress, wish_sender, love_pose, hair_swap, youth_rewind, morphlab, live_photo, emotionlab, live_memory, interaction, christmas, pet_finger, eat_mushrooms, beast_chase_library, beast_chase_supermarket, petal_scattered, emoji_figure, hair_color_change, multiple_people_kissing, beast_chase_amazon, beast_chase_mountain, balloonman_explodes_pro, get_thinner, jump2pool, bodyshake, jiggle_up, shake_it_dance, subject_3, pubg_winner_hit, shake_it_down, blueprint_supreme, hip_twist, motor_dance, rat_dance, kwok_dance, leg_sweep_dance, heeseung_march, shake_to_max, dame_un_grrr, i_know, lit_bounce, wave_dance, chill_dance, hip_flicking, sakura_season, zongzi_wrap, zongzi_drop, dragonboat_shot, rain_kiss, child_memory, couple_drop, couple_walk, flower_receive, love_drop, cheek_kiss, carry_me, blow_kiss, love_fall, french_kiss_8s, workday_feels, love_story, bloom_magic, ghibli, minecraft, box_me, claw_me, clayshot, manga_meme, quad_meme, pixel_me, clayshot_duo, irasutoya, american_comic, simpsons_comic, yayoi_kusama_style, pop_art, jojo_style, slice_therapy, balloon_flyaway, flying, paperman, pinch, bloom_doorobear, gender_swap, nap_me, sexy_me, spin360, smooth_shift, paper_fall, jump_to_cloud, pilot, sweet_dreams, soul_depart, punch_hit, watermelon_hit, split_stance_pet, make_face, break_glass, split_stance_human, covered_liquid_metal, fluffy_plunge, pet_belly_dance, water_float, relax_cut, head_to_balloon, cloning, across_the_universe_jungle, clothes_spinning_remnant, across_the_universe_jurassic, across_the_universe_moon, fisheye_pet, hitchcock_zoom, cute_bangs, earth_zoom_out, fisheye_human, drive_yacht, virtual_singer, earth_zoom_in, aliens_coming, drive_ferrari, bjd_style, virtual_fitting, orbit, zoom_in, ai_outfit, spin180, orbit_dolly, orbit_dolly_fast, auto_spin, walk_forward, outfit_show, zoom_in_fast, zoom_out_image, zoom_out_startend, muscling, captain_america, hulk, cap_walk, hulk_dive, exotic_princess, beast_companion, cartoon_doll, golden_epoch, oscar_gala, fashion_stride, star_carpet, flame_carpet, frost_carpet, mecha_x, style_me, tap_me, saber_warrior, pet2human, graduation, fishermen, happy_birthday, fairy_me, ladudu_me, ladudu_me_random, squid_game, superman, grow_wings, clevage, fly_with_doraemon, creatice_product_down, pole_dance, hug_from_behind, creatice_product_up_cybercity, creatice_product_up_bluecircuit, creatice_product_up, run_fast, background_explosion · Default: "hug" dreamy_weddingromantic_liftsweet_proposalcouple_arrivalcupid_arrowpet_loverslunar_newyearhugkissdynasty_dresswish_senderlove_posehair_swapyouth_rewindmorphlablive_photoemotionlablive_memoryinteractionchristmaspet_fingereat_mushroomsbeast_chase_librarybeast_chase_supermarketpetal_scatteredemoji_figurehair_color_changemultiple_people_kissingbeast_chase_amazonbeast_chase_mountainballoonman_explodes_proget_thinnerjump2poolbodyshakejiggle_upshake_it_dancesubject_3pubg_winner_hitshake_it_downblueprint_supremehip_twistmotor_dancerat_dancekwok_danceleg_sweep_danceheeseung_marchshake_to_maxdame_un_grrri_knowlit_bouncewave_dancechill_dancehip_flickingsakura_seasonzongzi_wrapzongzi_dropdragonboat_shotrain_kisschild_memorycouple_dropcouple_walkflower_receivelove_dropcheek_kisscarry_meblow_kisslove_fallfrench_kiss_8sworkday_feelslove_storybloom_magicghibliminecraftbox_meclaw_meclayshotmanga_memequad_memepixel_meclayshot_duoirasutoyaamerican_comicsimpsons_comicyayoi_kusama_stylepop_artjojo_styleslice_therapyballoon_flyawayflyingpapermanpinchbloom_doorobeargender_swapnap_mesexy_mespin360smooth_shiftpaper_falljump_to_cloudpilotsweet_dreamssoul_departpunch_hitwatermelon_hitsplit_stance_petmake_facebreak_glasssplit_stance_humancovered_liquid_metalfluffy_plungepet_belly_dancewater_floatrelax_cuthead_to_ballooncloningacross_the_universe_jungleclothes_spinning_remnantacross_the_universe_jurassicacross_the_universe_moonfisheye_pethitchcock_zoomcute_bangsearth_zoom_outfisheye_humandrive_yachtvirtual_singerearth_zoom_inaliens_comingdrive_ferraribjd_stylevirtual_fittingorbitzoom_inai_outfitspin180orbit_dollyorbit_dolly_fastauto_spinwalk_forwardoutfit_showzoom_in_fastzoom_out_imagezoom_out_startendmusclingcaptain_americahulkcap_walkhulk_diveexotic_princessbeast_companioncartoon_dollgolden_epochoscar_galafashion_stridestar_carpetflame_carpetfrost_carpetmecha_xstyle_metap_mesaber_warriorpet2humangraduationfishermenhappy_birthdayfairy_meladudu_meladudu_me_randomsquid_gamesupermangrow_wingsclevagefly_with_doraemoncreatice_product_downpole_dancehug_from_behindcreatice_product_up_cybercitycreatice_product_up_bluecircuitcreatice_product_uprun_fastbackground_explosion |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
input_image_urls | string[] | Optional | URLs of the images to use with the template. Number of images required varies by template: 'dynasty_dress' and 'shop_frame' accept 1-2 images, 'wish_sender' requires exactly 3 images, all other templates accept only 1 image. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "vidu/2.0/template-to-video",
"template": "hug",
"input_image_urls": [
"https://static.sandbase.ai/examples/shengshu/vidu/2.0/template-to-video/input_input_image_urls_0.PNG"
],
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
