Batch

Create a new batch job

Changed on

Creates a batch processing job from JSONL records. Requires the Scale plan. Send either application/json with the records in rows, or multipart/form-data with a JSONL file in the input field (or file alias). Both forms are validated identically: the input must be 5 MB or smaller as JSONL and contain 20-500 records by default, and each record must contain request_id, endpoint: "/v2/generate", and payload.

post/v2/batch

Request

  • Base URL
    https://api.sync.so
  • Auth
    API key in header x-api-key

Request body

webhook_urlstring

Webhook server URL to notify when the batch reaches a terminal status. Sync sends a POST request with a batch payload, a Sync-Signature header (t=<unix>,v1=<hmac_sha256>), and a stable Sync-Delivery-Id header. Delivery is attempted up to six times with a bounded per-attempt timeout (10 seconds by default); retryable responses may provide Retry-After. The signature uses the organization webhook secret.

dry_runboolean

When true, validates the batch input and returns { "status": "VALIDATED" } without creating a batch.

Example request

{
  "webhook_url": "https://example.com/webhook",
  "rows": [
    {
      "request_id": "request-1",
      "payload": {
        "model": "lipsync-1.9.0-beta",
        "input": [
          {
            "type": "video",
            "url": "https://assets.sync.so/videos/samples/influencer.mp4"
          },
          {
            "type": "audio",
            "url": "https://assets.sync.so/audios/samples/re-record.mp3"
          }
        ],
        "options": {
          "prompt": "add a red hat to the speaker",
          "prompt_image_uris": [
            "https://example.com/appearance-preview.png"
          ],
          "i2v_prompt": "make the subject smile and look at the camera",
          "model_mode": "face",
          "temperature": 0.5,
          "sync_mode": "bounce",
          "blending_mode": "default",
          "active_speaker_detection": {
            "auto_detect": true,
            "use_v2": true,
            "v3": true,
            "frame_number": 123,
            "coordinates": [
              10,
              20
            ],
            "face_image": "data:image/webp;base64,..."
          },
          "face_boxes_url": "https://example.com/face-boxes.json",
          "occlusion_detection_enabled": true,
          "output_bucket_name": "my-bucket",
          "active_speaker": true,
          "pads": [
            0,
            5,
            0,
            0
          ],
          "speedup": 1,
          "output_format": "mp4",
          "fps": 25,
          "output_resolution": [
            1280,
            720
          ]
        },
        "speakers": [
          {
            "face": {
              "use_v2": true,
              "v3": true,
              "frame_number": 123,
              "coordinates": [
                10,
                20
              ],
              "face_image": "data:image/webp;base64,..."
            }
          }
        ],
        "projectId": "550e8400-e29b-41d4-a716-446655440000",
        "webhookUrl": "https://your-server.com/webhook",
        "outputFileName": "generated_video.mp4",
        "dubParams": {
          "providerName": "elevenlabs",
          "targetLang": "es",
          "sourceLang": "en",
          "numSpeakers": 1,
          "cloningStrength": 7
        }
      }
    }
  ]
}

Response

Validation successful (dry_run=true)

status'VALIDATED'

Changes

    • info

      added the new optional request property ///////

    • info

      added the new optional request property /////////

    • info

      the request property ///////// became optional

    • info

      added the non-success response with the status