Error Responses

HTTP response codes from the API are used to indicate general classes of success and error. Error responses contain more detail about the error in the response body, in the "code" and "message" properties.

codeenum_namemessagedetail
40009INVALID_CREDENTIALSInvalid credentials providedInvalid API key or OAuth token
400101USER_NOT_FOUNDUser not foundUser associated with credentials not found
400112UNAUTHORIZEDUnauthorizedMissing or invalid authentication
401057INVALID_ACCESS_TOKENInvalid access tokenInvalid OAuth2 access token
401056ACCESS_TOKEN_EXPIREDAccess token expiredOAuth2 token has expired
400561SPACE_NOT_FOUNDspace not foundSpace ID not found
400573PERMISSION_DENIEDpermission deniedInsufficient permissions
400562FORBIDDENforbiddenAccess forbidden
400599TIER_NOT_SUPPORTPlease upgrade to Creator / Business plan to use this feature.Subscription tier insufficient
400631USER_BLOCKEDYour account has been suspended due to detected violation of our policy and terms. Please read and follow our guideline carefully when using HeyGen. If you have any question, please email [email protected] for further support.Account suspended
40001MISSING_PARAMSMissing required input parametersRequired parameters missing
400175INVALID_PARAMETERInvalid parameterInvalid parameter value
40012INVALID_QUERY_PARAMInvalid querying parameterInvalid query parameter
40065INVALID_VIDEO_INFOSInvalid video infosInvalid video input data
40039INVALID_TEXT_INPUTInvalid text detectedInvalid text content
400105BLOCKED_WORDS_DETECTEDBlocked words detectedInappropriate text content
40010VIDEO_FORMAT_NOT_SUPPORTEDVideo format not supportedUnsupported video format
40031INVALID_VIDEO_IDInvalid video idInvalid video ID format
400652VIDEO_FILE_CORRUPTEDVideo file corruptedVideo file is corrupted
400621EMPTY_VIDEO_STREAMempty video streamVideo has no video stream
400624EMPTY_AUDIO_STREAMempty audio streamVideo has no audio stream
40044INVALID_AUDIO_FORMATInvalid audio formatUnsupported audio format
40056FAILED_TO_GENERATE_AUDIOFailed to generate audioAudio generation failed
1000022AUDIO_DURATION_TOO_LONGAudio duration too longAudio exceeds maximum duration
401035AUDIO_LENGTH_MISMATCHAudio length mismatchAudio length doesn't match video
401015AUDIO_CORRUPTION_ERRORAudio or video may be corruptedAudio/video corruption detected
400168INAPPROPRIATE_CONTENTNSFW content detectedNSFW content detected
400625CELEBRITY_CONTENTCelebrity face detectedCelebrity face detected
402007CHILD_SAFETY_MODERATION_FAILEDModeration failed: Underage content detected.Underage content detected
402008CELEBRITY_MODERATION_FAILEDModeration failed: Celebrity detected.Celebrity detected
402009INAPPROPRIATE_CONTENT_MODERATION_FAILEDModeration failed: NSFW content detected.NSFW content detected
401003MODERATION_POLICY_VIOLATEDModeration policy violatedContent policy violation
400680UNSAFE_PROMPTUnsafe promptUnsafe text prompt
400165MOVIO_VIDEO_TOO_SHORTDuration is too short, try another videoVideo duration too short
400150MOVIO_VIDEO_IS_TOO_LONGVideo is too longVideo duration too long
400128MOVIO_PHOTAR_DURATION_TOO_LONGDuration is too longPhoto avatar duration too long
400664TRIAL_VIDEO_LIMIT_EXCEEDEDYou have reached your daily trial video limitTrial limit exceeded
400140MOVIO_API_EXCEED_RATE_LIMITExceed rate limitRate limit exceeded
401028QUOTA_LIMITQuota limitQuota limit reached
40019EXCEED_USAGE_LIMITexceed usage limitUsage limit exceeded
400118CREDIT_NOT_ENOUGHCredit not enoughInsufficient credits
400153GUEST_GENERATE_LIMITPlease sign up to make more videosGuest user limit reached
400144AVATAR_NOT_FOUNDAvatar not foundAvatar not found
400174PHOTAR_NOT_FOUNDPhotar not foundPhoto avatar not found
40090INVALID_AVATAR_INFOAvatar info is invalidInvalid avatar information
40004NO_FACE_ERRORNo face detectedNo face detected in image
40005TOO_MANY_FACES_ERRORMultiple faces foundMultiple faces detected
40006BAD_QUALITY_IMAGEImage quality is not good enoughImage quality insufficient
400685AVATAR_USAGE_NOT_PERMITTEDAvatar usage not permittedAvatar usage not allowed
400116VOICE_NOT_FOUNDVoice not foundVoice not found
400548TTS_VOICE_UNAVAILABLE_ERRText to speech voice not availableVoice not available
400552TTS_CUSTOMER_VOICE_ERRVoice not foundCustom voice not found
400551TTS_PAID_VOICE_ERRPaid voice is only available for premium usersPremium voice access required
400634TTS_LANGUAGE_ERRORtts language errorTTS language error
400549TTS_PROVIDER_ERRText to speech provider errorTTS provider error
401030ELEVENLABS_TTS_ERRORtts errorElevenLabs TTS error
400701TTS_TOO_MANY_REQUEST_ERRtoo many request, please try again laterTTS rate limit exceeded
40072TEMPLATE_NOT_FOUNDTemplate not foundTemplate not found
400608HEYGEN_TEMPLATE_NOT_FOUNDheygen template not foundHeyGen template not found
40092VIDEO_GENERATE_ERRORVideo generation encounted errorVideo generation failed
40071DUPLICATE_VIDEO_GENERATIONDuplicate video generationDuplicate generation request
400576VIDEO_RENDER_FAILEDFailed to render videoVideo rendering failed
40062RETRIABLE_JOB_ERRORFailed to generate video, please try againRetriable generation error
400171VIDEO_NOT_COMPLETEDVideo not completedVideo generation not complete
404002WORKFLOW_ALREADY_EXISTSWorkflow already existsWorkflow already exists
404003WORKFLOW_NOT_FOUNDWorkflow not foundWorkflow not found
404001WORKFLOW_VALIDATION_ERRORWorkflow input validation errorWorkflow validation failed
40051RESOURCE_NOT_FOUNDResource is not foundResource not found
400179ASSET_NOT_FOUNDAsset not foundAsset not found
400114VIDEO_NOT_FOUNDVideo not foundVideo not found
400578RESOURCE_ACCESS_DENIEDresource access deniedResource access denied
40003UPLOAD_FAILUREObject upload failedFile upload failed
40023DOWNLOAD_FAILUREObject download failedFile download failed
400609S3_UPLOAD_FAILEDs3 upload failedS3 upload failed
400610S3_DOWNLOAD_FAILEDs3 download failedS3 download failed
400616HTTP_DOWNLOAD_FAILEDhttp download failedHTTP download failed
400617HTTP_UPLOAD_FAILEDhttp upload failedHTTP upload failed
40002IMAGE_FORMAT_NOT_SUPPORTEDImage format not supportedUnsupported image format
400543ASSET_FORMAT_NOT_SUPPORTEDAsset format not supportedUnsupported asset format
400111INVALID_FILE_TYPEInvalid file typeInvalid file type
40013QUERY_URL_FAILUREFailed on query urlURL query failed
40045NO_VIDEO_URL_FOUNDNo video URL foundVideo URL not found
401029URL_NO_LONGER_AVAILABLEThe URL is no longer availableURL no longer available
400627INVALID_GOOGLE_DRIVE_URLinvalid google drive urlInvalid Google Drive URL
500000INTERNAL_SERVER_ERRORInternal server errorInternal server error
40099UNKNOWN_ERRORSomething is wrong, please contact [email protected]Unknown error
400106REQUEST_TIMEOUTRequest timeoutRequest timeout
400558API_CONNECTION_ERRORAPI connection errorAPI connection error
400591THIRD_PARTY_ERRORthird party errorThird party service error
40042TRANSCODE_ERRORTranscoding ErrorVideo transcoding failed
400611VIDEO_TRANSCODE_NOT_READYvideo transcode is not readyVideo transcode not ready
40032PROCESS_VIDEO_STREAM_ERRORProcess video stream errorVideo stream processing error
40033PROCESS_VIDEO_ANALYZE_ERRORProcess video analyze errorVideo analysis error
400672SRT_FILE_ERRORSRT file errorSRT subtitle file error
40041JOB_NOT_READYJob not readyJob not ready
40043INVALID_JOB_IDInvalid Job IDInvalid job ID
40029UNKNOWN_JOB_TYPEUnknown job typeUnknown job type
400164MOVIO_JOB_NOT_FOUNDHeyGen job not foundJob not found
400557MISSING_JOB_CONTEXTMissing job contextJob context missing
40038PAYMENT_NOT_READYPayment not readyPayment not ready

Additional Context-Specific Errors

ScenarioError MessageHTTP StatusDescription
Video Dimension ValidationVideo width or height must be smaller than 4096 and larger than 128400Invalid video dimensions
Video Dimension ValidationVideo width and height must be even number400Dimensions must be even numbers
URL Validationnot a valid URL: {url}400Invalid URL format provided
Video Input Validationeither url or video_asset_id needs to be provided400Missing video source
Asset ValidationVideo asset not found: {asset_id}404Referenced video asset missing
Voice ValidationVoice not found: {voice_id}400Invalid voice ID
TTS ValidationTTS voice must be provided with text voice settings400Missing TTS settings
Folder AccessResource access denied403No access to specified folder
Content SafetyPlease upgrade your plan to generate 4K videos4004K requires paid plan

Streaming API

HTTP Status CodecodemessageDescription
40010001Session state wrong: newThe session state is incorrect; it should not be "new".
40010002Session state wrong: connectingThe session state is incorrect; it should not be "connecting".
40010003Session state wrong: connectedThe session state is incorrect; it should not be "connected".
40010004Session state wrong: closingThe session state is incorrect; it should not be "closing".
40010005Session state wrong: closedThe session state is incorrect; it should not be "closed".
40410006Session not foundThe specified session could not be found.
42910007Concurrent limit reachedThe concurrent limit for the user's plan has been reached; upgrade your plan for formal usage.
40410012Avatar not foundThe specified avatar could not be found.
40310013Avatar not allowedThe specified avatar is not allowed.
42910014Session fullThe session is full; please try again later.
42910015Trial API limit reachedThe trial API limit has been reached.