Skip to content

動画Use · Anime video

Anime video clips from $0.005/s.

Describe the scene, or give it a first frame, a last frame or both, and get back a 5 to 15 second MP4 with sound. Same key and balance as your anime images and music.
$0.025
5 s clip at 480p
$0.05
5 s clip at 768p
5–15s
per clip, with sound
~37s
to render 5 s at 768p

01Watch

Clips made through the API, unedited, each with the prompt that made it. Press play for sound.

From text768p · 6 s · $0.06 today

an anime girl with a black blunt bob and a single ahoge, a red pencil tucked behind her ear, off-white artist smock, red armband, black headphones around her neck, flipping through animation drawings on a glowing light table in a small animation studio at night; as the pages flip, the sketched character on the paper starts to move; warm desk lamp, rain on the window

First + last frame768p · 5 s · $0.05 today

the fox-eared shopkeeper walks out from between the bookshelves to the counter, adjusts her round glasses and smiles at the customer

From a still768p · 5 s · $0.05 today

her nine tails sway gently, fireflies drift up around her, she turns her head toward the camera and smiles

First + last frame480p · 5 s · $0.025 today

she wakes up, opens her eyes and turns to the window as the train comes out onto the coast, sunlight sparkling on the sea

02The request

Video takes longer than an image, so the request returns 202 with a job id straight away. Poll it every few seconds until status is succeeded and open video_url. This one is $0.025:

start a clip, $0.025
curl https://animeapi.ai/api/videos \
  -H "Authorization: Bearer $ANIMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a girl with a red umbrella waits at a rainy bus stop, then looks up as the bus pulls in",
    "resolution": "480p",
    "duration": 5,
    "orientation": "landscape"
  }'
poll it
curl https://animeapi.ai/api/videos/$VIDEO_ID \
  -H "Authorization: Bearer $ANIMEAPI_KEY"

The whole loop, start to finished file:

// video.mjs · Node 18+ · run: node video.mjs
const API = "https://animeapi.ai/api/videos";
const headers = {
  Authorization: `Bearer ${process.env.ANIMEAPI_KEY}`,
  "Content-Type": "application/json",
};

// 1. Start the job. The price is charged now and refunded if it fails.
const res = await fetch(API, {
  method: "POST",
  headers,
  body: JSON.stringify({
    prompt: "a girl with a red umbrella waits at a rainy bus stop, then looks up as the bus pulls in",
    resolution: "480p",
    duration: 5,
    orientation: "landscape",
  }),
});
let video = await res.json();
if (!res.ok) throw new Error(`${res.status} ${video.code ?? ""}: ${video.error}`);
console.log(`started ${video.id}, charged ${video.cost_usd} USD`);

// 2. Poll every 5 seconds until it finishes.
while (video.status === "processing") {
  await new Promise((resolve) => setTimeout(resolve, 5000));
  // A poll that fails on the way (network, 429, 5xx) is asked again: the job keeps running.
  const poll = await fetch(`${API}/${video.id}`, { headers }).catch(() => null);
  if (!poll || poll.status === 429 || poll.status >= 500) continue;
  const body = await poll.json();
  if (!poll.ok) throw new Error(`${poll.status} ${body.code ?? ""}: ${body.error}`);
  video = body;
}

if (video.status === "failed") throw new Error(`Failed and refunded: ${video.error}`);
console.log(video.video_url);

03Animate your own art

Pass first_frame to start the clip on an image (an image URL, or a base64 data URI up to 10 MB). Any image_url from the image API works, so you can draw a character for a fraction of a cent and then animate it. To make the still itself larger instead, see upscaling.

from a first frame
curl https://animeapi.ai/api/videos \
  -H "Authorization: Bearer $ANIMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "she rides down the hill toward the sea, hair and ribbon blowing in the wind",
    "first_frame": "https://animeapi.ai/gen/wall-bike-sea.webp",
    "resolution": "480p",
    "duration": 5
  }'

Add last_frame too and the clip moves from one picture to the other. This 5 s 480p sample is $0.025:

# keyframes.sh · needs curl and jq · run: bash keyframes.sh
# Start a 5s 480p clip between two frames ($0.025, refunded if it fails)
START=$(curl -s https://animeapi.ai/api/videos \
  -H "Authorization: Bearer $ANIMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "she wakes up, opens her eyes and turns to the window as the train comes out onto the coast, sunlight sparkling on the sea",
    "first_frame": "https://animeapi.ai/gen/key-train-asleep.webp",
    "last_frame": "https://animeapi.ai/gen/key-train-sea.webp",
    "resolution": "480p",
    "duration": 5
  }')
VIDEO_ID=$(echo "$START" | jq -r '.id // empty')
[ -n "$VIDEO_ID" ] || { echo "$START"; exit 1; }

# Poll every 5 seconds, then print the MP4 link
while sleep 5; do
  CLIP=$(curl -s -w '\n%{http_code}' https://animeapi.ai/api/videos/$VIDEO_ID -H "Authorization: Bearer $ANIMEAPI_KEY")
  HTTP=${CLIP##*$'\n'}; CLIP=${CLIP%$'\n'*}
  case $HTTP in 000|429|5??) continue ;; esac  # a poll lost on the way: the job keeps running
  [ "$(echo "$CLIP" | jq -r .status)" = processing ] || break
done
echo "$CLIP" | jq -r '.video_url // .error'

04What it costs

Per requested second, charged when the job starts and refunded automatically if it fails. No subscription.

Length480p768p
5 seconds$0.025$0.05
10 seconds$0.05$0.10
15 seconds$0.075$0.15

Guiding a clip with reference images, videos or audio is priced part by part; see pricing.

05Limits to know first

06Questions

Is there an API that generates anime video?
Yes. AnimeAPI's POST /api/videos turns a prompt, and optionally a first and/or last frame, into a 5 to 15 second anime clip with sound. It uses the same key and balance as the image and music endpoints.
How much does an anime video clip cost?
$0.005 per second at 480p and $0.01 per second at 768p, so a 5 second clip is $0.025 or $0.05. It is charged when the job starts and refunded automatically if it fails. $5 buys 1000 seconds at 480p.
Can I animate my own image?
Yes. Send it as first_frame (an image URL or a base64 data URI up to 10 MB) and the clip starts on it; add last_frame to end on a second image. The image sets the clip's shape.
How long does a clip take?
12 to 68 seconds for a 5 second clip in our measured runs (480p is quicker than 768p). The request returns a job id at once and you poll it.
Does the video have sound?
Yes. Every clip is an MP4 at 24 fps with generated sound to match the scene.