Developer API

Turn any idea into a video, from code

Generate narrated whiteboard explainer videos programmatically. Send a topic, script, PDF, or image and get back an MP4 with AI voiceover and captions — in 13 languages, landscape or vertical. Billing is credit-based: 1 credit = 1 minute, 2-credit minimum.

Overview

The Ankon AI API is a small, predictable REST interface. You create a job, poll it until it finishes, then download the rendered video and supplementary files (captions, storyboard). Everything is credit-metered, so you only pay for the minutes you render.

Authentication

Two methods are supported. OAuth 2.1 is the easiest path for Claude-native clients; API keys cover everything else.

OAuth 2.1 (Claude Code, Claude.ai, Claude Desktop)

These clients are pre-registered, so no API key is required — the user authorizes Ankon AI and calls the API on their behalf.

API key (all other clients)

Send your key as a bearer token. Cursor, GitHub Copilot, and standalone scripts currently use API keys:

http
Authorization: Bearer <ANKON_API_KEY>

Quickstart

Three steps: create a job, poll until it completes, then download the files.

  1. 1POST /api/jobs/ with your payload.
  2. 2Poll the job status until it reports complete.
  3. 3Download the MP4 and captions from the returned URLs.
python
import os, requests

API = "https://ankonai.com/api"
KEY = os.environ["ANKON_API_KEY"]

# 1. Create a video job
job = requests.post(
    f"{API}/jobs/",
    headers={"Authorization": f"Bearer {KEY}"},
    json={
        "topic_or_script": "How compound interest quietly builds wealth",
        "duration_minutes": 2,
        "language": "en",
        "orientation": "landscape",
    },
).json()
job_id = job["id"]

# 2. Poll until the job finishes
while True:
    status = requests.get(
        f"{API}/jobs/{job_id}",
        headers={"Authorization": f"Bearer {KEY}"},
    ).json()
    if status["state"] in ("complete", "failed"):
        break
    time.sleep(5)

# 3. Download the MP4 + captions
print(status["video_url"], status["captions_url"])
node
import { Ankon } from "ankonai";

const ankon = new Ankon({ apiKey: process.env.ANKON_API_KEY });

// 1. Create a video job
const job = await ankon.jobs.create({
  topicOrScript: "How compound interest quietly builds wealth",
  durationMinutes: 2,
  language: "en",
  orientation: "landscape",
});

// 2. Wait for completion (built-in polling)
const result = await ankon.jobs.wait(job.id);

// 3. Download the MP4 + captions
console.log(result.videoUrl, result.captionsUrl);

Payload reference

FieldTypeDescription
topic_or_scriptstringA topic to research or a full script to animate. Required.
duration_minutesintTarget length: 1, 2, 3, or 5 minutes. Minimum 2 credits.
languagestringISO code — en, es, fr, de, it, pt, hi, ja, zh, ko, ar, nl.
voicestringOptional voice id. Defaults to a neutral voice for the language.
orientationstringlandscape (16:9) or vertical (9:16). Defaults to landscape.
render_modestringink (default whiteboard) or sketch for a lighter style.
fact_checkboolOptional. Surcharge applies; verifies claims before scripting.
scene_enhanceboolOptional. Surcharge applies; richer illustrations per scene.

Voices & languages

13 languages ship with multiple voices each, and custom voice cloning works cross-lingually — record once and speak in any supported language.

Endpoints

MethodPathDescription
POST/api/jobs/Create a video generation job.
GET/api/jobs/{id}Retrieve a job and its current status.
GET/api/jobs/List recent jobs for the authenticated key.
POST/api/estimateEstimate credit cost for a payload.
GET / POST/api/keys/List or rotate API keys.
POST/api/mediaUpload a PDF, doc, or reference image.

Pricing & refunds

Each credit renders one minute of video. Enhanced features (fact-checking, scene enhancement) add a per-job surcharge. If a finished video comes in under the requested length by more than a grace margin, the difference is refunded automatically.

Errors

StatusNameWhen
401UnauthorizedMissing or invalid API key / expired OAuth token.
402Payment requiredInsufficient credits for the requested length or surcharges.
422UnprocessableInvalid payload — check duration, language, or render_mode.
429Too many requestsRate limit exceeded; back off and retry.
404Not foundJob id does not exist or belongs to another key.
409ConflictJob already finalized; no further updates accepted.