Developer & AI-Agent Interfaces
AI Video REST API, MCP Server & Coding-Agent Skill
Built from day one for automated content pipelines and autonomous coding agents. Estimate exact credit usage before spending a cent via POST /v1/generations/plan, submit 15-second t2v and i2v (including first-and-last-frame) jobs on AI Chili (AIChili) with non-expiring credits, and query 390+ serialized episodes across 55+ series via Streamable HTTP MCP.
1. Quickstart: Plan & Render a 15s Scene via REST API
Generate a self-serve chili_sk_* token in AI Chili Studio. Always call /v1/generations/plan first to verify parameters and inspect exact credit cost before submitting /v1/generations:
# 1. Dry-run credit quote (spends 0 credits)
curl -sS -X POST https://videoplatform.aichili.ai/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 across a cedar courtyard at dusk, slow 35mm dolly-in, shallow depth of field",
"duration_s": 15,
"resolution": "768p",
"ratio": "16:9"
}
}'
# 2. Submit generation job & poll status
JOB_ID=$(curl -sS -X POST https://videoplatform.aichili.ai/v1/generations \
-H "Authorization: Bearer $AICHILI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "t2v",
"model_id": "h3-vdn",
"params": {
"prompt": "Lantern-lit rain across a cedar courtyard at dusk, slow 35mm dolly-in, shallow depth of field",
"duration_s": 15,
"resolution": "768p",
"ratio": "16:9"
}
}' | jq -r '.id')
curl -sS "https://videoplatform.aichili.ai/v1/generations/$JOB_ID" \
-H "Authorization: Bearer $AICHILI_API_KEY"
2. Python SDK-Free Client Example (Zero External Dependencies)
import json, os, time, urllib.request
API = "https://videoplatform.aichili.ai"
HEADERS = {
"Authorization": f"Bearer {os.environ['AICHILI_API_KEY']}",
"Content-Type": "application/json",
"User-Agent": "curl/8.4.0",
}
def api_call(method: str, path: str, payload: dict | None = None) -> dict:
data = json.dumps(payload).encode() if payload is not None else None
req = urllib.request.Request(f"{API}{path}", data=data, headers=HEADERS, method=method)
with urllib.request.urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode())
body = {
"mode": "t2v",
"model_id": "h3-vdn",
"params": {
"prompt": "Crystal lotus light blooming on dark clay rooftops under night fireworks, 24fps cinema",
"duration_s": 15,
"resolution": "768p",
"ratio": "16:9",
},
}
plan = api_call("POST", "/v1/generations/plan", body)
print("Estimated credits:", plan)
job = api_call("POST", "/v1/generations", body)
while job.get("status") in ("queued", "running"):
time.sleep(5)
job = api_call("GET", f"/v1/generations/{job['id']}")
print("Completed output:", job)
3. Connect Claude Code, Cursor & MCP Clients
OnlyChili ships an unauthenticated Streamable HTTP MCP server registered on the Official Model Context Protocol Registry as io.github.AI-Chili/onlychili, plus a loadable SKILL.md on aichili.ai:
# Add OnlyChili's remote Streamable HTTP MCP server to Claude Code (no API key needed) claude mcp add --transport http onlychili https://onlychili.aichili.ai/mcp # Fetch the AI Chili agent skill directly into your workspace skills folder mkdir -p .agents/skills/aichili && curl -fsSL https://aichili.ai/SKILL.md -o .agents/skills/aichili/SKILL.md
| Surface | Canonical Endpoint | Auth | Purpose |
|---|---|---|---|
| First-Party OpenAPI 3.1 Spec | https://aichili.ai/openapi.json |
Public GET | Self-describing function-calling schema for /api/v1/registry, /api/v1/credits, and /api/v1/generations |
| AI Chili Studio Remote MCP | https://aichili.ai/mcp |
Optional chili_sk_* |
Streamable HTTP MCP (io.github.AI-Chili/aichili) for model discovery, PAYG cost math, dry-run planning, and rendering |
| Official CLI & Stdio MCP | https://github.com/AI-Chili/aichili |
MIT Open Source | Zero-dependency Node.js CLI (npx -y github:AI-Chili/aichili) and local stdio MCP server |
| Interactive Swagger Docs | https://videoplatform.aichili.ai/v1/docs |
Public GET | Full interactive control-plane Swagger UI for uploads, generations, credits, and referrals |
| OnlyChili Remote MCP | https://onlychili.aichili.ai/mcp |
None (60 req/min) | Search series, episodes, creators, and playable watch URLs across 47 languages |
| Agent Skill | https://aichili.ai/SKILL.md |
Public GET | Step-by-step agent workflow for credit sizing, dry-run planning, and job polling |
| Structured Pricing | https://aichili.ai/pricing.md |
Public GET | Exact PAYG pack rates and OnlyChili 80% creator split in clean Markdown |
| AI Catalog Manifest | https://aichili.ai/.well-known/ai-catalog.json |
Public GET (CORS *) |
AgentReady.org machine-readable index of all AI Chili & OnlyChili agent surfaces |