How do I view videos generated through the API?

Last updated: March 10, 2026

Context

After generating videos using the Sync API, you need to retrieve the playable video URL to view or download your completed videos. This process involves checking the generation status and accessing the output URL once processing is complete.

Answer

There are two main ways to get the download/play URL for your generated videos:

Method 1: Poll the API for completion

  1. Use the Get Generation endpoint to fetch your generation by ID:

    curl -s -H "x-api-key: YOUR_API_KEY" \
    "https://api.sync.so/v2/generate/{GENERATION_ID}"
  2. Check for status: COMPLETED in the response

  3. Once completed, use the outputUrl field to view or download your MP4 video

Method 2: Use webhooks for automatic notification

  1. Include a webhookUrl when creating your generation:

    curl -X POST https://api.sync.so/v2/generate \
     -H "Content-Type: application/json" \
     -H "x-api-key: YOUR_API_KEY" \
     -d '{
       "voiceUrl": "https://...",
       "videoUrl": "https://...",
       "webhookUrl": "https://your.app/webhooks/sync"
     }'
  2. When the video completes processing, we'll automatically POST the final payload (including outputUrl) to your webhook endpoint

Troubleshooting

If you're having issues viewing your videos:

  • Ensure every API request includes the x-api-key header

  • If the video won't play in-browser, download it and try a player that supports H.264/AAC (the files are MP4 H.264 + AAC format)

  • Check that your generation status shows COMPLETED rather than PENDING, PROCESSING, or FAILED

For more details, see the Get Generation and Create Generation API documentation, as well as our browser support guide.