Multi-part POST

All major programming languages provide support for generating multi-part HTTP requests.

curl -s -F 'file=@sample1.wav' 'vblaze_name:17171/transcribe'

Parameters may be included in the query string, headers, or form fields. If specified as form fields, the file field must be the last field.

For the sake of simplicity and convention, simple parameters should always be placed in the query string. Headers and form fields should be reserved for heavy parameters (JSON-encoded data, etc.) or parameters which are inconvenient to place in the query string.

curl -s \
-F 'file=@sample1.wav' \
'vblaze_name:17171/transcribe?model=eng1:callcenter&output=text'
curl -s \
-F 'file=@sample1.wav' \
-H 'X-Voci-Model: eng1:callcenter' \
-H 'X-Voci-Output: text' \
'vblaze_name:17171/transcribe'
curl -s \
-F 'model=eng1:callcenter' \
-F 'output=text' \
-F 'file=@sample1.wav' \
'vblaze_name:17171/transcribe'

These examples transcribe a file named sample1.wav using a V‑Blaze REST API instance running on a server named vblaze_name; both parameters can be changed without altering the function of any commands.