
How to Use the Seedance 2.5 API: A Quick Guide
Learn the Seedance 2.5 API in four steps—authenticate, submit a POST job, poll for status, then download the finished 4K video, with cURL and Python samples.
You can go from API key to finished MP4 in four steps: send an authenticated POST request, save the request_id, poll the result endpoint every 10 to 20 seconds, and download the video before the link expires, often within 24 hours.
If I wanted the short version, here’s what I’d keep in mind:
- Use the right endpoint
seedance-2.5-text-to-videofor text promptsseedance-2.5-image-to-videofor animating a public image URL
- Send the right headers
Authorization: Bearer <API_KEY>Content-Type: application/json
- Pick the main output settings
resolution: 480p to 4Kaspect_ratio: like 16:9 or 9:16duration: up to 16 secondsgenerate_audio:truefor sound and spoken lines
- Poll instead of resubmitting
- Check
predictions/{request_id}/result - Watch for
queued,running,succeeded, orfailed
- Check
- Control cost
- Start at 480p or 720p
- Keep the same
seed - Re-run at 1080p or 4K only when the shot looks right
I’d also watch for the most common failure points: 401 from a bad auth header, 402 from no credits, 429 from too many active jobs, and 400 from bad JSON or missing fields. On APIMart, credits are reserved when a job starts and charged only if it finishes; failed jobs are refunded.
If you’re choosing between models, Seedance 2.5 is the top-end option in this lineup: up to 16s, up to 3,840 × 2,160, and up to 50 reference inputs. Seedance 2.0 sits in the middle, and Seedance 2 Mini is better for lower-cost drafts.
| Model | Max Duration | Max Resolution | Reference Inputs | Best Fit |
|---|---|---|---|---|
| Seedance 2.5 | 16s | 4K | Up to 50 | Final renders, product spots, polished hero clips |
| Seedance 2.0 | 15s | 4K | ~12 | General video work |
| Seedance 2 Mini | 15s | 720p | Limited | Drafts, tests, social-first mockups |
Bottom line: if you can make a valid POST request and store one ID, you can run the whole workflow. The rest is prompt tuning, patient polling, and downloading the file before the URL times out. For post-processing, you can use the AI Canvas to upscale or edit your generated clips.

Step 1: Set Up APIMart Access and Authenticate Requests

Every Seedance 2.5 request needs a valid API key and the right headers. Start there. Once that’s in place, you can move on to video generation payloads and job tracking.
Create and Store Your API Key Securely
Create your key in the account dashboard under Settings or API Keys. Then store it in a .env file or an environment variable, not in source control [6][8].
export APIMART_API_KEY="sk_live_xxxxxx"
If the key is lost, revoke it and make a new one [3]. For integration testing, use a separate sk_test_ key so you don’t touch production usage [3].
Next, include that key in every request with the Authorization header.
Add the Authorization Header Correctly
Send requests to https://muapi.ai/api/v1/ with these headers:
Authorization: Bearer sk_live_xxxxxxContent-Type: application/json
One small formatting slip can break the request. The most common one is leaving out the Bearer prefix, or missing the space before the key [3][7]. That usually leads to a 401 Unauthorized response. Leaving out Content-Type: application/json can also make the request fail [3][7].
| Status Code | Meaning | Quick Fix |
|---|---|---|
| 401 | Missing or invalid API key | Check the Bearer prefix and confirm the key wasn’t revoked [3] |
| 402 | Insufficient credits | Add credits in the dashboard [3] |
| 403 | Key lacks permission for Seedance 2.5 | Check the key scope for Seedance 2.5 [3] |
| 429 | Too many requests | Add exponential backoff and follow the Retry-After header [3][6] |
With auth set, you can move to the video request payload.
Step 2: Build a Seedance 2.5 Video Generation Request

With your API key set up, the next move is building a valid request body. Every Seedance 2.5 job begins with a POST request to one of two endpoints, based on what you're starting from. Use https://muapi.ai/api/v1/seedance-2.5-text-to-video for prompt-only generation, or https://muapi.ai/api/v1/seedance-2.5-image-to-video if you're animating a source image [1].
Choose the Right Input Mode and Parameters
Your input mode determines the payload shape. Text-to-video only needs a prompt. Image-to-video also needs an image_url that points to a publicly reachable JPG, PNG, or WEBP file under 10 MB [1].
From there, you control the output with a few main fields:
resolution:480p,720p,1080p, or4Kaspect_ratio:16:9,9:16,1:1,4:3,3:4, or21:9duration: up to 16 seconds on Muapigenerate_audio: a boolean that turns on synced ambient sound, effects, and dialogue when set totrue[1]
A smart way to work is to start at 480p with a fixed seed. If the motion, pacing, and framing look right, run that same seed again at 1080p or 4K for the final version.
For prompts, use this flow: Subject → Action → Camera → Setting → Mood [4]. Keep motion, camera direction, and mood inside the prompt itself, and leave the seed unchanged while you test variations. If you need lip-sync, place the spoken line in double quotes right inside the prompt string. For example: she turns and says "We launch at dawn." In that case, make sure generate_audio is set to true [1].
Once the payload looks good, submit the job and save the returned request ID. You'll need it for polling.
Sample Requests in cURL, Postman, Python, and JavaScript

Below is the same text-to-video payload shown in four common tools.
cURL
curl -X POST https://muapi.ai/api/v1/seedance-2.5-text-to-video \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A barista steams milk, then pours a latte art heart. Close-up, warm café lighting, cinematic.",
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 8,
"generate_audio": true,
"seed": 42
}'
Postman - Create a new POST request, paste in the endpoint URL, add Authorization: Bearer <your_key> and Content-Type: application/json in the Headers tab, then paste the JSON above into Body → raw → JSON. Click Send and save the request_id from the response.
Python
import os, requests
payload = {
"prompt": "A barista steams milk, then pours a latte art heart. Close-up, warm café lighting, cinematic.",
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 8,
"generate_audio": True,
"seed": 42
}
response = requests.post(
"https://muapi.ai/api/v1/seedance-2.5-text-to-video",
headers={
"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}",
"Content-Type": "application/json"
},
json=payload
)
print(response.json()) # save request_id here
JavaScript (fetch)
const response = await fetch("https://muapi.ai/api/v1/seedance-2.5-text-to-video", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.APIMART_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "A barista steams milk, then pours a latte art heart. Close-up, warm café lighting, cinematic.",
aspect_ratio: "16:9",
resolution: "1080p",
duration: 8,
generate_audio: true,
seed: 42
})
});
const data = await response.json();
console.log(data.request_id); // use this to poll for results
A few mistakes can trip you up fast. Don't send an image_url that isn't publicly reachable. Don't stack camera directions that fight each other in the same prompt. And in image-to-video mode, don't describe a subject again if the source image already defines it [1].
After submission, poll the job status until the MP4 URL is ready.
When to Use Seedance 2.5 in APIMart's Video Model Lineup
This quick comparison helps you pick the right model before you start tweaking prompts or bumping up resolution. Seedance 2.5 gives you native 4K, up to 50 reference inputs, and longer clip support. Seedance 2 Mini is better for lightweight drafts, while Seedance 2.0 sits in the middle as the general-use option [1][9][4].
| Model | Max Duration | Max Resolution | Reference Inputs | Ideal Use Case |
|---|---|---|---|---|
| Seedance 2.5 | 16s | 4K | Up to 50 | High-end commercials, cinematic hero shots |
| Seedance 2.0 | 15s | 4K | ~12 | General narrative video, character-consistent content |
| Seedance 2 Mini | 15s | 720p | Limited | Fast iteration, social media drafts, concept validation |
If the project is a final deliverable - like a product launch video, a branded cinematic sequence, or anything headed to broadcast - Seedance 2.5 is the better pick. For projects requiring 高品質音声付きAI動画生成, Google's Veo 3.1 is another strong contender. If you're still testing ideas, start with Mini to check motion and lock framing at lower cost, then move up to 2.5 for the final render.
Step 3: Submit the Job, Track Status, and Read the Response
Once you send the POST request, the API returns a request_id. Save it. You’ll use that ID to check the job later because generation runs asynchronously.
Handle Async Jobs from Creation to Completion
After you submit the job, the next step is simple: poll until the final video is ready.
Send a GET request to https://muapi.ai/api/v1/predictions/{request_id}/result. Wait about 10 seconds after submission before the first poll, then check again every 10–20 seconds. If you poll more often than every 5 seconds, you may hit rate limits [1][3].
Each response includes a status field. That field tells you what’s happening and what you should do next:
| Status | Meaning | Recommended Action |
|---|---|---|
queued / pending | Accepted and waiting for resources | Keep polling with backoff |
running / processing | Model is actively generating | Wait; do not resubmit |
succeeded / completed | Output is ready | Fetch results and save to durable storage |
failed | Rejected or crashed during generation | Log error.code and message; alert the user |
expired | Exceeded the execution window | Mark as retryable only if still relevant |
cancelled | Stopped by user or admin action | Stop polling; surface the cancellation to the user |
Once the job reaches succeeded, grab the output URL before it expires.
Read Output Fields and Save Results
When the status changes to succeeded, read the output payload and store the result.
A successful response includes video_url. It may also include last_frame_url if you asked for it. Save video_url, the optional last_frame_url, and metadata like seed, duration, resolution, aspect_ratio, and usage. That data matters for billing and for reproducing the same run later [11][13].
Output URLs often expire within 24 hours, so download the file to your own storage right away [11][12][13]. If a job fails, log error.code and error.message. And if the failure is tied to safety checks, don’t retry it automatically [2][11][12].
Step 4: Troubleshoot Errors, Control Cost, and Wrap Up
Fix Authentication, Validation, and Rate-Limit Errors
After you submit a job and poll for results, a few simple checks can keep production runs from going off the rails. Most Seedance failures tend to show up in the same handful of ways.
| Error Code | HTTP Status | Likely Cause | Fix |
|---|---|---|---|
invalid_api_key | 401 | Missing or revoked key | Set Authorization: Bearer <API_KEY> [1][3] |
invalid_request | 400 | Malformed JSON or missing required fields | Validate required fields and parameter ranges [3] |
insufficient_credits | 402 | Account balance is empty | Top up credits in the dashboard [3] |
rate_limited | 429 | Too many jobs running at once - treat this as a concurrency limit, not a request rate cap; stagger submissions and use exponential backoff: start at 10 seconds, double each retry, cap at 60 seconds [12][2][3] | Let active jobs finish before queuing new ones |
not_found | 404 | request_id does not exist or is older than 7 days | Verify the correct request_id; task records are available for about 7 days [12][3] |
internal_error | 500 | Provider-side failure | Wait, then retry after a delay and check the service status page [5][3] |
For reference assets, make sure the URL is public, the file is JPG, PNG, or WEBP, and it stays under the listed size limit [12][4].
Cut Costs and Improve Reliability
Once error handling is set, the next step is simple: test cheap, then render big.
Start your prompt at 480p or 720p. That gives you a low-cost way to check framing, motion, and whether the prompt is doing what you want. If the shot looks right, rerun the same seed value at 4K for the final output [1][4].
Clip length matters too. Shorter videos cost less, so keep duration to the minimum that still does the job [1][10].
There’s also a sneaky way teams burn money: duplicate submissions after a network timeout. One clean fix is to hash the prompt, model ID, and media URLs before each POST request. If that hash already maps to a task ID, skip the new submission altogether [11]. And once a job hits succeeded, save the finished file to durable storage so you don’t have to depend on the task record later [12][11].
Conclusion: From API Docs to Working Video Generation
With auth, payloads, polling, and error handling in place, you now have a full Seedance 2.5 workflow on APIMart.
FAQs
How long does Seedance 2.5 take to finish a video?
Seedance 2.5 can generate one continuous video clip up to 30 seconds long. The docs, however, don't list an exact finish time.
The API runs asynchronously. You submit a task, get a task ID, and then either poll the status endpoint or wait for a webhook to get the finished video.
Processing time can vary based on things like resolution and scene complexity.
What should I do if my video URL expires before I download it?
If your video URL expires before you download it, you won't be able to get the file from that link. Seedance keeps these temporary URLs active for 24 hours.
The safe move is simple: copy the video to your own secure object storage as soon as the task shows as completed. Because the API runs asynchronously and doesn't keep output forever, your app should fetch the video and move it to long-term storage right away.
How can I avoid duplicate charges when retrying failed requests?
Use idempotent request handling tied to your own durable job records, not just the HTTP client.
Before you submit anything, build a deterministic request hash from inputs like the prompt, model ID, asset IDs, and user identifier. Then save that hash with a submitting status in your own database.
If that same hash shows up again, return the existing job instead of creating a new one.
Once you’ve stored a provider job ID, don’t submit the request again. Just resume polling with that job ID.
Choose the model you want in the model marketplace
Try chat, image and video models in the APIMart model marketplace, and experience model capabilities quickly with one unified API.