API Documentation

If your video is less than 32MB, you can directly use /transcribe.


For larger videos, use /upload-url, then /transcribe.

Obtain your API key from your dashboard.

POST /transcribe

Transcribes a video from an uploaded file or from a file uploaded via /upload-url.

Request

Method: POST
URL: https://api.symphoniclabs.com/transcribe

Parameters

Response

Returns a JSON object containing:

Examples

Python Example
import requests

with open('video.mp4', 'rb') as f:
    files = {
        'video': ('video.mp4', f),
        'api_key': (None, 'YOUR_API_KEY'),
        'segment_time': (None, '20'),

    }
    response = requests.post('https://api.symphoniclabs.com/transcribe', files=files)
    print(response.json())
Bash Example (Using cURL and jq)
curl -X POST https://api.symphoniclabs.com/transcribe \
  -F "video=@video.mp4" \
  -F "api_key=YOUR_API_KEY" \
  -F "segment_time=5"

GET /upload-url

Generates a signed URL to upload a video file directly to our Google Cloud Storage bucket. Use this for videos larger than 32MB.

Request

Method: GET
URL: https://api.symphoniclabs.com/upload-url

Response

Returns a JSON object containing:

Examples

Python Example
import requests

response = requests.get('https://api.symphoniclabs.com/upload-url')
data = response.json()
url, filename = data['url'], data['filename']

with open('video.mp4', 'rb') as f:
    requests.put(url, data=f, headers={'Content-Type': 'application/octet-stream'})

files = {
    'filename': (None, filename),
    'api_key': (None, 'YOUR_API_KEY'),
    'segment_time': (None, '10'),

}
response = requests.post('https://api.symphoniclabs.com/transcribe', files=files)
print(response.json())
Bash Example (Using cURL and jq)
response=$(curl -s https://api.symphoniclabs.com/upload-url)

url=$(echo $response | jq -r '.url')
filename=$(echo $response | jq -r '.filename')

curl -X PUT "$url" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @video.mp4

curl -X POST https://api.symphoniclabs.com/transcribe \
  -F "filename=$filename" \
  -F "api_key=YOUR_API_KEY" \
  -F "segment_time=10"

Prerequisites for bash upload-url example

The example uses jq to parse JSON responses. Ensure jq is installed on your system.

Installing jq

On macOS (using Homebrew):

brew install jq

On Debian/Ubuntu-based Linux systems:

sudo apt-get update
sudo apt-get install jq