Skip to main content
Relay uses presigned URLs for secure, direct-to-storage uploads. This approach keeps large files off the API servers and enables fast, parallel uploads.

Upload flow

The three-step upload process:
1

Request upload URL

Call the API to get a presigned URL and upload credentials
2

Upload to storage

POST the file directly to cloud storage using the presigned URL
3

Confirm upload

Notify the API that the upload completed, triggering processing

Supported formats

Maximum file size: 500 MB

Uploading to a dataset

Use this flow when uploading audio files for training.

Step 1: Request upload URL

Python
Response:

Step 2: Upload the file

Upload directly to the presigned URL using multipart form data:
Python
The order of form fields matters. Include all fields from the response, then add the file as the last field.

Step 3: Confirm upload

Notify Relay that the upload completed:
Python
Response:

Processing pipeline

After confirmation, Relay processes the audio:
  1. Normalizing: Convert to 16kHz mono WAV format
  2. Embedding: Compute audio embeddings for training
Check processing status:
Python

Processing statuses

Bulk uploads

For multiple files, upload in parallel for best performance:
Python

Uploading for inference

Inference uploads follow the same pattern but use different endpoints:
Python

Downloading audio

Download audio files using presigned URLs:
Python
To download the normalized version (16kHz mono):
Python

Error handling

Common upload errors

Handling failed processing

If audio processing fails:
Python
Common processing failures include corrupted audio files, unsupported codecs, or files that are too short (less than 100ms).