Examples
Visit our GitHub samples repository for the complete list of examples on how to use the Vatis Streams API.Prerequisites
- Vatis API key
- Linux shell
- cURL or Postman for making HTTP or WebSocket requests
- jq for parsing JSON responses
uuidgenfor generating UUIDs- a testing audio/video file
Workflow
1
Export variables
2
Choose a stream configuration
The stream configuration defines what processing will be made on the input data (transcoding, transcription, diarization, audio intelligence, etc.). Pick one of the the predefined configurations:Export the configuration ID:
Keep the stream configuration page opened in a separate tab for further references during this process
3
Upload the data
Use one of the available gateways for uploading the data.
- HTTP Gateway
- HTTP Gateway with webhooks
- HTTP Gateway with form-data
Set the
streamConfigurationTemplateId=$CONFIG_ID, persist=true, and any other patches as query parameters and upload the binary data as the body of the request.The configuration-specific patches (parameters) can be found under the Parameters section of the configuration page.
The body will be sent as binary data on the request body. The actual body can be one of the options mentioned under the Input data section of the configuration page.To prevent any unexpected error, always include the
Content-Type: application/octet-stream header4
Wait for stream completion
- Polling
- Webhook
5
Export the final result
After the stream is completed, we can export the final result as JSON using the following command:Based on the stream configuration, the result will be the one mentioned under the
Export response section of the configuration.