Kinetra API
Generate video from code. One key, one credit balance, every model we carry.
Quickstart
Create a key in the studio (Account → API keys), then:
curl -X POST https://kinetrastudio.com/v1/videos/generate \
-H "Authorization: Bearer kn_your_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: shot-001" \
-d '{
"prompt": "Slow dolly through a rain-soaked neon alley",
"model": "dol-h3-t2v",
"duration": 5,
"resolution": "768P",
"aspect_ratio": "16:9"
}'
{
"job_id": "0f0c…",
"status": "queued",
"queue_position": 1,
"estimated_completion_seconds": 120,
"estimated_credits": 19.0
}
Then poll GET /v1/videos/{job_id} until status is completed, which returns a signed video_url.
Authentication
Two ways in, same permissions:
| Client | Header |
|---|---|
| Your program | Authorization: Bearer kn_… or X-API-Key: kn_… |
| Studio (browser) | Authorization: Bearer <Clerk JWT> |
API keys
| Endpoint | Purpose |
|---|---|
POST /v1/account/keys | Create a key. Body {"name":"render-worker"}. Returns key exactly once. |
GET /v1/account/keys | List keys: name, prefix, created, last used, revoked. |
DELETE /v1/account/keys/{id} | Revoke immediately. Requests using it start returning 401. |
curl -X POST https://kinetrastudio.com/v1/account/keys \
-H "Authorization: Bearer kn_existing_or_clerk_jwt" \
-H "Content-Type: application/json" \
-d '{"name":"product-video-bot"}'
Choosing a model
GET /v1/models is the catalogue. Each entry carries its capabilities and a plain-language
best_for and avoid, so a program can pick without hardcoding our ids:
{
"id": "dol-kling-v3-i2v",
"name": "Kling 3.0 Pro Image",
"modes": ["image"],
"duration": {"type":"enum","values":["3","4","5","…","15"]},
"resolution": null,
"audio": "toggle",
"prices": null,
"price_per_second": 0.14,
"configured": true,
"best_for": "Human motion and performance: walking, gesturing, dance, sports…",
"avoid": "Complex multi-character choreography and precise lip-sync."
}
Load the live table below — it is generated from the API, not copied from a doc.
| Model | Modes | Duration | Resolution | Audio | Credits |
|---|
Picking programmatically
video = [m for m in models if "text" in m["modes"] and m["configured"]]
cheapest = min(video, key=lambda m: m["price_per_second"])
talking = next(m for m in models if "motion" in (m.get("best_for") or "").lower())
Generate — POST /v1/videos/generate
| Field | Notes |
|---|---|
prompt | Required, ≤2000 chars. |
model | From /v1/models. |
mode | text-to-video (default), image-to-video, reference-to-video. |
duration | Seconds. Valid range comes from the model entry. |
resolution | Must be one the model lists. |
aspect_ratio | Must be one the model lists. |
seed | Optional, where supported. |
audio | For models with an audio toggle. |
webhook_url | HTTPS. We POST the result to you on completion. |
Idempotency-Key. A retry with the same key returns the original job instead of charging twice. Reusing a key with a different body is an error.Credits are reserved at submission and settled to the real provider cost on completion. A failed render releases them.
Generate images — POST /v1/images/generate
Images are priced flat per image, not per second. Pick a model with type: "image" from /v1/models; its price_credits is the whole cost.
curl -X POST https://kinetrastudio.com/v1/images/generate -H "Authorization: Bearer kn_…" -H "Idempotency-Key: thumb-1" -H "Content-Type: application/json" -d '{"prompt":"a red apple on wet stone","model":"dol-qwen-image-3"}'
{"job_id":"…","status":"queued","media_type":"image","estimated_credits":1.0}
Poll the same /v1/videos/{job_id} endpoint — a job carries media_type, and a finished image returns image_url (a signed PNG link).
Client library
clients/kinetra.py in the repo detects the key and picks the model for you:
from kinetra import Kinetra
k = Kinetra() # KINETRA_API_KEY, or ~/.kinetra_key
k.generate("a red apple", kind="image")
k.generate("neon alley, slow dolly", kind="video", seconds=5, out="shot.mp4")
It lists models, filters to what is actually configured, picks the cheapest that fits the request, quotes, submits, waits and downloads. If nothing can run it raises KinetraError with the reason rather than silently retrying.
Reference uploads and frame inputs
Choose a model and mode before uploading. The Studio picker accepts only the file types and counts listed for that model. Click or drag files into the upload box. Images: PNG, JPEG or WebP up to 8 MB; video: up to 64 MB; audio: up to 32 MB. Combined reference uploads must stay within 100 MB.
Use multipart/form-data for video inputs. A first frame and an image reference have different roles; they cannot be mixed in one request.
| Field | Purpose |
|---|---|
image | Required first frame in image-to-video mode. |
end_image | Optional last frame only when image.end_frame is true in the model catalogue. Requires a first frame. |
references | Repeat once per file in reference-to-video mode. At least one reference is required. |
reference_types | JSON array matching file order, e.g. ["image","video","audio"]. Each type must be supported by the selected model. |
audio | Generated sound on/off where supported. This is separate from an uploaded audio reference. |
| Model | Available upload controls |
|---|---|
| H3 Reference | 1–9 image references. No video or audio references. |
| Seedance 2.0 | First frame in image mode. |
| Seedance 2.5 Image | First frame and optional last frame. |
| Seedance 2.5 Reference | Up to 30 images, one video and 10 audio references. These are documented input limits, not proof of successful generation at every limit. |
| Kling 3.0 Image | First frame; 720P. 1080P is withheld after a lower-resolution output was observed. |
| Wan 3.0 | First frame or 1–10 image references. No end frame, reference video or reference audio. Frame mode uses adaptive aspect sizing. |
| Wan 3.0 Prime | First frame with optional last frame, or 1–10 image references. No reference video/audio. A ten-image test did not keep every reference visible throughout. |
| H3 Frames | Temporarily unavailable after frame-order fidelity failed an output check. |
| Qwen image models | Text-to-image only on the connected route. Reference editing is not currently available. |
Text-only video models do not show upload controls. Check /v1/models for current availability and limits. Request validation and correctly forwarded inputs do not guarantee prompt fidelity; review every generated clip. Repeated reliability, maximum-count outputs and all format combinations are not yet fully verified.
curl -X POST https://kinetrastudio.com/v1/videos/generate \
-H "Authorization: Bearer YOUR_KINETRA_KEY" -H "Idempotency-Key: hero-1" \
-F 'payload={"prompt":"Product on wet stone, slow orbit","model":"dol-kling-v3-i2v","mode":"image-to-video","duration":5,"resolution":"720P","aspect_ratio":"16:9","audio":false};type=application/json' \
-F 'image=@start.png'
Job status — GET /v1/videos/{job_id}
States: queued → preparing → generating → encoding → uploading → completed, or failed / cancelled.
A completed job returns video_url and poster_url — signed, expiring links. Download and store the file; we do not keep renders forever.
POST /v1/videos/{job_id}/cancel cancels a queued job and releases its credits.
Quotes & approval
For anything an agent drives, price it first. A quote reserves nothing and writes nothing.
| Endpoint | Purpose |
|---|---|
POST /v1/quotes | Price a list of items. Returns totals and an approval_token. |
POST /v1/batches | Run those exact items with the token. |
GET /v1/batches/{id} | Group progress. |
POST /v1/batches/{id}/cancel | Cancel what has not started; release credits. |
quote = POST /v1/quotes {"items":[{"model":"dol-h3-t2v","prompt":"…","duration":5}]}
# → total_credits, total_usd, approval_token
POST /v1/batches {"approval_token": quote["approval_token"], "items": [ …same items… ]}
SUPERBRAIN briefs
Use SUPERBRAIN to save a private creative brief, audience, desired aspect ratio, audio preference, total length, credit budget and shot plan. Attach up to 20 ready files from your Assets library. These are planning preferences; generation model limits and binding quotes still apply.
Every save retains a revision. Revision history lets you read earlier drafts. If another tab has saved a newer revision, your save is rejected and your text stays in the form: copy it before reloading. Archive hides a brief from the active list; restore it from the Archived view. Use Open in video studio or Open in image studio after saving. Choose a model and type, then Apply brief to this model. Compatible preferences are copied; unsupported values are reported for review. Choose from Assets shows thumbnails and puts your brief references first. Assign each file to its intended model field, then request a fresh quote. No AI request or credit charge occurs when you save or apply a brief. Conversational planning and generation proposals are not available in this workspace yet.
Reusable media
Add reference opens Browse Assets and Upload in one window. New uploads are saved privately in your Assets library before attachment, so they can be reused even if model preparation fails. Image thumbnails and video previews help you identify files. Documents download as attachments. Storage quota and model-specific input limits both apply.
Organize your library with folders, search by file name, and rename or move assets from their cards. Select a folder before uploading to place new files there. Folder moves keep the same private file and do not consume additional storage. All folders includes every folder; Unfiled shows files without a folder.
Open Assets to upload private images, videos and audio. The library shows live storage use, including trash and unfinished uploads. Supported upload limits are 30 MB for images, 200 MB for video and 20 MB for audio. Each model can impose stricter requirements.
In a studio reference field, select Choose from Assets. Kinetra prepares the saved file for that selected model before adding it to the form. Saving or choosing an asset does not submit a paid generation. Existing generated outputs are not automatically archived in the library yet.
Move unwanted files to Trash to hide them and invalidate their previews. Restore them to use them again. Trash still counts toward storage; permanently deleting a trashed file releases that space and cannot be undone. Preview links expire after one hour; refresh the library to renew them.
MCP server
Open Account & history, click your account name, then Create MCP key. Name the key and copy it when shown. The secret is displayed only once. Revoke it from the same account panel when no longer needed.
Connect to https://kinetrastudio.com/mcp using streamable HTTP and send the key in X-API-Key or Authorization: Bearer. MCP keys can quote and submit generations, read your results and balance, and cancel queued batches. They cannot manage credentials, billing or account settings. MCP spends your credits; unlimited is not available through MCP.
| Tool | Purpose |
|---|---|
list_generation_models | Discover current image/video modes; filter by kind or name. |
get_generation_model | Read the exact input schema, options and reference limits. |
quote_generation | Quote the complete payload without charging or generating. |
submit_generation | Submit a quote with the approved max_credits and a stable idempotency_key. |
get_generation | Poll a job belonging to your account and retrieve its output URLs. |
list_generations | Read your latest 50 image/video generations. |
Read the selected model's schema before quoting. Include all chosen references and options, show the quote to the user and obtain approval before submission. The quote binds inputs and cost but does not itself prove human consent. Use the same idempotency key when retrying a timeout. Local file paths must be uploaded first; they are not reference URLs.
Legacy batch tools remain available: list_models, quote_batch, submit_batch, get_batch, cancel_batch, get_job, account_usage.
{"mcpServers":{"kinetra":{
"url":"https://kinetrastudio.com/mcp",
"headers":{"X-API-Key":"kn_…"}}}}
Balance & usage — GET /v1/account/usage
{
"credits_balance": 2337.3,
"credit_rate": 0.025,
"plan": "Ultra (monthly)",
"video_seconds_generated": 83.0,
"credits_used": 462.7,
"jobs_submitted": 29,
"completed_jobs": 19,
"failed_jobs": 8
}
credit_rate is what one credit cost this account — multiply credits by it to show a render in money.
Preflight pattern: quote the work, compare total_credits to credits_balance, and only submit if it fits. Submitting without the balance returns 402.
Credits & billing
Developer API provides restricted kn_dev_ keys and a separate prepaid balance for integrations. Create and revoke keys, buy one-time developer credits and view their transactions on that page. Developer keys support native model quotes, submissions, reference uploads, job results and GET /v1/developer/account. They cannot manage billing or keys, use studio credits, access studio jobs or claim unlimited generations. Existing standard keys and MCP keys continue using studio credits.
Every native quote identifies its wallet and final credit cost. Submit with Idempotency-Key and an approved max_credits; a retry cannot switch wallets. Generation failures refund the reservation to its original wallet. Developer top-ups are separate one-time purchases without studio subscription or launch bonuses. Current model quotes determine the rate; no volume discount or unlimited access is implied.
A credit is $0.025 of list generation. Prices are per generated second and vary by model and resolution — /v1/models carries both.
| Endpoint | Purpose |
|---|---|
GET /v1/billing/plans | Subscriptions, business tiers, live prices. |
GET /v1/billing/packs | One-time credit packs. |
POST /v1/billing/checkout | Returns a hosted checkout URL. |
GET /v1/account/ledger | Every credit movement. |
Webhooks
Pass webhook_url at submission. We POST on completion or failure, signed with an HMAC header so you can verify it came from us. Retries use exponential backoff; delivery is logged for auditing.
Return 2xx quickly. If your endpoint is down, polling /v1/videos/{id} remains reliable.
Errors
| Code | Meaning |
|---|---|
| 401 | Missing or bad key. |
| 402 | Not enough credits. |
| 403 | Territory restriction on this model. |
| 404 | Unknown job, batch or key. |
| 409 | Idempotency conflict, or key limit reached. |
| 422 | Validation: duration out of range, unsupported resolution, bad mode. |
| 429 | Rate limit. Back off and retry. |
| 503 | Queue full, submissions paused, or a model is offline. |
Rate limits
Per customer, one-minute window. Default 10 requests/minute; the assistant endpoint is limited per IP at 40/minute. Ask for a higher limit if you are batch-submitting.
Batches cap at 100 items and 20,000 credits per submission.