idea2pix API
Generate videos, images, voice-overs, music and text from your own code — with the same models, prices and rules as the idea2pix canvas.
https://idea2pix.com/api/v1Same models and prices
Seedance, Kling, Wan, MiniMax, Veo and more, billed in credits at the prices on the website.
Async tasks
Create a task, poll it, download the result. Idempotency keys make retries safe.
Face verification built in
Faces in Seedance references are detected and verified for you, just like on the canvas.
Quick start
- Create a key on the API keys page and top up credits.
- Upload references (or pass https URLs) and create a task.
- Poll the task until it succeeds, then download the result within 6 days.
KEY=sk-your-key
API=https://idea2pix.com/api/v1
# 1. Upload a reference image (or pass an https URL directly in step 2)
curl -s $API/files -H "Authorization: Bearer $KEY" -F [email protected]
# → { "data": { "id": "file_123", "type": "image", ... } }
# 2. Create a video
curl -s $API/videos \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-42" \
-d '{
"model": "apimart/seedance-2.0",
"prompt": "Image 1 rotates slowly on a marble table, soft daylight",
"ratio": "9:16",
"resolution": "720p",
"seconds": 5,
"images": ["file_123"]
}'
# → { "data": { "tasks": [{ "id": "video_88", "status": "preparing", ... }] } }
# 3. Poll until it finishes (every 5–10 seconds): preparing → queued → running → succeeded
curl -s $API/tasks/video_88 -H "Authorization: Bearer $KEY"
# → { "data": { "status": "succeeded", "output": { "video": { "url": "https://..." } } } }Overview
- Base URL:
https://idea2pix.com/api/v1. Endpoints below are written with their version, soPOST /v1/filesmeanshttps://idea2pix.com/api/v1/files. - Billing: every call is paid with the credits in your account at the same prices as the website (member or standard pricing, see Pricing). Top up on the website; the API never charges a card.
- Content rules: the Acceptable Use Policy applies to API traffic exactly as it does to the website. Prompts and outputs go through the same moderation.
- Async tasks: generation runs in the background. Create a task, then poll it until it finishes.
Authentication
Create a key on the API keys page (sign in first; your account needs credits). Creating a key requires a verification code sent to your account email, and we email you every time a key is created. The full key is shown only once. Send it in every request:
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-API-Key: sk-... works as well. On the API keys page you can give each key an expiry date, a credit limit, a list of allowed models and an IP allowlist, disable it, or delete it. Keep keys secret: anyone with a key can spend your credits.
Conventions
- Requests and responses are JSON (file uploads use
multipart/form-data). - Every successful response is wrapped as
{ "data": ... }(the examples below show what is insidedata). An error is{ "error": { "code", "message", "field"?, "details"? } }with a matching HTTP status. - Credits are shown as on the website (for example
152.5). - Files have ids like
file_123. Images can be uploaded withPOST /v1/filesor passed as publichttps://URLs; videos and audio are uploaded directly to storage withPOST /v1/uploads(see Files). - Tasks have ids like
video_12,image_34,audio_5,enhance_6,text_7. Generation is asynchronous: create a task, then pollGET /v1/tasks/{id}every 5–10 seconds untilstatusissucceeded,partial,failedorcanceled. Video tasks start aspreparingwhile their references are prepared. - Idempotency: send
Idempotency-Key: <your unique id>when creating tasks. Repeating the same key within 24 hours returns the first result instead of creating (and charging) a second task. We recommend one for every task you create, so a retry after a network error never creates (and charges) a second task. - Storage: an uploaded file is deleted as soon as a task that uses it succeeds (once no other queued or running task uses it). Files of failed or canceled tasks are kept for 24 hours so you can retry. Generated results are kept for 6 days; download what you want to keep.
Errors
| HTTP | code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED |
A parameter is missing or invalid (field says which). |
| 401 | INVALID_API_KEY |
Missing, wrong or deleted key. |
| 402 | INSUFFICIENT_CREDITS |
Not enough credits, or the key reached its credit limit. |
| 403 | FORBIDDEN / ACCOUNT_DISABLED |
Key disabled or expired, IP not allowed, model not allowed for this key. |
| 404 | NOT_FOUND |
Unknown file, task or model. |
| 409 | CONFLICT / IDEMPOTENCY_CONFLICT |
The task already started (cannot be canceled), or the same Idempotency-Key is still running. |
| 400 | DIRECT_UPLOAD_REQUIRED |
A video or audio file was sent to POST /v1/files or as a URL; use direct upload. |
| 413 / 415 | FILE_TOO_LARGE / UNSUPPORTED_FILE |
Upload too big or of an unsupported type. |
| 422 | CONTENT_REJECTED |
The prompt or a reference did not pass moderation. |
| 422 | FACE_CONSENT_REQUIRED |
Faces were found in Seedance references (see Faces and Seedance). |
| 429 | RATE_LIMITED / TOO_MANY_JOBS |
Too many requests (see Retry-After), or too many tasks running. |
| 5xx | PROVIDER_ERROR / PROVIDER_BUSY / INTERNAL |
Temporary problem; credits are refunded automatically. |
Limits
| Limit | Value |
|---|---|
| Requests per key | 120 per minute |
| Requests per account (all keys) | 300 per minute |
| Uploads (shared with the website) | 60 per minute, 600 per hour, 5 GB per day (UTC); uploading requires credits in your account |
| Running video, audio and enhance tasks | 4 at a time |
| Running image tasks | 3 at a time |
Media requests being processed (POST /v1/enhance, /v1/prompt-reverse) |
2 at a time per account |
| Video submissions being prepared | one at a time per account (the others wait as preparing) |
| Text tasks | 30 per hour |
Account and models
GET/v1/account
Your balance, whether member or standard pricing applies, and this key's usage.
{
"user_id": "48201937",
"credits": { "available": 1530.25, "frozen": 152.5 },
"membership": { "active": true, "expires_at": "2026-12-06T00:00:00.000Z" },
"pricing": "member",
"api_key": { "id": 3, "name": "My app", "credit_limit": 5000, "spent": 812.5 },
"rate_limits": { "requests_per_minute_per_key": 120, "requests_per_minute_per_account": 300 }
}
GET/v1/models
Every model you can use, with type (video, image, audio, text, enhance), capabilities, and prices in credits: price is what you pay now, member_price and standard_price are both price lists.
Video prices are per resolution and length (resolutions[].seconds["5"] = credits for a 5-second video). Some models bill reference videos per second (with_reference_video, reference_video_per_second) or extra reference images (extra_image). Use the resolution names exactly as listed (for example 720p, 1080p-audio).
Files
Images go through our server (they are resized and checked like on the website). Videos and audio are uploaded directly to storage, so large files never wait on our API servers. Uploading requires credits in your account.
Uploaded files are single-use: a file is deleted as soon as a task that uses it succeeds (when no other queued or running task still uses it). Upload it again to use it in a later task — face verification is remembered by file content, so a re-uploaded file does not need to be verified again. Files of failed or canceled tasks are kept for 24 hours so you can retry, and files that are never used are deleted after 24 hours. Results of your tasks are files too (output.*.file_id), are kept for 6 days, and can be reused as references.
POST/v1/files
Upload an image: multipart/form-data with a file field, or JSON { "url": "https://..." } to import it from a public URL. JPG, PNG or WebP, up to 15 MB (resized to at most 2048 px on the long side). Image URLs can also be passed directly in images when creating a task.
Returns a file: { "id": "file_123", "type": "image", "mime", "bytes", "width", "height", "url", "expires_at", "face_verification" }.
POST/v1/uploads
Direct upload of a video (MP4, MOV, WebM) or audio file (MP3, WAV, M4A, AAC, OGG, FLAC), up to 90 MB. Voice cloning and video references take MP3 or WAV audio.
- Ask for an upload URL with the file's MIME type, size in bytes and SHA-256 (hex). If you uploaded the same file before, the response is
{ "file": {...} }and you are done. PUTthe file toupload_urlwithin 5 minutes, with exactly theheadersreturned (Content-TypeandContent-Length).- Call
POST /v1/uploads/completewithin 30 minutes. We check the size, type and SHA-256 and return the file. Uploads that are not completed within an hour are deleted.
FILE=clip.mp4
SIZE=$(wc -c < $FILE | tr -d ' ')
SHA=$(shasum -a 256 $FILE | cut -d' ' -f1)
# 1. Get an upload URL
curl -s $API/uploads -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "{\"mime\":\"video/mp4\",\"size\":$SIZE,\"sha256\":\"$SHA\"}"
# → { "data": { "upload_url": "https://…r2.cloudflarestorage.com/…", "method": "PUT",
# "headers": { "Content-Type": "video/mp4", "Content-Length": "8812345" },
# "upload_token": "…", "upload_url_expires_at": "…", "token_expires_at": "…" } }
# Set UPLOAD_URL and UPLOAD_TOKEN from this response
# 2. Upload the bytes straight to storage
curl -s -X PUT "$UPLOAD_URL" -H "Content-Type: video/mp4" --data-binary @$FILE
# 3. Finish
curl -s $API/uploads/complete -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "{\"upload_token\":\"$UPLOAD_TOKEN\"}"
# → { "data": { "id": "file_456", "type": "video", "mime": "video/mp4", ... } }
GET/v1/files/{id}
The file with a fresh download URL (valid 24 hours) and its face verification status.
POST/v1/files/{id}/face-verification
Body: { "consent": true }. Submits a photo or a 2–15 second video with faces to face verification ahead of time (see Faces and Seedance). Poll GET /v1/files/{id} until face_verification.status is active or failed.
Verification is tied to the exact file content. If a reference video has to be prepared before it is sent (trimmed to the usable length, resized or converted — see warnings), the prepared copy is a different file and is verified again when you create the task with face_consent. To reuse a verification, upload a video that already fits: no longer than the length you generate (at most 15 seconds), H.264 MP4 or MOV, 24–60 fps.
Videos
POST/v1/videos
| Field | Type | Notes |
|---|---|---|
model |
string | A video model id from /v1/models. |
prompt |
string | Up to 4000 characters. Refer to references in order as Image 1, Video 1, Audio 1, Subject 1. |
ratio |
string | For example 16:9, 9:16, 1:1. |
resolution |
string | A resolution name from the model's price list. |
seconds |
integer | Length, one of the model's listed lengths (ignored by modes that follow the reference video). |
mode |
string | omni_reference (default: text-to-video or any references), first_frame, first_last_frames, video_edit, video_extend — as supported by the model's capabilities. |
images, videos, audios |
string[] | File ids (images may also be https URLs). For first_frame / first_last_frames, images are the first (and last) frame. |
count |
integer | 1–4 videos with the same settings (each is a task). |
multi_shot |
object | { "shots": [{ "prompt", "seconds" }] } for models with multi-shot. |
extras |
object | Model options listed in extra_params: seed, audio, last_frame, negative_prompt, prompt_extend, orientation, keep_sound, draft. |
subjects |
object[] | [{ "description", "images": [2–4 file ids] }] for models with subjects (Kling). |
face_consent |
boolean | See Faces and Seedance. |
skip_face_check |
boolean | See Faces and Seedance. |
Returns { "tasks": [task, ...] } right away, one task per video, with status: "preparing". While a task is preparing, we prepare its references like the canvas does — reference videos are trimmed to the usable length, padded or scaled to the allowed size, frame rate fixed and converted to H.264 MP4 (each adjustment is listed in the task's warnings), and faces are checked for Seedance. Then the price is frozen and the task becomes queued. If something is wrong at that point (for example faces need your consent, or there are not enough credits), the task becomes failed with an error and nothing is charged.
The price is frozen when the task leaves preparing and charged when it succeeds; failed or canceled tasks are refunded.
GET/v1/videos/{task_id}/upscale POST/v1/videos/{task_id}/upscale
Quote and create a 2K version of a MiniMax H3 768P video. The new video is a new task.
GET/v1/videos/{task_id}/finalize POST/v1/videos/{task_id}/finalize
For Seedance 2.5 drafts (extras.draft: true, 480p): quote and create the 1080p final version within 3 days of the draft.
Faces and Seedance
Seedance (apimart/seedance-*) only accepts human faces that passed face verification. This works exactly like the canvas, without the dialog:
- Every reference image and video sent to Seedance is checked for faces on our server. Files that already passed verification are used directly.
- If faces are found and you sent neither flag, the task fails with
error.codeFACE_CONSENT_REQUIREDwhile it is preparing; nothing is charged.error.details.referenceslists the files with faces: - Create the video again with
"face_consent": trueto confirm this declaration: "The people in these references are AI-generated virtual portraits, or myself, or I have permission from them to use their likeness." The references are verified first (usually seconds to minutes; the task showswaiting_for_face_verification: true) and the video starts automatically once they pass. If verification fails, the task fails and is refunded. Videos longer than 15 seconds are verified and used from their first 15 seconds.
{
"id": "video_88",
"status": "failed",
"error": {
"code": "FACE_CONSENT_REQUIRED",
"message": "Faces were detected in the references. ...",
"details": {
"references": [{ "field": "images[0]", "file_id": "file_123", "type": "image", "faces": 1 }],
"declaration": "The people in these references are AI-generated virtual portraits, ..."
}
}
}
- Or create it again with
"skip_face_check": trueif the detection is wrong (anime, figures, statues). The files are sent as-is; real faces will be rejected by the model.
Your declaration is recorded with your account, API key, IP address and time. Uploading other people's photos or voice without permission, and face swapping or other deepfakes of real people, are prohibited (see the Acceptable Use Policy). If a task fails because the model found a real face, its references are treated as having faces next time.
Images
POST/v1/images
| Field | Type | Notes |
|---|---|---|
prompt |
string | Required, up to 1000 characters. |
model |
string | An image model id (default: the site default). |
images |
string[] | Up to 4 reference images. |
ratio |
string | 1:1 (default), 3:4, 4:3, 2:3, 3:2, 9:16, 16:9. |
resolution |
string | One of the model's resolutions (default: the model's default). |
count |
integer | 1–4 images. |
POST/v1/images/edits
{ "operation": ..., "image": "file_123", "model"?: ... } plus the options of the operation:
| operation | Options |
|---|---|
relight |
azimuth (−180–180), elevation (−90–90), brightness (0–200), color (#ffffff), style (tyndall, split, art, neon, rim, sunlight) |
outpaint |
ratio (target ratio), direction (center, left, right, up, down), prompt (what to add) |
cutout |
— (white background) |
upscale |
content (general, apparel, portrait), strength (light, standard, strong) |
erase |
target (watermark, clutter, both) |
Both return an image_… task; results are in output.images.
Audio
GET/v1/audio/voices
Preset voices for speech models.
POST/v1/audio/speech
{ "model", "text" (up to 1000 characters), "voice" } to read with a preset voice, or { "model", "text", "reference_audio": "file_…" } to clone a voice from a 10–30 second MP3 or WAV (uploaded with POST /v1/uploads).
POST/v1/audio/music
{ "model", "prompt", "lyrics"?, "instrumental"?, "seconds"? }.
Audio tasks return the result in output.audio.
Enhance
POST/v1/enhance
{ "type", "file", "target" }:
| type | target |
|---|---|
video-upscale |
720P, 1080P, 2K, 4K (short side) |
video-fps |
30, 60, 120 |
image-upscale |
2, 4 (times) |
The price depends on the output size, frame rate and length and is shown in the task's cost. Enhance tasks cannot be canceled; result links are valid for 6 hours (fetch the task again for a new link).
Text
POST/v1/text
{ "prompt", "images"? (up to 10), "texts"? (up to 10 strings) }. Waits up to 75 seconds; returns the finished task when possible, otherwise poll it. The text is in output.text.
POST/v1/prompt-reverse
{ "file": "file_…" } — an image or a video. Returns a prompt that recreates it (output.text, plus output.short_prompt). Video costs twice the image price.
Tasks
GET/v1/tasks/{id}
{
"id": "video_88",
"type": "video",
"status": "succeeded",
"model": "apimart/seedance-2.0",
"progress": 100,
"cost": 152.5,
"cancelable": false,
"waiting_for_face_verification": false,
"created_at": "2026-11-06T08:00:00.000Z",
"started_at": "2026-11-06T08:00:05.000Z",
"finished_at": "2026-11-06T08:02:41.000Z",
"input": { "prompt": "...", "ratio": "9:16", "resolution": "720p", "seconds": 5, "images": ["file_123"] },
"warnings": [],
"output": {
"video": { "file_id": "file_901", "url": "https://...", "mime": "video/mp4", "expires_at": "..." }
},
"error": null
}
status: (preparing →) queued → running → succeeded / failed / canceled (partial for image tasks where only some images succeeded). Video tasks also have warnings (adjustments made to the references). cost is the frozen amount while running and the charged amount afterwards. output holds video, audio, image, images, last_frame or text depending on the task. URLs are valid for 24 hours; fetch the task again for a new one. error is { "code", "message" } for failed tasks.
GET/v1/tasks
Tasks created through the API, newest first. Query: type, status, limit (1–50, default 20), cursor (the next_cursor of the previous page). Returns { "tasks": [...], "has_more", "next_cursor" }.
POST/v1/tasks/{id}/cancel
Video, audio, music and image tasks can be canceled while they are still preparing or queued (full refund). Once a task is running it has been sent to the model and can no longer be canceled. Enhance and text tasks cannot be canceled.
Logs
The API keys page shows every request of the last 30 days: endpoint, status, error code, created task, IP address and duration.