BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Videos

Submit a video generation request

Submits an asynchronous video generation job. Returns 202 immediately with a job id (prefixed vjob_); poll GET /api/v1/videos/{id} until status is completed, then download via unsigned_urls. Billing: credits are reserved at submit from duration × resolution, and settled on the actual delivered seconds (usage.cost in the poll response).

POST/api/v1/videos

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Body

modelrequired
string

The video generation model ID (provider-qualified).

Example: "alibaba/wan2.7-t2v"
promptrequired
string

The text prompt describing the video to generate.

duration
integer

Video length in seconds. Defaults to 2. Each model has tighter bounds — e.g. reference-to-video (r2v) allows 2–10s; out-of-range values return 400 before any credits are reserved.

1–600 (per-model bounds are tighter; reference-to-video: 2–10)
Example: 5
resolution
string

Output quality tier, default "720p". Supported tiers vary per model; an unsupported tier returns 400 before any credits are reserved, and the error lists the tiers the model does support.

480p720p1080p
Example: "720p"
aspect_ratio
string

Aspect ratio. Common values: "16:9", "9:16", "1:1", "4:3", "3:4"; the exact set depends on the model (some also take wide ratios like "21:9"). Unsupported combinations return 400 before credits are reserved; modes that take an input frame derive the ratio from the frame and ignore this field.

16:99:161:14:33:43:22:321:99:21
Example: "16:9"
frame_images
array

First/last keyframe images (image-to-video, keyframe-to-video). Accepts bare URL strings, or objects { type: "image", image_url: { url }, frame_type: "first" | "last" }.

input_references
object[] | string[]

Reference assets (reference-to-video): guide generation with reference items — prefer object form { type: "image", image_url: { url } } (bare URL strings are also accepted and treated as image references). Image references are the most widely supported; audio/video reference objects are forwarded as-is and only take effect on models that support them — other models use the image references and ignore the rest. Only models with an r2v mode accept this field.

input_video
string | object

Source video (video-edit models only; a BazaarLink extension field). Accepts a URL string, { video_url: { url } }, or { url }. Ignored by non-video-edit models. Editing bills on source seconds + delivered output seconds.

generate_audio
boolean

Whether to also generate audio. Only effective on audio-capable models; audio seconds bill at a higher per-second rate.

watermark
boolean

Whether to watermark the output. Defaults to false — BazaarLink actively disables upstream default watermarks unless you explicitly pass true.

seed
number

Sampling seed. Reproducibility guarantees vary by model.

callback_url
string

A webhook URL called on the job's terminal state, so you don't have to poll. HTTPS only, and SSRF-checked (private/internal addresses rejected) before any credits are reserved. Fires exactly once, only from the request that wins the terminal-state determination; delivery is retried on failure (2 attempts, 2s/8s backoff), and exhausting retries never affects billing or the job's real status. No signature in v1 — treat the callback as a hint, and confirm status/amount by calling GET /v1/videos/{id} with your API key before acting on it. ⚠️ unsigned_urls in the webhook payload are absolute URLs, unlike the relative paths returned by the poll endpoint.

https:// only, ≤2048 chars

Deep guide →

POST /api/v1/videos
curl https://bazaarlink.ai/api/v1/videos \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/wan2.7-t2v",
    "prompt": "a corgi surfing a wave at sunset",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'
Response examples

Job accepted (asynchronous). Poll the returned polling_url (i.e. GET /api/v1/videos/{id}) for status; a ≥5s interval is recommended.

{
  "id": "vjob_Xk3fJ9aQ2mB7cD1eF5gH6iJk",
  "status": "pending",
  "polling_url": "/api/v1/videos/vjob_Xk3fJ9aQ2mB7cD1eF5gH6iJk"
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Submit a video generation request — BazaarLink API