HiAPI
  • Models
  • Pricing
Search

Search HiAPI models, tools, and resources.

LoginGet Started
  • Models
  • Pricing
HiAPI

One API, All AI Models

Generate images, video, and audio with leading models through one production-ready API.

Get a free API key

AI Image API

  • All image models
  • GPT Image 2
  • Nano Banana 2
  • Seedream 5.0 Pro
  • Qwen Image 2.0 Pro
  • FLUX 1.1 Pro

AI Video API

  • All video models
  • Seedance 2.5
  • FLUX.3 Video
  • Seedance 2.0
  • Veo 3.1
  • Kling 3.0

AI Audio API

  • All audio models
  • MiniMax Music 2.6
  • MiniMax Music 1.5
  • ElevenLabs v3
  • Text to music
  • Text to speech

Product

  • Model marketplace
  • Playground
  • Pricing
  • Image API Cost Calculator
  • Free GPT Image 2 Generator
  • Free Nano Banana Image Generator
  • Outfit Preview
  • Product Photo Lab

Developers

  • Documentation
  • API Reference
  • Agent Skills
  • LLM integration index
  • Blog

Company

  • About
  • Contact support
  • Terms of Service
  • Privacy Policy

© 2026 hiapi. All rights reserved.

Open source on GitHubPython SDK on PyPI
  • TL;DR
  • Why seedance-2.0-mini fits the short-form loop
  • Setup
  • Your first vertical clip (T2V)
  • The input schema, verified against the live API
  • A reusable Python function
  • Image-to-video: lock the first frame
  • Batching a week of content
  • Prompting for the feed
  • Wrap-up
GuideJul 7, 20268 min read

Short-Form Video with seedance-2.0-mini: An End-to-End hiapi API Workflow

hiapiSeedanceVideo GenerationShort-Form VideoTutorial

Latest models

Explore models

Contents
  • TL;DR
  • Why seedance-2.0-mini fits the short-form loop
  • Setup
  • Your first vertical clip (T2V)
  • The input schema, verified against the live API
  • A reusable Python function
  • Image-to-video: lock the first frame
  • Batching a week of content
  • Prompting for the feed
  • Wrap-up

Generate it with HiAPI

Choose a model, enter your prompt, and see the result.

HiAPI Blog

Related articles

HiAPI

Generate it with HiAPI

TL;DR

  • What this is: an end-to-end workflow for producing TikTok/Reels-style vertical clips with seedance-2.0-mini on the hiapi API — from the first curl call to a batch script that renders a week of content. The demo clips on this page were generated with the exact requests shown.
  • Why this model for short-form: native 9:16 support, built-in synced audio (no separate sound pass), flexible 4–15 s durations, and 480p drafts at $0.068/second — a 4-second vertical draft costs about $0.27 (pricing).
  • Verified API facts: prompt, duration (integer 4–15), and resolution (480p | 720p) are required; aspect_ratio accepts 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive. Image-to-video uses first_frame_url / last_frame_url. The schema is strict — unknown fields like seed are rejected with a 400.
  • Workflow: generate at 480p to iterate on prompts, re-render keepers at 720p, and batch-submit tasks in parallel — the async /v1/tasks queue does the fan-out for you.

Why seedance-2.0-mini fits the short-form loop

Short-form production is volume work: you draft many clips, keep a few, and post daily. That workflow needs three things from a video API — cheap iterations, vertical output, and sound — and seedance-2.0-mini happens to check all three:

  • Cost per draft is low enough to iterate. At 480p the model bills $0.068 per second of output, so a 4-second draft is ~$0.27 and even a full 15-second clip stays close to $1. The 720p tier is $0.147/s. (Prices verified against the live pricing page; video is billed per second, so duration is your cost lever.)
  • Native 9:16. You render vertical directly instead of cropping a landscape clip and losing the composition.
  • Native synced audio. Output MP4s ship with an AAC audio track generated with the scene — ambience, foley, room tone. For feed content that autoplays with sound, this saves an entire editing step.

If you want the bigger sibling for hero content, the same workflow applies to seedance-2-0 — only the price tier changes.

Setup

You need an hiapi API key and nothing else — no SDK. Keep the key in an env var:

export HIAPI_API_KEY="sk-..."

All video models on hiapi run through the unified async task endpoint: POST https://api.hiapi.ai/v1/tasks returns a taskId immediately, and you poll GET /v1/tasks/{taskId} until it finishes. Details are in the docs.

Your first vertical clip (T2V)

The smallest valid request needs prompt, duration, and resolution. Add aspect_ratio: "9:16" for short-form:

curl -X POST https://api.hiapi.ai/v1/tasks \
  -H "Authorization: Bearer $HIAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0-mini",
    "input": {
      "prompt": "Vertical short-form video. A fresh matcha latte being poured in slow motion into a clear glass on a sunlit cafe counter, green swirls blooming through the milk, soft window light, shallow depth of field. Native audio: gentle cafe ambience, liquid pouring. Crisp, appetizing, photoreal.",
      "duration": 4,
      "resolution": "480p",
      "aspect_ratio": "9:16"
    }
  }'

The response is instant:

{"code": 200, "data": {"taskId": "tk-hiapi-01KWTTFDPHSDWZ0FP1QAS5J79Q"}, "message": "success"}

Poll the task until status is success, then download output[0].url right away — output URLs are temporary and expire. Here is the actual clip that exact request produced (4 s, 480p, 9:16, with native pour-and-ambience audio — unmute to hear it):

Two practical notes from this render: the "480p" vertical output measures 496×864 pixels, and the audio arrived as a proper AAC track in the MP4 — no separate file to mux.

The input schema, verified against the live API

The schema is strict. These are real validation responses, reproduced verbatim, so you can recognize them when they hit your logs:

FieldTypeRequiredValues
promptstring✅ (min length 3)your shot description
durationinteger✅4–15 (seconds)
resolutionstring✅480p, 720p
aspect_ratiostringoptional1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive
first_frame_urlstringoptionalimage URL for I2V start frame
last_frame_urlstringoptionalimage URL for end-frame control
image_inputarrayoptionalmultimodal image references
reference_video_urlsarrayoptionalstyle/motion reference videos (cheaper per-second rate)

Omit a required field and the task is rejected before it's created (no charge):

{"code": 400, "error_code": "INVALID_REQUEST", "message": "invalid input: resolution: missing required field \"resolution\"; duration: missing required field \"duration\""}

Out-of-range values name the exact bounds — duration: maximum: got 16, want 15 — and unknown fields are refused rather than ignored:

{"code": 400, "error_code": "INVALID_REQUEST", "message": "invalid input: <root>: additional properties 'seed' not allowed"}

That last behavior is worth internalizing: if you carry request shapes over from another model (a seed, a size, an audio flag), seedance-2.0-mini will 400 instead of silently dropping the field.

A reusable Python function

Everything you need for production is ~40 lines — submit, poll, download:

import os, time, requests

API = "https://api.hiapi.ai/v1/tasks"
HEADERS = {"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"}

def submit(prompt: str, duration: int = 4, resolution: str = "480p",
           aspect_ratio: str = "9:16", **extra) -> str:
    r = requests.post(API, headers=HEADERS, json={
        "model": "seedance-2.0-mini",
        "input": {"prompt": prompt, "duration": duration,
                  "resolution": resolution, "aspect_ratio": aspect_ratio, **extra},
    }, timeout=60)
    data = r.json()
    task_id = (data.get("data") or {}).get("taskId")
    if not task_id:
        raise RuntimeError(f"submit failed: {data}")
    return task_id

def wait(task_id: str, timeout_s: int = 900) -> dict:
    deadline = time.time() + timeout_s
    while time.time() < deadline:
        task = requests.get(f"{API}/{task_id}", headers=HEADERS, timeout=30).json()["data"]
        if task["status"] == "success":
            return task
        if task["status"] == "fail":
            raise RuntimeError(f"task failed: {task.get('error')}")
        time.sleep(8)
    raise TimeoutError(task_id)

def make_clip(prompt: str, out_path: str, **kw):
    task = wait(submit(prompt, **kw))
    url = task["output"][0]["url"]          # temporary URL — download immediately
    with open(out_path, "wb") as f:
        f.write(requests.get(url, timeout=120).content)

A 4-second 480p clip typically finishes in a couple of minutes; budget up to ~10 minutes at peak times before calling it a timeout.

Image-to-video: lock the first frame

For product-led shorts, prompt drift is the enemy — you want your product in frame, not the model's idea of it. The fix is I2V with first_frame_url: generate (or photograph) a still, then animate it. A vertical reference still like this one, made with gpt-image-2 through the same /v1/tasks endpoint, works well as a start frame:

Vertical product still generated with gpt-image-2 as an I2V first frame: pour-over coffee dripper on an oak table

The request just adds one field:

task_id = submit(
    "Steam begins to rise from the pour-over dripper as hot water is poured "
    "in a slow circle from above, droplets falling into the glass carafe below, "
    "sunlight catching the steam. Slow gentle push-in. "
    "Native audio: soft water trickle, quiet morning room tone.",
    duration=4, resolution="480p", aspect_ratio="9:16",
    first_frame_url="https://your-cdn.example/pourover-ref.jpg",
)

Here's what first-frame animation delivers in practice — a still from our seedance-2.0-mini recipe library and the clip it became, same model and request shape (16:9 in this example):

First frame reference: red hot-air balloon resting in an alpine meadow

The composition, palette, and subject stay locked to your still; the prompt only has to describe the motion. There's also last_frame_url if you need the clip to land on a specific end frame — useful for loops that cut back to a product card.

Batching a week of content

Because /v1/tasks is async, batch production is just: submit everything, then poll. No client-side queue needed.

briefs = [
    ("mon-hook",  "Vertical clip. Espresso shot pulling in slow motion, ..."),
    ("tue-loop",  "Vertical seamless-loop clip. Steam curling off a cup, ..."),
    ("wed-recipe","Vertical clip. Overhead pour-over brewing sequence, ..."),
    # ... one per posting day
]

tasks = {name: submit(p, duration=6) for name, p in briefs}   # fan out
for name, tid in tasks.items():                                 # collect
    make = wait(tid)
    url = make["output"][0]["url"]
    open(f"{name}.mp4", "wb").write(requests.get(url, timeout=120).content)

The cost math stays predictable because billing is per output second:

PlanSpecCost
1 draft iteration4 s · 480p~$0.27
1 posting-ready clip6 s · 480p~$0.41
7 clips (a week, daily)7 × 6 s · 480p~$2.86
Hero re-render6 s · 720p~$0.88

A workflow that holds up well: draft every idea at 480p, keep the winners, re-render only those at 720p. For more levers (resolution tiers, duration trimming, batch scheduling), see our guide to controlling AI image and video API costs.

Prompting for the feed

What worked across our test renders, tuned for short-form specifically:

  • Say "vertical" and compose for it. Leading with "Vertical short-form video." plus aspect_ratio: "9:16" keeps subjects centered in the tall frame instead of framing a landscape scene that gets cropped.
  • Put the hook in second one. Feeds decide in the first second — make the very first motion the payoff (the pour already falling, the steam already rising), not a slow establishing move.
  • Script the audio. A "Native audio: ..." sentence listing 2–3 concrete sounds (liquid pouring, cafe ambience) reliably shapes the soundtrack. Unprompted, you get generic room tone.
  • For loopable clips, minimize start-to-end change. Drifting particles, pulsing glow, curling steam — describe steady-state motion and the first/last frames land close enough to loop.

For a deeper set of tested prompt patterns with side-by-side results — camera moves, styles, action, audio — see the companion piece: seedance-2.0-mini prompt recipes.

Wrap-up

Short-form video production with seedance-2.0-mini comes down to one async endpoint, three required fields, and per-second pricing that makes iteration cheap: draft vertical clips at 480p for about a quarter each, lock product shots with first_frame_url, batch-submit your posting calendar, and re-render keepers at 720p. Grab an API key, then start with the 4-second curl request above — the seedance-2.0-mini model page has the parameter reference and live pricing to take it from there.

Latest models

View all models
  • GPT Image 2From $0.007/image
  • Nano Banana 2From $0.051/image
  • Seedream 5.0 ProFrom $0.050/image
  • Seedance 2.5From $0.121/s

Explore models

TextImageVideoAudio
Back to blog
GPT Image 2From $0.007/image
Nano Banana 2From $0.051/image
Seedream 5.0 ProFrom $0.050/image
Seedance 2.5From $0.121/s
View all models
TextChat and reasoning
ImageGenerate and edit
VideoText and image to video
AudioSpeech and music
Start generating
View model pricing
View all articles
Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Start generating