Skip to main content

Error Handling

The VibePeak API uses standard HTTP status codes and returns detailed error information to help you diagnose and resolve issues.

Error Response Format

All errors follow a consistent structure:

HTTP Status Codes

Error Codes Reference

Authentication Errors

Status: 401 UnauthorizedThe provided API key is invalid or doesn’t exist.
Solution: Check that your API key is correct and properly formatted (vpk_live_xxxxx or vpk_test_xxxxx).
Status: 401 UnauthorizedNo API key was provided in the request.
Solution: Add the Authorization: Bearer vpk_live_xxxxx header to your request.

Authorization Errors

Status: 403 ForbiddenYour subscription plan doesn’t include API access. Only Plus, Pro, Max, and Enterprise plans have API access.
Solution: Upgrade your plan to Plus, Pro, Max, or Enterprise.
Status: 403 ForbiddenYour account doesn’t have enough credits for this operation.
Solution: Purchase more credits or wait for your monthly credit refresh.
Status: 403 ForbiddenYou don’t have permission to use this avatar.
Solution: Use a public avatar or one of your custom avatars. Custom avatars can only be accessed by their owner.
Status: 403 ForbiddenYou don’t have permission to use this voice.
Solution: Use a public voice or one of your cloned voices. Cloned voices can only be accessed by their owner.
Status: 403 ForbiddenThe cloned voice has expired.
Solution: Create a new cloned voice or use a public voice.

Internal Service Errors

Status: 500 Internal Server ErrorFailed to generate a secure URL for the avatar image.
Solution: This is a server-side issue. Retry your request. If the issue persists, contact support with the request_id.

Rate Limiting Errors

Status: 429 Too Many RequestsYou’ve reached your concurrent task limit.
Solution: Wait for existing tasks to complete, or upgrade your plan for higher limits.

Validation Errors

Status: 400 Bad RequestThe request body contains invalid JSON that cannot be parsed.
Solution: Validate your JSON before sending. Common issues include:
  • Missing or extra commas
  • Unquoted property names
  • Single quotes instead of double quotes
  • Trailing commas in arrays or objects
  • Unescaped special characters in strings
Status: 400 Bad RequestThe request parameters are invalid.
Solution: Review the error message and fix the invalid parameters. This also covers invalid enum values such as an unsupported orientation.
Status: 400 Bad RequestThe request body could not be parsed as JSON (e.g. a trailing comma, an unquoted key, or a truncated payload). This is checked before parameter validation, so you’ll see it instead of VALIDATION_ERROR when the body itself is malformed.
Solution: Verify the request body is valid JSON and that the Content-Type: application/json header is set. Serialize the body with your language’s JSON encoder rather than building it by hand.
Status: 400 Bad RequestThe avatar ID format is invalid.
Solution: Ensure the avatar ID is a valid UUID format (e.g., a1b2c3d4-e5f6-7890-abcd-ef1234567890).
Status: 400 Bad RequestThe voice ID format is invalid.
Solution: Use a valid voice ID from the List Voices endpoint or a cloned voice ID.
Status: 400 Bad RequestOne or more image URLs are not accessible.
Solution: Ensure all image URLs are publicly accessible HTTPS URLs.
Status: 400 Bad RequestImage validation timed out.
Solution: Use images hosted on fast, reliable servers.
Narrated slideshow requests no longer return MIXED_ORIENTATIONS. Use the optional orientation field to request portrait or landscape output explicitly, or omit it and let the API auto-detect from the first image.
Status: 400 Bad RequestImage URL points to a private network.
Solution: Use publicly accessible image URLs. Private/internal network URLs (localhost, 192.168.x.x, etc.) are not allowed.

Script Length Errors

The script field must fit a per-scene budget that scales with the number of images. Each image becomes a scene of roughly 3 seconds, so the script needs 65–85 characters per image to produce a video where the narration neither cuts off early nor leaves silence at the end.
Status: 400 Bad RequestThe script is shorter than image_count × 65 characters. The narration would end before the video does, leaving silent frames.
Solution: Either expand the script up to at least min_length characters, or remove images until image_count × 65 ≤ your script length.
Status: 400 Bad RequestThe script is longer than image_count × 85 characters. The narration would be rushed to fit within the video, harming TTS quality.
Solution: Either trim the script down to at most max_length characters, or add more images until image_count × 85 ≥ your script length.
Status: 400 Bad RequestThe script contains characters that the TTS engine cannot process. Numbers and symbols are allowed — text-to-speech reads them correctly. Only emojis and other non-speech characters (pictographs, control/zero-width characters) are rejected.
Solution: Remove any emojis or other non-speech characters from the script.

Not Found Errors

Status: 404 Not FoundThe user account was not found.
Solution: Ensure your API key is associated with a valid user account.
Status: 404 Not FoundThe specified avatar was not found.
Solution: Use a valid avatar ID from the public avatars list or your custom avatars.
Status: 404 Not FoundThe specified voice was not found.
Solution: Use a valid voice ID from the List Voices endpoint or a cloned voice ID.
Status: 404 Not FoundThe requested task doesn’t exist.
Solution: Verify the task ID is correct.

Task Errors

Status: Returned in task status (not HTTP error)One or more images couldn’t be processed.
Solution: Ensure all images are accessible URLs with supported formats (JPEG, PNG, WebP).
Status: Returned in task status (not HTTP error). Sandbox only.A deliberately-failed sandbox task, returned when a request from a vpk_test_ key includes "test_scenario": "fail". It lets you exercise your error-handling code without spending credits. The same livemode: false field that appears on every sandbox response is also set on the task status.
Solution: This is the expected response for the fail test scenario — not a real failure. Treat it as a hand-rolled fixture for your error-handling path. Do not retry: the same test_scenario will keep returning the same error. See Test Mode → The test_scenario parameter for the other scenarios.
Status: 400 Bad RequestOne or more image URLs are inaccessible, invalid, or point to private networks.
Solution: Verify all image URLs are publicly accessible HTTPS URLs.
Status: 400 Bad RequestThe elements_config.watermark.url is inaccessible or does not return an image. This is validated up front so a broken logo URL fails immediately instead of after the video has rendered. A common cause is a storage URL whose object has been deleted or moved — it returns application/json (“Object not found”) rather than the image.
Solution: Confirm the watermark URL is a publicly accessible HTTPS URL that returns an image/* content type (PNG, JPEG, WebP, SVG, or ICO).
Status: 400 Bad RequestOne or more source images are below the minimum resolution. VibePeak requires an HD floor on every source image: the long side must be at least 1280 px and the short side at least 720 px. Anything smaller produces visibly upscaled or blurry output.
Solution: Re-upload the offending images at HD or higher. If your source (e.g. a CRM export) only exposes thumbnails, check whether the full-resolution variant is available at a different URL.

Service Errors

Status: 503 Service UnavailableThe video generation service is temporarily unavailable.
Solution: Wait a few minutes and retry your request. Check status.vibepeak.ai for service updates.
Status: 504 Gateway TimeoutThe service request timed out.
Solution: Retry your request. If the issue persists, contact support.
Status: 503 Service UnavailableAn internal service error occurred.
Solution: Retry your request. If the issue persists, contact support with the request_id.
Status: 503 Service UnavailableText-to-speech generation failed.
Solution: Retry your request. The TTS service uses a circuit breaker that may temporarily block requests after repeated failures.
Status: 503 Service UnavailableFailed to queue the video generation job.
Solution: Retry your request after a few seconds.

Handling Errors

Retry Strategy

For transient errors, implement exponential backoff:
Never retry authentication (401) or validation (400) errors - they won’t succeed on retry.

Getting Support

When contacting support, include:
  1. Request ID - Found in every error response
  2. Error code - The machine-readable error code
  3. Timestamp - When the error occurred
  4. Request details - The endpoint and parameters used
Email: [email protected]