Orders

Get a link to upload one audio file

For a recording that is a file and has no link, such as a file on the machine an agent runs on. Returns a form to post the file to (upload_url, upload_fields, the file last in a field named file; a ready curl command is included) and an upload_id. Then place the order with POST /orders/submit and that upload_id in place of file_url. No order exists until then. One audio file, up to 750 MB; the link works for 15 minutes and the upload can be ordered once, within 2 hours. The file is measured by decoding it after upload, the same as a link. Returns 403 link_orders_only while uploads are switched off; in that case order with file_url.

post/orders/upload-url

Request

  • Base URL: https://barevalue.com/api/v1
  • URL: https://barevalue.com/api/v1/orders/upload-url
  • Auth: HTTP bearer

Request body

filenamestring required

Name of the file, with its extension

size_bytesinteger

Optional size of the file. Storage enforces the 750 MB limit whatever is said here; giving it gets the refusal at once.

Example request

{
  "filename": "episode-42.mp3"
}

Response

An upload form and the upload_id to order with

upload_idstring

Pass this to POST /orders/submit in place of file_url, once the file is uploaded

upload_urlstring uri

Where to POST the form

upload_method'POST'
upload_fieldsobject

Form fields to send exactly as given, before the file

file_field'file'

Name of the form field that carries the file. It must be the last field.

expires_in_minutesinteger

How long upload_url accepts the file

submit_within_minutesinteger

How long after this call the upload can be ordered

max_bytesinteger
curlstring

A ready command: replace /path/to/your/audio with the file, inside the single quotes it stands in (an apostrophe in the path is written '''; copy a file with a comma or a semicolon in its path to a plain name first). Prints 204 when the upload worked.

instructionsstring

Example response

{
  "upload_id": "up_3f9c1a...",
  "expires_in_minutes": 15,
  "submit_within_minutes": 120,
  "max_bytes": 786432000
}

Changes

No recorded changes to this operation across all 1 revision of this API.