Finalizes a streaming recording after all chunks have been uploaded. This endpoint marks the recording as complete, queues a background job to stitch audio chunks into a single file, and triggers transcription once stitching is complete.
Note: When using device tokens (dtok_*), device_id and end_user_id are automatically extracted from the token. When using API keys (sk_*), include device_id and end_user_id in the request body.
Verify Chunk Count: Ensure total_chunks matches the number of chunks you actually uploaded. The backend will verify chunk existence before stitching.
Include Checksum: Provide an MD5 checksum for integrity verification, especially for critical recordings (e.g., medical, legal).
Don’t Finalize Early: Only call /finalize after all chunks are uploaded. Finalizing with missing chunks will result in an error.
Idempotency: Calling /finalize multiple times with the same parameters is safe (idempotent). Duplicate requests will return the same response without re-processing.
Problem: Stitching takes too longSolution: This is normal for recordings with many chunks (>50). Check stitching job status via webhooks or polling the recording endpoint.