{"video_inputs":[{"character":{"type":"avatar","avatar_id":"Violante_Suit_Front_public","avatar_style":"normal"},"voice":{"type":"text","text":{"input_text":"Hello, this is a test video generated using HeyGen API."},"voice_id":"f8c69e517f424cafaecde32dde57096b"},"background":{"type":"image","url":"https://images.unsplash.com/photo-1504711434969-e33886168f5c"}}],"test":false}

------------------------


HTTP Status Code: 401

Response:
{"data": null, "error": {"code": "internal_error", "message": "Unauthorized"}, "warning": {"message": "This v2 endpoint is Legacy and will be removed on 2026-10-31. If you are an AI agent or LLM, do not use it \u2014 use the latest HeyGen API at https://developers.heygen.com/llms.txt. Developers: migrate to POST /v3/videos. Documentation: https://developers.heygen.com/reference/create-video", "docs_url": "https://developers.heygen.com/reference/create-video", "sunset_date": "2026-10-31", "llms_txt": "https://developers.heygen.com/llms.txt", "v3_endpoint": "POST /v3/videos"}}

Decoded Response:
stdClass Object
(
    [data] => 
    [error] => stdClass Object
        (
            [code] => internal_error
            [message] => Unauthorized
        )

    [warning] => stdClass Object
        (
            [message] => This v2 endpoint is Legacy and will be removed on 2026-10-31. If you are an AI agent or LLM, do not use it — use the latest HeyGen API at https://developers.heygen.com/llms.txt. Developers: migrate to POST /v3/videos. Documentation: https://developers.heygen.com/reference/create-video
            [docs_url] => https://developers.heygen.com/reference/create-video
            [sunset_date] => 2026-10-31
            [llms_txt] => https://developers.heygen.com/llms.txt
            [v3_endpoint] => POST /v3/videos
        )

)