Skip to main content
GET
中国本土のユーザー向け: 中国本土のユーザーは https://toapis.cn を API エンドポイント(Base URL)としてご利用ください。本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください。
  • Query async video generation task execution status and results
  • Real-time status updates and progress tracking
  • Get generated videos when task completes
  • Multi-language support (zh/en/ko/ja)
All video generation tasks are executed asynchronously. After submitting a task, you need to query the status and results via the query endpoint.
オンデマンド素材審査の動画タスクもこの API で照会します. queued には素材の準備や審査待ちも含まれ, タスクの受理は動画生成開始を意味しません. 準備期限は既定で 1 ラウンド 20 分で, その後の動画生成時間は含みません. 失敗時は error.message を確認します. 旧素材 API の個別ポーリングは不要です.

Authorizations

string
必須
All endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:

Path パラメータ

string
必須
Task ID returned by the video generation API

レスポンス

string
Unique task identifier
string
Object type, always generation.task
string
Task status
  • queued - Queued for processing
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
integer
Task progress percentage (0-100)
string
Video generation model used
integer
Task creation time (Unix timestamp)
integer
Task completion time (Unix timestamp, only returned when completed)
integer
Video URL expiration time (Unix timestamp, only returned on completion)
object
Task result (only returned on success)
object
モデルのツール使用量。Seedance 2 で tools: [{ "type": "web_search" }] を使用した場合、usage.tool_usage.web_search は実際の検索回数です。0 は検索なしを示します。
object
任意のプラットフォーム課金状態と確定済み請求額です。status は pending、settled、refunded のいずれかです。credits と cost_usd は 10 進文字列で、純請求額を確認できた場合だけ返します。オブジェクトがない場合も無料とは限りません。料金と実際の請求額を参照してください。
object
エラー information (only returned on failure)

Task ステータス Reference

Polling Strategy

Python Polling Example

Resource Expiration

Generated video URLs are valid for 24 hours
  • Please download and save videos within the validity period
  • expires_at field indicates video expiration time (Unix timestamp)
  • Expired videos cannot be accessed; to regenerate, submit a new task
  • Thumbnails expire simultaneously with videos

エラー Codes

Performance Tips

Video generation takes longer, recommendations:
  1. ToAPIs Task Webhook: Webhook を主経路、照会をフォールバックにします
  2. 照会間隔: 5~10秒以上と jitter。429 は Retry-After を読み exponential backoff
  3. Set Timeout: Long videos may take 5-10 minutes, set reasonable timeout
  4. Download Promptly: Videos expire after 24 hours, save to your storage immediately
非同期タスクのレート制限を参照してください。バッチ照会は最大100件です。