Skip to content

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

FieldTypeRequiredDescription
avatar_urlstringYesURL of the avatar image or video
audio_urlstringNoAudio URL. Choose exactly one of audio_url, create_voice, or use_voice
no_watermarkbooleanNoWhether to remove watermark, default false
create_voiceobjectNoCreate a voice from audio, requires audio_url, language, and text
use_voiceobjectNoUse an existing voice, requires voice_engine_id, audio_id, language, and text

create_voice Fields

FieldTypeRequiredDescription
audio_urlstringYesAudio URL for the voice style, requires at least 20 seconds of recording
languagestringYesLanguage, supports zh, en
textstringYesText to convert into speech

use_voice Fields

FieldTypeRequiredDescription
voice_engine_idstringYesVoice engine ID
audio_idstringYesAudio ID
languagestringYesLanguage, supports zh, en
textstringYesText to convert into speech

Note: Choose one among audio_url, create_voice, and use_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

FieldTypeDescription
idstringTask ID, use query API to retrieve generation results

Response Example (200)

json
{
  "code": "success",
  "message": "",
  "data": "57b9ba07db5e4ed5bf18ebb4179a826d"
}