Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request
Value: spark_avatar_imitator_v2v
image_url string required
Character image URL for specifying the digital human character image to generate
driving_video_info object required
Driving video information containing driving video URL and storage type
video_url
stringrequiredDriving video URL for specifying the video that drives digital human actions
store_type
integerrequiredStorage type
Value:
0
Polling
Since image generation takes time, you need to poll the task status after creation
The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint
Response Format
error object
Error information. Only present when status is failed
code
stringError code
error_message
stringDetailed error message
output array
Generation results. Only present when status is completed
content
arrayList of generated content
type
stringResource type
Value:
videourl
stringGenerated video URL (processed and uploaded to CDN)
size
integerVideo size (bytes)
jobId
stringRemote job ID
usage object
Usage statistics. Only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
input_tokens
integerNumber of input tokens
output_tokens
integerNumber of output tokens
total_tokens
integerTotal number of tokens (ComfyUI cost)
generated_videos
integerNumber of generated videos
metadata object
Metadata information
Error Codes
| Error Code | Description |
|---|---|
| 003018001 | Image URL missing |
| 003018002 | Driving video information missing |
| 003018003 | Storage type missing |
| 003018004 | Video URL missing |
| 003018005 | Invalid storage type |
| 003018006 | Invalid driving video information format |
| 003018095 | Internal generation error |
| 003018096 | Result parsing error |
| 003018097 | HTTP error response |
| 003018098 | Status check error |
| 003018099 | Task creation error |