Status da Requisição HeyGen:

Código HTTP Recebido: 402

Falha na API da HeyGen.

A resposta não contém um ID de vídeo ou houve um erro.

Resposta completa da API:

{"data": null, "error": {"code": "insufficient_credit", "message": "Insufficient credits. Purchase credit packs to continue."}, "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"}}

Log Verboso do cURL:

* Host api.heygen.com:443 was resolved.
* IPv6: (none)
* IPv4: 18.226.38.118, 18.227.38.160, 3.135.252.196
*   Trying 18.226.38.118:443...
* ALPN: curl offers h2,http/1.1
* SSL Trust Anchors:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*   subject: CN=heygen.com
*   start date: Feb  3 00:00:00 2026 GMT
*   expire date: Mar  4 23:59:59 2027 GMT
*   issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M01
*   Certificate level 0: Public key type ? (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type ? (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type ? (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   subjectAltName: "api.heygen.com" matches cert's "*.heygen.com"
* OpenSSL verify result: 0
* SSL certificate verified via OpenSSL.
* Established connection to api.heygen.com (18.226.38.118 port 443) from 186.209.113.99 port 56324 
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://api.heygen.com/v2/video/generate
* [HTTP/2] [1] [:method: POST]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: api.heygen.com]
* [HTTP/2] [1] [:path: /v2/video/generate]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [x-api-key: N2UzZjI4M2NkMGVlNDkxNWE1NjEyN2JkMTZlMmRiOGQtMTc1NzIxNjkxNg==]
* [HTTP/2] [1] [content-type: application/json]
* [HTTP/2] [1] [content-length: 605]
> POST /v2/video/generate HTTP/2
Host: api.heygen.com
Accept: */*
X-Api-Key: N2UzZjI4M2NkMGVlNDkxNWE1NjEyN2JkMTZlMmRiOGQtMTc1NzIxNjkxNg==
Content-Type: application/json
Content-Length: 605

* upload completely sent off: 605 bytes
< HTTP/2 402 
< date: Sun, 13 Sep 2026 00:35:58 GMT
< content-type: application/json
< content-length: 630
< server: gunicorn
< deprecation: true
< sunset: Sat, 31 Oct 2026 00:00:00 GMT
< x-heygen-request-id: 47a4fae4546241f3a17d3a6f2bcfe9ac
< 
* Connection #0 to host api.heygen.com:443 left intact