動画Use · Anime video
Anime video clips from $0.005/s.
- $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:
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"
}'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);# video.py · run: python video.py [first-frame.png]
import base64
import mimetypes
import os
import sys
import time
import requests
API = "https://animeapi.ai/api/videos"
HEADERS = {"Authorization": f"Bearer {os.environ['ANIMEAPI_KEY']}"}
def data_uri(path: str) -> str:
mime = mimetypes.guess_type(path)[0] or "image/png"
with open(path, "rb") as f:
return f"data:{mime};base64,{base64.b64encode(f.read()).decode()}"
body = {
"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",
}
# Optional: start the clip on a local image. The image sets the video's shape.
if len(sys.argv) > 1:
body["first_frame"] = data_uri(sys.argv[1])
# 1. Start the job. The price is charged now and refunded if it fails.
res = requests.post(API, headers=HEADERS, json=body, timeout=60)
video = res.json()
if res.status_code != 202:
raise SystemExit(f"{res.status_code} {video.get('code', '')}: {video['error']}")
print(f"started {video['id']}, charged {video['cost_usd']} USD")
# 2. Poll every 5 seconds until it finishes.
while video["status"] == "processing":
time.sleep(5)
try:
res = requests.get(f"{API}/{video['id']}", headers=HEADERS, timeout=30)
except requests.RequestException:
continue # a poll lost on the way: the job keeps running, ask again
if res.status_code == 429 or res.status_code >= 500:
continue
body = res.json()
if not res.ok:
raise SystemExit(f"{res.status_code} {body.get('code', '')}: {body['error']}")
video = body
if video["status"] == "failed":
raise SystemExit(f"Failed and refunded: {video['error']}")
print(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.
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'import os
import time
import requests
API = "https://animeapi.ai/api/videos"
HEADERS = {"Authorization": f"Bearer {os.environ['ANIMEAPI_KEY']}"}
# Start a 5s 480p clip between two frames ($0.025, refunded if it fails).
res = requests.post(API, headers=HEADERS, timeout=60, json={
"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 = res.json()
if res.status_code != 202:
raise SystemExit(f"{res.status_code} {video.get('code', '')}: {video['error']}")
# Poll every 5 seconds until it finishes.
while video["status"] == "processing":
time.sleep(5)
try:
res = requests.get(f"{API}/{video['id']}", headers=HEADERS, timeout=30)
except requests.RequestException:
continue # a poll lost on the way: the job keeps running, ask again
if res.status_code == 429 or res.status_code >= 500:
continue
body = res.json()
if not res.ok:
raise SystemExit(f"{res.status_code} {body.get('code', '')}: {body['error']}")
video = body
print(video["video_url"] if video["status"] == "succeeded" else f"Failed and refunded: {video['error']}")// keyframes.mjs · Node 18+ · run: node keyframes.mjs
const API = "https://animeapi.ai/api/videos";
const headers = {
Authorization: `Bearer ${process.env.ANIMEAPI_KEY}`,
"Content-Type": "application/json",
};
// Start a 5s 480p clip between two frames ($0.025, refunded if it fails).
const res = await fetch(API, {
method: "POST",
headers,
body: JSON.stringify({
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,
}),
});
let video = await res.json();
if (res.status !== 202) throw new Error(`${res.status} ${video.code ?? ""}: ${video.error}`);
// 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;
}
console.log(video.status === "succeeded" ? video.video_url : `Failed and refunded: ${video.error}`);04What it costs
Per requested second, charged when the job starts and refunded automatically if it fails. No subscription.
| Length | 480p | 768p |
|---|---|---|
| 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
- 5 to 15 seconds per clip, default 5. Longer scenes are several clips joined: end one on a frame and start the next on it.
- 480p or 768p (default 768p): 832×480 or 1344×768 landscape, also portrait and square. A first frame sets the shape instead.
- Always anime. An anime style is added to every prompt; photoreal clips are not what this is for.
- Sound comes with it. Generated to match the scene; there is no silent option, so mute it in your player if you need to.
- References have limits. Up to 9 images (frames included) and 3 reference videos per clip.
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.
07Links
- Video API referenceEvery field, status and error
- First and last framecurl, Python and JavaScript
- MCP serverA video tool for Claude, ChatGPT, Cursor and other agents
- Upscale a still2× or 4× of an image, with a real before and after
- PlaygroundMake a clip in the browser on your balance
- PricingEvery price on one page
08Other uses
- Roleplay front endsScene and character images in Open WebUI and other chats
- Discord botsA /anime slash command
- Visual novel and game artBackgrounds and sprites in a batch
- n8n workflowsOne HTTP Request node, on Cloud too
- AI agentsA remote MCP server and an agent skill
- OpenAI images API drop-inChange the base URL, keep the code
- Anime upscalingA still image 2× or 4× larger, lines kept clean
- Anime musicOpenings, lo-fi and battle themes from one prompt