Developer Portal & Sandbox

AI Chili Developer Portal: Video REST API, OpenAPI 3.1, CLI & MCP

Everything developers and autonomous coding agents need to quote, generate, and poll 15s–30s cinema video and 300s talking avatars programmatically with non-expiring credits.

Last updated: By AI Chili Engineering Team Entity: AI Chili Inc. (Vancouver, BC)
Agent & Developer Fast Path: Fetch /openapi.json for OpenAI/Gemini tool calling, add https://aichili.ai/mcp to Claude Code or Cursor, or run npx -y github:AI-Chili/aichili --help in your terminal.

1. Developer Surfaces at a Glance

OpenAPI 3.1 REST Gateway

Self-describing OpenAPI 3.1 schema with unique operationIds for function-calling LLMs, live at /openapi.json and /api/v1/*.

View /openapi.json →

Streamable HTTP MCP Server

Zero-install remote Model Context Protocol endpoint (io.github.AI-Chili/aichili) at https://aichili.ai/mcp for Claude Code & Cursor.

MCP Setup Guide →

Official CLI & Stdio Package

Open-source MIT Node.js CLI & stdio MCP server at github.com/AI-Chili/aichili — zero external npm dependencies.

GitHub Repository →

2. Live API Model Registry (GET /api/v1/registry)

All five production engines share a single non-expiring credit balance (pass optional ?scope=available default or ?scope=console):

Wire model_id Engine Modes Duration Range Resolutions Credit Rule
h3-vdn H3-VDN t2v, i2v 5s–15s per shot 480p, 768p, 1080p, 2k Deterministic per-second rate: 0.6 cr/s (480p), 1.0 cr/s (768p), 1.8 cr/s (1080p), 2.5 cr/s (2K).
wan3.0-video Wan 3.0 t2v, i2v (general & reference) 2s–30s continuous single call 480P, 720P, 1080P Live pre-calculated vendor quote via POST /v1/generations/plan before any credit is deducted (e.g. 5s 480P ≈ 8 credits; 30s unlocked on any paid PAYG pack).
seedance-2.5 Seedance 2.5 t2v, i2v (general & reference) 4s–15s per shot 480p, 720p, 1080p Live pre-calculated quote via POST /v1/generations/plan; reference videos scale proportionally by max(1, 0.6 × (out_s + ref_s) / out_s).
minimax-h3-gmi MiniMax H3 t2v, i2v (general & reference) 4s–15s per shot 768P, 2K Live pre-calculated quote via POST /v1/generations/plan (e.g. 4s 768P ≈ 11 credits; first 5 reference images included free).
avatar-talk Avatar-Talk i2v (talk & photo workflows) 3s–300s (up to 5 minutes) 768p (photo), source (talk) Script-driven billing: 0.2 credits per 5 script units on 'talk' (video loop), plus a +10 credit 768p base-clip charge on 'photo' (portrait still).

3. Sandbox Quickstart: Zero-Cost Plan Quote + Render + CLI

Step 1 requires no API key to inspect the live model registry; Step 2 runs a zero-cost dry-run credit quote returning total_credits before rendering:

# 1. Public unauthenticated check: list all 5 live models & schemas
curl -sS https://aichili.ai/api/v1/registry | jq '.models[].model_id'

# 2. Run via Official CLI (zero global install required)
npx -y github:AI-Chili/aichili estimate --seconds 90 --resolution 768p
AICHILI_API_KEY="chili_sk_..." npx -y github:AI-Chili/aichili plan \
  --model h3-vdn --mode t2v --duration 15 --resolution 768p --ratio 16:9 \
  --prompt "Lantern-lit rain across a cedar courtyard at dusk, 35mm dolly-in"

# 3. Direct REST dry-run quote (spends 0 credits, returns total_credits)
curl -sS -X POST https://aichili.ai/api/v1/generations/plan \
  -H "Authorization: Bearer $AICHILI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"t2v","model_id":"h3-vdn","params":{"prompt":"Lantern-lit rain at dusk","duration_s":15,"resolution":"768p","ratio":"16:9"}}'

4. Structured JSON Error Contract & Rate Limits

HTTP Status Error Code Meaning & Agent Resolution Hint
401missing_or_invalid_api_keyProvide Authorization: Bearer chili_sk_* from videoplatform.aichili.ai.
422duration_locked / validation_errorFree sign-up accounts cap single calls at 5s; purchase any PAYG pack ($9.90+) to unlock 15s–30s, or adjust params per /api/v1/registry.
422model_not_offeredUse one of the 5 public API model_id values listed above.
429rate_limitedRespect forwarded Retry-After header and exponential backoff; pass idempotency_key in JSON body on retries.
503price_unavailableUpstream vendor estimator transiently unreachable; no credits charged — retry safely after 5s.

Frequently Asked Questions

Where do I create or rotate a chili_sk_* API key?

Sign in at https://videoplatform.aichili.ai (includes 25 free non-expiring credits) and open Account Settings -> API Keys. Note that POST /v1/me/api-key/rotate requires an authenticated browser console session — a chili_sk_* API key cannot rotate itself.

Does the API return structured JSON errors for agents?

Yes. Every 4xx/5xx response on https://aichili.ai/api/v1/* returns application/json with an error object containing code, message, and resolution_hint (plus upstream detail) — never HTML error pages.

How do I pass idempotency keys and workflow selectors?

Pass workflow ('general', 'reference', 'photo', 'talk') and idempotency_key directly in the top-level JSON body of POST /api/v1/generations (our /api/v1/* gateway also bridges an Idempotency-Key HTTP header into body.idempotency_key automatically).