Task: Generate Digital Human Video
Digital human video generation API for creating videos from avatar and voice information.
Overview
- Method:
POST - Path:
/avatar/generation - Content-Type:
application/json - Category: Video Models (Video) / Digital Human
Authentication
- Header:
Authorization: Bearer <token>
Request Parameters
JSON Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
| avatar_url | string | Yes | URL of the avatar image or video |
| audio_url | string | No | Audio URL. Choose exactly one of audio_url, create_voice, or use_voice |
| no_watermark | boolean | No | Whether to remove watermark, default false |
| create_voice | object | No | Create a voice from audio, requires audio_url, language, and text |
| use_voice | object | No | Use an existing voice, requires voice_engine_id, audio_id, language, and text |
create_voice Fields
| Field | Type | Required | Description |
|---|---|---|---|
| audio_url | string | Yes | Audio URL for the voice style, requires at least 20 seconds of recording |
| language | string | Yes | Language, supports zh, en |
| text | string | Yes | Text to convert into speech |
use_voice Fields
| Field | Type | Required | Description |
|---|---|---|---|
| voice_engine_id | string | Yes | Voice engine ID |
| audio_id | string | Yes | Audio ID |
| language | string | Yes | Language, supports zh, en |
| text | string | Yes | Text to convert into speech |
Note: Choose one among
audio_url,create_voice, anduse_voice.
Request Example
curl Example
bash
curl -X POST "https://api.gpt.ge/avatar/generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_TOKEN" \
-d '{
"audio_url": "https://cdn.gptbest.vip/file/cdn/20250107/RFDQkBGVrHFydzGzzvgXGQmbuPhicK.mp3",
"avatar_url": "https://p2.a.kwimgs.com/bs2/upload-ylab-stunt/special-effect/output/HB1_PROD_ai_web_119206500/9065890952728122033/out.mp4",
"no_watermark": true
}'JavaScript (fetch) Example
javascript
fetch('https://api.gpt.ge/avatar/generation', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
audio_url: 'https://cdn.gptbest.vip/file/cdn/20250107/RFDQkBGVrHFydzGzzvgXGQmbuPhicK.mp3',
avatar_url: 'https://p2.a.kwimgs.com/bs2/upload-ylab-stunt/special-effect/output/HB1_PROD_ai_web_119206500/9065890952728122033/out.mp4',
no_watermark: true
})
})
.then(res => res.json())
.then(console.log)Python (requests) Example
python
import requests
resp = requests.post(
'https://api.gpt.ge/avatar/generation',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
json={
'audio_url': 'https://cdn.gptbest.vip/file/cdn/20250107/RFDQkBGVrHFydzGzzvgXGQmbuPhicK.mp3',
'avatar_url': 'https://p2.a.kwimgs.com/bs2/upload-ylab-stunt/special-effect/output/HB1_PROD_ai_web_119206500/9065890952728122033/out.mp4',
'no_watermark': True
}
)
print(resp.json())Response Fields
| Field | Type | Description |
|---|---|---|
| id | string | Task ID, use query API to retrieve generation results |
Response Example (200)
json
{
"code": "success",
"message": "",
"data": "57b9ba07db5e4ed5bf18ebb4179a826d"
}