Skip to content
allitBeta
  • Models
  • UBIA
  • Chat
  • Hub
  • Studio
  • Pricing
  • API
  • Privacy
    • $ALL
    • WIT
    • Auction
    • Staking
Connect walletTry free
allitBeta
  • Models
  • UBIA
  • Chat
  • Hub
  • Studio
  • Pricing
  • API
  • Privacy

Token

  • $ALL
  • WIT
  • Auction
  • Staking
Try freeConnect wallet
Docs / Videos
  • Getting started

    • Allwit docs
    • Wallet sign-in
  • $ALL token

    • $ALL token
    • Launch auction
    • Staking
    • Buyback and burn
  • WIT credits

    • WIT credits
    • The daily allowance
    • Buy WIT credits
    • Pricing and spending
  • Platform

    • Privacy and labels
    • Models
    • Hub
    • Agent Studio
  • API

    • Developer API
    • Authentication
    • Models and pricing
    • Chat completions
    • Images
    • Transcriptions
    • Speech
    • Videos
    • Errors
    • Rate limits
  • Reference

    • Parameters
    • Risks and disclaimer
  • Community

    • X
Docs
  • Getting started

    • Allwit docs
    • Wallet sign-in
  • $ALL token

    • $ALL token
    • Launch auction
    • Staking
    • Buyback and burn
  • WIT credits

    • WIT credits
    • The daily allowance
    • Buy WIT credits
    • Pricing and spending
  • Platform

    • Privacy and labels
    • Models
    • Hub
    • Agent Studio
  • API

    • Developer API
    • Authentication
    • Models and pricing
    • Chat completions
    • Images
    • Transcriptions
    • Speech
    • Videos
    • Errors
    • Rate limits
  • Reference

    • Parameters
    • Risks and disclaimer
  • Community

    • X

API

Videos

POST /videos/generations: an asynchronous job, polled until the video is ready, then downloaded.

Start a job

`POST /videos/generations` takes `model` (a video model id from `/models`), `prompt`, optional `duration` (seconds; each model lists its range on `/models` as `durations`, and models that take only some lengths add `duration_step`; the default is 5), `resolution` (the model's `resolutions`; the default is its first) and `aspect_ratio` (`16:9`, the default; `9:16`; `1:1`). It answers **202** with a job object whose `status` is `queued`.

Video is priced `per_second`: `/models` shows WIT per second at each resolution. The whole price (`duration` × the rate) is charged when the provider accepts the job and refunded in full if the job fails. Prompts are never stored; Allwit keeps who asked, the model, the provider's job id and the outcome, and nothing else.

Response (202)json
{
  "id": "6f1c…",
  "object": "video.generation",
  "created": 1794300000,
  "model": "<video model id>",
  "status": "queued",
  "duration": 5,
  "resolution": "720p",
  "allwit": { "wit_charged": 95, "privacy_tier": "blind", "source": "provider_api" }
}

Poll and download

`GET /videos/generations/{id}` returns the job with its current `status`: `queued`, `running`, `succeeded` or `failed`. Jobs take a minute or several; poll every 10 seconds or so. Only the wallet that owns the key that started a job can see it; any other id is 404.

When `status` is `succeeded` the object carries `content_url`: `GET /videos/generations/{id}/content` streams the MP4 straight from the provider. Allwit keeps no copy, and providers delete results after a while (Kling after 30 days, BytePlus sooner), so download promptly. When `status` is `failed`, `error.code` says why (`content_blocked_by_provider`, `rate_limited`, `provider_down`), `allwit.wit_charged` is `0` and the WIT is back in the wallet.

curlbash
JOB=$(curl -s https://www.allwit.ai/api/v1/videos/generations \
  -H "Authorization: Bearer $ALLWIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "<video model id>", "prompt": "A paper boat drifting on a calm pond at sunrise", "duration": 5}' | jq -r .id)

until curl -s https://www.allwit.ai/api/v1/videos/generations/$JOB -H "Authorization: Bearer $ALLWIT_API_KEY" | jq -e '.status == "succeeded" or .status == "failed"' >/dev/null; do sleep 10; done

curl https://www.allwit.ai/api/v1/videos/generations/$JOB/content -H "Authorization: Bearer $ALLWIT_API_KEY" --output boat.mp4
JavaScriptjavascript
const headers = { Authorization: `Bearer ${process.env.ALLWIT_API_KEY}`, "Content-Type": "application/json" };
const base = "https://www.allwit.ai/api/v1";
const job = await (await fetch(`${base}/videos/generations`, { method: "POST", headers, body: JSON.stringify({ model: "<video model id>", prompt: "A paper boat drifting on a calm pond at sunrise", duration: 5 }) })).json();

let status = job;
while (status.status === "queued" || status.status === "running") {
  await new Promise((r) => setTimeout(r, 10_000));
  status = await (await fetch(`${base}/videos/generations/${job.id}`, { headers })).json();
}
if (status.status === "succeeded") {
  const video = await fetch(`${base}${status.content_url.replace("/api/v1", "")}`, { headers });
  await fs.promises.writeFile("boat.mp4", Buffer.from(await video.arrayBuffer()));
}

The OpenAI SDKs have no video endpoint, so these calls use plain HTTP; everything else about the key and the base URL is the same.

PreviousSpeechNext Errors

On this page

  1. Start a job
  2. Poll and download
allit

Intelligence, open to everyone. One gateway to every AI model.

  • Allwit on X

© 2026 Allwit

Product

  • Models
  • Chat
  • Hub
  • Agent Studio
  • Pricing
  • UBIA

Developers

  • API
  • Docs
  • Whitepaper

Token

  • $ALL
  • WIT
  • Auction
  • Staking

Legal

  • Privacy
  • Terms
  • Cookies
  • Cookie settings

    Allwit uses no advertising or analytics cookies. Here is what it keeps in this browser.

    Strictly necessary

    The sign-in cookie and your chat history. Needed for Allwit to work.

    Always on

    Remember your light or dark theme on this device.

    Analytics and advertising cookies

    None. Page views are counted without cookies by analytics Allwit hosts itself, which stores nothing in your browser and never sees your wallet address. No advertising.

    No cookies

    Chat history

    Conversations saved in this browser. Deleting them here does not touch any encrypted copies you chose to sync. Manage encrypted history sync

    Read the cookie policy