Error Handling
Retrying generation creation
For POST /v2/generate, send an Idempotency-Key on the first attempt and reuse it with the same payload on every retry. The guide covers replay responses, payload conflicts, retention, and all IDEMPOTENCY_* errors. A lost response or IDEMPOTENCY_OUTCOME_UNKNOWN does not authorize a fresh key or an unkeyed retry. An unknown response may include generationId; poll it when available.
Without a key, a create timeout or transport failure can leave acceptance uncertain. Confirm the outcome before submitting again. General backoff advice below does not make an unkeyed create safe to repeat.
HTTP Status Codes
When calling the Sync Labs API, you may encounter the following HTTP status codes. These are returned at the HTTP level before any generation-specific error codes.
HTML 403 or Cloudflare Access denied
If a request to api.sync.so returns an HTML page identifying Cloudflare with HTTP 403, Access denied, or error 1010, treat it separately from the JSON API errors below. A Cloudflare block can occur before API validation, so it does not by itself establish that your API key, plan, or media is invalid.
Stop repeated retries and contact support@sync.so with the request method and endpoint, UTC timestamp, Cloudflare Ray ID, client/SDK version, and a redacted response or screenshot. For uploads, include the content type and file sizes. Do not send API keys, authorization headers, or signed media URLs. Support needs the specific response to investigate; do not assume that every 403 has the same cause.
A 403 from a presigned storage upload URL is a different case: check the Asset Uploads troubleshooting guide for content-type and URL-expiry checks.
Machine-Readable Error Codes
Every failed generation carries a stable, machine-readable errorCode alongside the human-readable error message. The errorCode appears on both the Get Generation response (GET /v2/generate/{id}) and the webhook payload delivered when a job finishes.
Branch your error handling on errorCode, not on the error string. The error message is meant for humans and may be reworded over time; the errorCode is a stable identifier you can safely switch on in code.
A failed generation looks like this:
Error responses on request endpoints (assets, voices, TTS, and submit-time generate rejections) carry the same machine-readable shape, with two optional extras: field names the request field that caused the failure (for example voiceId or input[].assetId), and docsUrl links to the relevant documentation page. Unhandled 500s include a requestId you can give to support, alongside errorCode: internal_error:
Look up any code with the error catalog
GET /v2/errors returns the full catalog of error codes — generation codes plus the API request codes below — as an array of { code, message, suggestion } objects. The endpoint is unauthenticated — no x-api-key header is required — so you can resolve any errorCode to its meaning and a suggested fix at runtime.
A typical entry looks like this:
Read and resolve an error code
When a generation fails, read its errorCode and look it up in the catalog returned by GET /v2/errors.
Submit-Time Validation Errors
Some requests are rejected at submit time — the API responds with an error on the request itself, before any render starts, instead of accepting the job and failing it later. These rejections return an HTTP status and a machine-readable errorCode in the response body, so you can correct the request and resubmit without wasting a generation.
A submit-time error returns errorCode on the HTTP response. Validation failures can precede generation creation, but an uncertain submission may already have a generation. Poll generationId when provided and follow the idempotency recovery guidance before retrying.
Rate-limit and dependency errors (429/503/504) also mirror their retry guidance into headers: Retry-After (seconds), and for concurrency 429s, X-Sync-Concurrency-Limit and X-Sync-Active-Generations.
API Request Error Codes
Beyond generation failures, the assets, voices, TTS, and generation download endpoints return their own stable errorCode values on error responses. Where applicable the body also carries field (the request field at fault) and docsUrl (a link to the relevant docs page). All of these appear in the error catalog (GET /v2/errors).
Assets
Voices and TTS
Downloads
GET /v2/generations/{id}/download returns a URL for downloading a completed generation’s output. Missing, deleted, or out-of-organization generations return generation_not_found (404), as covered above. A missing, invalid, or revoked API key returns 401, and a non-UUID id returns 400. The download-specific codes are:
Batch upload capacity
A multipart batch upload can return 503 with errorCode: upload_capacity_unavailable. No batch was created. Retry the same request after the number of seconds in Retry-After. You can also submit records as a JSON rows body.
Audio trims
POST /v2/audio-trims and GET /v2/audio-trims/{id} prepare a shorter audio asset for a partial video. These codes aren’t in the error catalog.
A trim that can’t decode or cut the audio ends with status: failed and errorCode: audio_trim_failed on GET /v2/audio-trims/{id}. Check that the source is a readable audio file, then start a new trim with a new Idempotency-Key.
Reusing an Idempotency-Key with a different body returns 409. A missing Idempotency-Key, or one that isn’t 1–128 characters from [A-Za-z0-9._~-], returns 400. An audio source or trim that doesn’t exist or that you can’t access returns 404. Upload external sources first and trim them by assetId.
Rejected and failed generations
REJECTED and FAILED are terminal statuses. Inspect errorCode and error on the generation response or webhook. REJECTED means the request or account needs a correction before another attempt. FAILED means processing stopped because of an operational error. Follow the recovery for the returned code, and contact support if it persists.
A request refused before a generation exists returns its error on the HTTP response. Stop polling when a generation reaches either terminal status. For retries, follow Idempotent requests.
What do Sync Labs API error codes mean?
Here’s a comprehensive list of Sync Labs lip sync API error codes you may encounter, grouped by category and ordered from most common to least common.
Input Validation Errors
generation_unsupported_model
Message: “The requested model is not supported for this operation.”
Description: This error is thrown when you attempt to use a model that is not compatible with the current operation or API endpoint.
Resolution:
- Check the model documentation to see which models are supported for this specific API call.
- Update your request to use a supported model.
- If you believe this is an error, please contact our support team with details of your use case.
generation_media_metadata_missing
Message: “Required media metadata is missing from the request.”
Description: This error occurs when the media file lacks essential metadata for processing. The required metadata fields include:
duration: The length of the media in seconds (for both audio and video)frame_rate: The number of frames per second (for video content only)
Resolution:
- Ensure that your media file includes the required metadata embedded within it:
- For audio files: Verify that the
durationmetadata is present. - For video files: Check that both
durationandframe_ratemetadata are included.
- For audio files: Verify that the
- Use media editing tools to add or update the necessary metadata to your file.
- Verify that the metadata is correctly embedded and readable before submitting the media for processing.
- For persistent issues, contact our support team for guidance on proper media preparation and metadata requirements.
generation_audio_length_exceeded
Message: “The provided audio exceeds the maximum allowed length.”
Description: This error is thrown when the audio file submitted for processing is longer than the maximum permitted duration of 300 seconds (5 minutes).
Resolution:
- Trim or split your audio file to meet the length requirements.
- If you need to process longer audio files, consider batching your requests into smaller chunks or contact support for alternative solutions.
generation_text_length_exceeded
Message: “Text must be less than 5000 characters in one generation.”
Description: This error occurs when the text provided for text-to-speech (TTS) generation exceeds the maximum allowed length of 5,000 characters.
Resolution:
- Reduce the length of your text input to 5,000 characters or fewer.
- Consider breaking longer text into multiple smaller requests.
- Remove unnecessary content or use more concise language to fit within the limit.
generation_audio_missing
Message: “No audio file was provided in the request.”
Description: This error occurs when an audio file is expected but not included in the API request.
Resolution:
- Ensure that you’re including the audio file in your request payload.
- Verify that the audio file is properly encoded and formatted as per the API requirements.
- For persistent issues, contact our support team for guidance on proper audio file preparation and submission.
generation_video_missing
Message: “No video file was provided in the request.”
Description: This error occurs when a video file is expected but not included in the API request.
Resolution:
- Make sure you’re including the video file in your request payload.
- Verify that the video file is properly encoded and formatted according to the API specifications.
- For persistent issues, contact our support team for guidance on proper video file preparation and submission.
generation_input_validation_failed
Message: “Failed to validate input: [specific error details or ‘unknown validation failure’]”
Description: This error occurs when the provided input data does not meet the required validation criteria for processing. The error message includes specific details about what validation failed, which can help identify issues with file formats, metadata, or other input parameters that don’t conform to expected specifications. If specific details aren’t available, the message will indicate “unknown validation failure.”
Resolution:
- Review your input data to ensure it meets all API requirements and specifications.
- Check that all required fields are present and properly formatted.
- Verify that file formats, sizes, and other parameters are within acceptable limits.
- If the issue persists, contact our support team with details about your input data for further assistance.
generation_input_audio_invalid
Message: “The provided audio file has invalid metadata.”
Description: This error occurs when the audio file contains metadata that cannot be properly parsed or validated. Unlike generation_media_metadata_missing (which indicates missing metadata), this error means metadata is present but malformed, corrupted, or contains invalid values. Typical causes are corrupted audio files, damaged headers, or files from tools that produce non-standard metadata.
Resolution:
- Re-encode your audio file using a standard tool like FFmpeg to ensure proper metadata formatting:
- Verify that your audio file opens and plays correctly in a media player.
- Check that the audio file has not been corrupted during download or transfer.
- If the issue persists, try converting your audio to a different supported format (WAV, MP3, OGG, FLAC) and re-submit.
generation_input_face_selection_invalid
Message: “We could not use the selected speaker face for this video. Please select the face again or try auto-detect.”
Description: This error occurs when the manually selected speaker face cannot be used for the generation. The selected face may not be detected in the video, the supplied face coordinates may fall outside the video frame, or the active-speaker selection may be invalid.
Resolution:
- Re-run face detection and select the speaker again, making sure the face is clearly visible in the chosen frame.
- Verify that any manually supplied coordinates or bounding boxes fall within the video’s dimensions.
- Alternatively, turn off manual speaker selection to let the system auto-detect the active speaker, then resubmit.
Batch API Errors
Batch validation errors are 400 responses with only a message; they have no errorCode. Access, plan, and capacity refusals use the codes below. Dry runs require the same organization approval and plan as batch creation.
Batch access is not enabled (batch_access_not_enabled)
Status: 403
Description: Your organization has not been approved to create batches. Access is disabled by default, including for new Scale subscriptions. Dry runs require the same approval. Existing batches continue processing and remain readable when creation access is removed.
Resolution: Contact support@sync.so to request organization access. Upgrading a plan does not enable access automatically.
Batch needs the Scale plan (plan_feature_unavailable)
Status: 402
Description: The Batch API requires organization approval and a Scale plan or above (Scale, Enterprise, partner and program plans). Other plans and free accounts cannot create batches. The body carries requiredPlan and a billingUrl: requiredPlan is scale, or enterprise on credit plans, because no self-serve credit plan includes batch.
Resolution:
- Upgrade to Scale, or contact sales about Enterprise, and request organization approval to use the Batch API.
- To run a few generations at once without batch, send
POST /v2/generaterequests in parallel within your concurrency limit. See When to use batch, and when not to.
Batch concurrency limit (concurrency_limit_reached)
Status: 429, with Retry-After and X-Sync-Concurrency-Limit headers
Message: “Batch concurrency limit reached. You have X active batches and your plan allows Y. Please wait for existing batches to complete or upgrade your plan for higher limits.”
Description: You already run as many batches as your plan allows. Each active batch holds one slot of a batch limit equal to your plan’s concurrency limit. The body carries activeBatches, concurrencyLimit and retryAfterSeconds.
Resolution:
- Wait
retryAfterSeconds, or until an active batch finishes. - Check your active batches with
GET /v2/batch.
Batch validation messages
Line numbers count non-empty records; with a JSON rows body, line N is rows[N-1].
Dialogue edit row refusals
Example: {"statusCode": 422, "errorCode": "dialogue_edit_not_found", "lineNumber": 3, "message": "Record at line 3: The dialogue edit was not found in this organization."}
Description: Batch rows that carry dialogueEdit (early access) are checked at submit, including with dry_run. If a row cannot be rendered, no batch is created. The response carries the same errorCode that POST /v2/generate returns for that preview, such as dialogue_edit_not_found, dialogue_edit_not_completed, dialogue_edit_source_mismatch, or dialogue_edit_batch_mixed_sources, plus the lineNumber of the first failing row. Line numbers count non-empty records; with a JSON rows body, line N is rows[N-1]. Other batch record errors, such as invalid JSON, give the line only in message.
Resolution:
- Find the row at
lineNumberand fix it as described in Dialogue edit refusals. - Validate again with
dry_rununtil the response is{"status": "VALIDATED"}.
System and Processing Errors
generation_timeout
Message: “The generation process exceeded the maximum allowed time.”
Description: This is an internal error that occurs when our system is under high load, causing the requested operation to take longer than the allotted time to complete.
Resolution:
- Retry your request after a short delay, as the high load may be temporary.
- If possible, try submitting your request during off-peak hours.
- Consider breaking down large requests into smaller, more manageable chunks.
- If the issue persists, contact our support team to report the problem and discuss potential solutions.
generation_pipeline_failed
Message: “An error occurred in the generation pipeline.”
Description: This error indicates a failure in one of the internal processing steps of the generation pipeline.
Resolution:
- Review your input data to ensure it meets all the required specifications.
- Try resubmitting the request, as some pipeline errors may be temporary.
- If the problem continues, reach out to our support team with details about your request and the specific error message for further investigation.
generation_database_error
Message: “An error occurred while accessing the database.”
Description: This error indicates a problem with database operations during the generation process.
Resolution:
- Verify that your request doesn’t contain any invalid or conflicting data that might cause database issues.
- Try your request again after a short wait, as database errors can sometimes be temporary.
- If the problem continues, report the issue to our support team, providing details about your request and any specific error messages you received.
generation_internal_auth
Message: “Authentication failed for internal generation service.”
Description: This error occurs when there’s an issue with our internal authentication process. If you get this error, contact our support team so we can get it fixed.
generation_unhandled_error
Message: “An unexpected error occurred during the generation process.”
Description: This is a catch-all error for unforeseen issues that aren’t covered by more specific error codes.
Resolution:
- Check all aspects of your request for any potential issues or inconsistencies.
- Try the request again, as some unhandled errors may be due to temporary system glitches.
- If the error persists, contact our support team with a detailed description of your request and the steps to reproduce the error.
generation_infra_storage_error
Message: “An error occurred while accessing the storage on infra layer.”
Description: This error indicates a problem with accessing or managing storage resources during the generation process. This can occur due to temporary storage service issues or connectivity problems.
Resolution:
- Retry your request after a short delay, as storage errors are often temporary.
- Ensure your input files are accessible and not corrupted.
- If the problem persists, contact our support team as this may indicate a broader infrastructure issue.
generation_infra_resource_exhausted
Message: “The infra resources are exhausted.”
Description: This error occurs when the infrastructure resources required for processing your request are temporarily unavailable or at capacity.
Resolution:
- Wait a few minutes and retry your request, as resource availability fluctuates.
- Consider submitting your request during off-peak hours when resources are more readily available.
- If you frequently encounter this error, contact our support team to discuss your usage patterns and potential solutions.
generation_infra_service_unavailable
Message: “The infra service is unavailable.”
Description: This error indicates that one or more infrastructure services required for processing are temporarily unavailable. This can be due to maintenance, connectivity issues, or service outages.
Resolution:
- Check our status page for any ongoing service issues or maintenance windows.
- Retry your request after a short delay, as service availability issues are typically temporary.
- If the service remains unavailable for an extended period, contact our support team for updates and assistance.
General Troubleshooting Tips
- Check your API key: Ensure you’re using the correct API key and that it is not revoked.
- Verify request format: Double-check that your API request is properly formatted and includes all required parameters.
- Review rate limits: Make sure you haven’t exceeded your API rate limits.
- Check service status: Visit our status page to see if there are any ongoing service issues.
- Consult the documentation: Our API documentation may have been updated with new information or changes.
Report an unclear error or a workaround
If an error didn’t say what to fix, a result was wrong, or you needed a workaround, report it with Submit Feedback (POST /v2/feedback). Send one report per problem with a kind (confusing_error, bug, missing_capability, workaround, docs or other) and a message of up to 4,000 characters that includes the exact error text. Add the errorCode and generationId when you have them. The sync. team reviews reports daily. The call returns 202 with a reference id, doesn’t change or retry any job, and is limited to 30 reports per minute. The MCP server exposes the same report as the feedback_send tool.
Finding Generation IDs from Studio
If you need to find a generation ID for troubleshooting purposes, you can easily locate it through the Studio interface. Both Studio Pro and Studio Lite modes follow the same basic process:
For Studio Pro Mode: First click on the “History” button in the Studio interface, then follow the steps below.
For Studio Lite Mode: Go directly to the steps below.
- Locate Your Generation: Find the generation thumbnail you need the ID for
- Access the Menu: Hover over the generation thumbnail and click the three dots menu that appears
- Copy the Job ID: Select “copy job id” from the dropdown menu
For Agent Mode: In Agent Mode, you can find generation IDs in two ways:
- Sessions Sidebar: Click the dropdown menu (three dots) next to any session entry in the sidebar and select “Copy Job ID”
- Error Card: When a generation fails, click the “Copy Job ID” button directly on the error notification card
This generation ID can then be used when contacting support or when making API calls to retrieve specific generation details.
If you’re still experiencing issues after trying these steps, check the Troubleshooting page for common problems and solutions, or reach out to our support team for assistance.
Related Resources
- Rate Limits — understand API rate limiting and how to handle throttled requests
- Webhooks — receive real-time notifications when generation jobs complete or fail
- Quickstart — get up and running with your first Sync Labs API call
Support Knowledge Base
- Internal Server Error during lipsync — Pipeline failure troubleshooting
- Internal Server Error during TTS — TTS-specific errors
- Upload troubleshooting — File upload errors
- Unable to process audio — Audio processing errors
- [Unexpected error occurred](https://support.sync.so/articles/1326174103-Why-am-I-getting-%22Oops%2C-an-unexpected-error-occurred%22-or-%22An-error-occurred-while-processing-your-request%22-in-Sync Labs?) — General error troubleshooting
Frequently Asked Questions
What does error 400 mean?
A 400 error means your request has invalid input. Common causes include a malformed URL, unsupported media format, missing required fields, or audio exceeding the 300-second limit. Check the specific error code in the response body for details on what to fix.
Why is my generation stuck in PENDING?
A generation in PENDING status is waiting for processing resources. During periods of high demand, jobs may queue briefly before starting. If a generation stays in PENDING for an extended time, poll its existing ID or contact support. Do not create a replacement just because it is still pending.
How do I retry failed generations?
After a generation ends FAILED or REJECTED, retry with the same key and inputs: the retry starts a new generation, admitted and billed like a first request. For a timeout or unknown submission outcome, keep the original key and inputs; do not start a replacement. See Idempotent Requests.

