Endpoint
Request Headers
| Parameter | Value | Description |
|---|---|---|
| x-api-key | API Key | Request authorization. Get Token for Bearer alternative. |
| Authorization | Bearer {token} | Optional Bearer token |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| _id | String | true | _id returned from Create Head Swap Task |
Response Attributes
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Business status code (1000 = success) |
| msg | String | Status message |
| data | Object | Task detail |
| - _id | String | Task id |
| - uid | Integer | User id |
| - team_id | String | Team id |
| - source_video_url | String | Source video URL |
| - create_time | Long | Creation time (ms) |
| - status | Integer | 1 queue, 2 processing, 3 completed, 4 failed |
| - video_duration | Number | Duration in seconds |
| - resolution | String | Output resolution |
| - deduction_duration | Number | Billing-related duration metric (meaning per platform agreement) |
| - video_url | String | null | Output video URL when completed; may be empty while processing |
| - progress | Number | Approximate 0–100 |
| - priority | Number | Priority-related value if returned |
| - task_id | String | Internal processing id |
| - error_reason | String | Failure reason when failed |
| - error_code | Number | Failure code when failed |
| - file_name | String | Output file name |
| - model_name | String | Model id |
Example
Request
Response (task completed)
Response (still processing)
Whilestatus is 1 or 2, video_url may be empty. Keep polling or rely on webhookUrl from Create Head Swap Task.
Task Status
| Status | Description |
|---|---|
| 1 | In queue |
| 2 | Processing |
| 3 | Completed — use video_url for the rendered file |
| 4 | Failed — inspect error_reason / error_code if present |
Important Notes
- Use the
_idfrom the create-task response as the_idquery parameter here (not the analysis record id). - Download the output promptly; hosted URLs may expire per platform policy.
- Other
statusvalues may appear as the API evolves — confirm with support if you encounter unexpected codes.