コンテンツへスキップ
Videos

動画upload targetを更新

POST/api/v1alpha1/videos/{video_id}/upload/targets

fresh direct-to-storage targetを返します。サーバーは要求されたmultipart part番号を、計算済みのtotalに対して検証します。

認証

apiKey
認証Bearer <token>

場所: header

パスパラメーター

video_id*string

動画の識別子です。アップロードセッションの id で返ります。

ヘッダーパラメーター

Idempotency-Key?string

このPOSTを安全にretryするための任意のkeyです。keyは24時間保持され、request payloadと具体的なpath parameterと比較されます。

長さlength <= 255

リクエストボディ

application/json

TypeScript 型定義

TypeScript では request body 型を使用します。

レスポンスボディ

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1alpha1/videos/vid_0190b5d4-7e1f-7a2b-9c3d-1234567890ab/upload/targets" \  -H "Authorization: Bearer $DEEPFRAME_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "part_numbers": [      1,      2,      3    ]  }'
{  "chunk_size": 10485760,  "completed_parts": 2,  "expires_at": "2026-08-08T10:15:00.000Z",  "file_size": 157286400,  "received_parts": [    1,    3  ],  "reported_bytes": 20971520,  "state": "open",  "strategy": "direct",  "target": {    "expires_at": "2026-08-08T10:15:00.000Z",    "headers": {},    "method": "put",    "part_number": 2,    "url": "https://s3.example.test/upload"  },  "targets": [    {      "expires_at": "2026-08-08T10:15:00.000Z",      "headers": {},      "method": "put",      "part_number": 2,      "url": "https://s3.example.test/upload"    }  ],  "total_chunks": 16,  "uploaded_bytes": 10485760,  "verified_bytes": 0,  "video_id": "vid_0190b5d4-7e1f-7a2b-9c3d-1234567890ab"}