簡単な回答
現在公開されている Seedance 2.0 APIドキュメントによると、APIはタスクの作成とタスクステータスの照会を提供していますが、タスクのキャンセルまたは削除用エンドポイントは提供していません。 タスクが正常に作成されると、APIはtask_idを返します。クライアントのタイムアウト、ネットワークの中断、Webページを閉じたこと、またはポーリングを停止したことは、タスクがキャンセルされた証拠とみなさないでください。再試行するかどうかを判断する前に元のタスクを照会し、重複したタスクを作成しないようにしてください。
公開エンドポイントとタスクステータス
Seedance 2.0 は現在、非同期タスクエンドポイントを使用します。
タスクは通常、次のライフサイクルに従います。
queued: タスクが作成され、キューで待機しています。running: タスクが処理中です。succeeded: 動画生成が正常に完了しました。failed: タスクの処理に失敗しました。expired: タスクが実行可能時間を超過し、期限切れになりました。
What should I do after submitting a task?
Step 1: Save the task ID and request details
Save the returnedtask_id immediately after the creation request succeeds.
You should also record:
- The model name;
- The prompt or a prompt summary;
- Important parameters such as duration, resolution, and aspect ratio;
- The submission time;
- The request ID;
- The business ID in your own system.
Step 2: Query the original task
Seedance 2.0 tasks usually take minutes. The current API documentation recommends:- Waiting about 20–30 seconds after submission before the first query;
- Querying every 10–20 seconds afterward;
- Not resubmitting immediately just because the video is not available yet.
YOUR_TASK_ID: The task ID returned by the task-creation endpoint;YOUR_API_KEY: An API key created in the APIYI console.
Step 3: Handle each task status
Handle the returned status as follows:queued: The task is still waiting; continue waiting and querying.running: The task is still generating; continue waiting and querying.succeeded: Download the video fromcontent.video_urlimmediately.failed: Inspect theerrorinformation in the response.expired: Review the task details and call logs to determine why it expired.
queued or running as failures, and do not create another task just because the current task has not finished.
Step 4: Confirm the task status after a client timeout
Do not retry immediately if the client did not receive a complete response. Check the following in order:- Check whether the client response already contains a
task_id. - Check whether the console call logs contain a task record.
- If a
task_idexists, query the original task first. - If no
task_idis visible yet, do not conclude from the network error alone that no task was created. - If you cannot confirm whether the task was created, ask support to verify it before retrying.
How can I prevent duplicate submissions?
The following are integration-side engineering practices, not mandatory platform rules:- Generate a unique business ID for each request.
- Store the mapping between the business ID and the Seedance
task_id. - Temporarily disable the submit button after the user submits a request.
- After a client timeout or process exit, resume by querying the original task.
- Store the prompt, model, duration, aspect ratio, and reference-material details.
- Consider a new submission only after confirming that the original task does not exist or has clearly failed.
- Distinguish in-progress statuses from terminal statuses. Do not treat
queuedorrunningas failures.
重複送信後の課金をどのように照合すべきですか?
現在のSeedance 2.0のドキュメントでは、課金フローは次のように説明されています。InvalidParameter HTTP 400リクエスト)は課金されないとも記載されています。
ただし、以下の情報だけでは、課金されたかどうかを判断できません。
- クライアントのタイムアウト;
- ネットワークの切断;
failed;expired;- クライアントが完全なレスポンスを受信していないこと;
- サーバー上ではタスクが作成されている可能性があるにもかかわらず、クライアントにリクエストの失敗が表示されること。
- 関連するすべてのSeedance
task_idの値; - 対応するリクエスト ID;
- 送信時刻;
- モデル名;
- 重要なリクエストパラメーター;
- コンソールの呼び出しログ;
- 課金またはチャージ記録のスクリーンショット。
failed、expired、またはクライアントのタイムアウトだけを根拠に、タスクが確実に課金された、または確実に課金されていないと結論付けないでください。よくある質問
ポーリングを停止すると、Seedance のタスクも自動的に停止しますか?
そうとは限りません。 ポーリングを停止することは、クライアントがタスクのステータスを照会しなくなることを意味するだけです。現在公開されている API ドキュメントにはキャンセル用のエンドポイントが記載されていないため、ポーリングを停止しても、サーバー側のタスクがキャンセルされたことを意味しません。 元のtask_id を保存し、後でもう一度照会してください。
リクエストがタイムアウトした直後に再試行できますか?
直ちに再試行することは推奨しません。 まず、次の点を確認してください。- レスポンスに
task_idが含まれているかどうか。 - コンソールの呼び出しログにタスクの記録があるかどうか。
- 元のタスクの現在のステータス。
- 対応する課金記録がすでに存在するかどうか。
失敗または期限切れの場合、必ず課金されていないということですか?
タスクのステータスだけでは、課金結果を判断できません。 Seedance 2.0 では、送信時に事前課金を行い、完了後に精算します。呼び出しログと課金記録の両方を確認してください。記録に誤りがあるように見える場合は、確認のためにタスクIDとリクエストIDをサポートに提供してください。無効なパラメータが原因の HTTP 400 は課金されますか?
現在のドキュメントでは、タスクを作成せずに無効なパラメータを理由として拒否されたリクエストは、課金されないと説明されています。 例:- パラメータ形式が無効である。
- サポートされていない解像度である。
- アスペクト比が無効である。
- サポートされていない動画の長さである。
- モデルとパラメータの組み合わせに互換性がない。
生成された動画のURLはどのくらい保持できますか?
現在のドキュメントでは、成功したレスポンスのcontent.video_url は約24時間有効な一時的な署名付きURLであると説明されています。
タスクが succeeded に達したら、できるだけ早く動画をダウンロードして保存してください。URLを永続的なものとして扱わないでください。
現在のドキュメントでは、タスクID自体は7日間保持されるとも説明されています。それでも、ビジネス上の追跡のために、独自のタスク記録を保存してください。
関連ドキュメント
サポートへのお問い合わせ
次の場合は、サポートにお問い合わせください。queuedまたはrunningのまま、通常よりも長時間経過しているタスクがある場合;- クライアントのタイムアウト後にタスクが作成されたかどうか確認できない場合;
- 重複送信後に複数のタスクが作成された場合;
- タスクのステータスと課金記録が一致しない場合;
- 成功したタスクで動画が返されない、またはダウンロードできない場合。
- Seedance
task_id; - リクエストID;
- 送信時刻;
- モデル名;
- 重要なリクエストパラメータ;
- コンソールの呼び出しログ;
- 関連する課金記録。