Operations
POST /orders
| Summary | Submit a new AI Caption order | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| URL | /api/v1/orders | |||||||||||||||||||||||||||||||||||||||||||||
| Detailed Description |
Submit a new order for AI Captioning (for Human Captioning, see here). The order request contains two main elements:
Payment will be done by debiting the user's account balance. |
|||||||||||||||||||||||||||||||||||||||||||||
| Request Headers |
|
|||||||||||||||||||||||||||||||||||||||||||||
| Request Body | XML or JSON with the details about the order. See below for an example entity illustrating the fields used. | |||||||||||||||||||||||||||||||||||||||||||||
| Response |
On success, 201 Created. On error, 400 Bad Request. |
|||||||||||||||||||||||||||||||||||||||||||||
| Response Headers |
|
|||||||||||||||||||||||||||||||||||||||||||||
| Response Body | On success, empty. On error, will contain an <error/> entity with more details. | |||||||||||||||||||||||||||||||||||||||||||||
| Error Codes |
|
|||||||||||||||||||||||||||||||||||||||||||||
| Annotated sample request |
{
/* Optional, whether to place a sandbox mode or real order */
"sandbox_mode": true,
/* Optional, a reference number for the order meaningful for the client */
"client_ref": "XB432423",
/*
Mandatory, provides information on what needs to be captioned and
specified the desired captions output format
*/
"automated_caption_options": {
/*
Mandatory, contains list of media to caption.
Must have at least one element.
*/
"inputs": [
{
/* Length of video, in seconds rounded up */
"video_length_seconds": 600,
/* URI of the media, as returned from the call to POST /inputs */,
"uri": "urn:rev:inputmedia:467432fds",
},
{
/* YouTube URL, video length determined automatically */
"external_link": "http://www.youtube.com/watch?v=UF8uR6Z6KLc"
},
{
/* For any other external URL, video length in seconds is required */
"video_length_seconds": 300,
"external_link": "https://vimeo.com/7976699"
}
],
/*
Optional, what file formats should the captions be optimized for.
See table in description section for supported formats.
By default, we optimize for SubRip.
*/
"output_file_formats": [ "Scc", "SubRip" ],
/*
Optional, should we generate burned-in caption (aka open captions) videos for every input on this order?
Requesting burned-in captions adds $0.30 per audio minute to the cost of your orders.
Burned-in captions will be available to download via the API for 7 days after they are generated.
*/
"burned_in_captions": true,
/* Optional, source language of the input to be processed */
"inputs_language": "en"
},
/* Optional, enables receiving notifications about the order status */
"notification": {
/*
The url for notifications.
Mandatory if the notifications element is used.
Updates will be posted to this URL.
*/
"url": "http://www.clientsite.com/orderupdate",
/*
Optional, specifies which notifications are sent.
- If "Detailed", then a notification is sent whenever the order is in a new status,
has a completed file ready for download, or has a new comment.
- If "FileComplete", then a notification is sent whenever work on a file has been completed
and is ready for download.
- If "FinalOnly" (the default), a notification is sent only when the order is complete.
*/
"level": "Detailed",
/*
Optional, specifies the content-type that notifications will be transmitted with.
- If "FormUrlEncoded" (or omitted), they will be transmitted in application/x-www-form-urlencoded format.
- If "ApplicationJson", they will be transmitted in application/json format.
*/
"content_type": "FormUrlEncoded"
},
/* Optional, customer must have invoicing, it links order to PO, Project, or Department for billing */
"ponumber": "SamplePoNumber01",
/* Optional, id of the workspace the order should be placed in */
"workspace_id": 123456789
}
<order_request>
<!--
Optional, whether to place a sandbox mode or real order
-->
<sandbox_mode>true</sandbox_mode>,
<!--
Optional, a reference number for the order meaningful for the client
-->
<client_ref>XB432423</client_ref>
<!--
Optional, specify that normal turnaround time is not needed.
By default, normal turnaround time (false) is assumed.
Note that this value is used as a guideline only.
-->
<non_standard_tat_guarantee>false</non_standard_tat_guarantee>
<!--
Mandatory, provides information on what needs to be captioned and
specified the desired captions output format
-->
<automated_caption_options>
<!--
Mandatory, contains list of media to caption. Must have at least one element
-->
<inputs>
<input>
<!--
Length of video, in seconds rounded up
-->
<video_length_seconds>600</video_length_seconds>
<!--
Mandatory, URI of the media, as returned from the call to POST /inputs
-->
<uri>urn:rev:inputmedia:467432fds</uri>
</input>
<input>
<!--
YouTube URL, video length determined automatically
-->
<external_link>http://www.youtube.com/watch?v=UF8uR6Z6KLc</external_link>
</input>
<input>
<!--
For any other external URL video length is mandatory
-->
<video_length_seconds>300</video_length_seconds>
<external_link>https://vimeo.com/7976699</external_link>
</input>
</inputs>
<!--
Optional, what file formats should the captions be optimized for.
See table in description section for supported formats.
By default, we optimize for SubRip.
-->
<output_file_formats>
<file_format>Scc</file_format>
<file_format>SubRip</file_format>
</output_file_formats>
<!--
Optional, should we generate burned-in caption (aka open captions) videos for every input on this order?
Requesting burned-in captions adds $0.30 per audio minute to the cost of your orders.
Burned-in captions will be available to download via the API for 7 days after they are generated.
-->
<burned_in_captions>true</burned_in_captions>
<!--
Optional, source language of the input to be processed
-->
<inputs_language>en</inputs_language>
</automated_caption_options>
<!--
Optional, enables receiving notifications about the order status
-->
<notification>
<!--
The url for notifications.
Mandatory if the notifications element is used.
Updates will be posted to this URL.
-->
<url>http://www.clientsite.com/orderupdate</url>
<!--
Optional, specifies which notifications are sent.
- If "Detailed", then a notification is sent whenever the order is in a new status,
has a completed file ready for download, or has a new comment.
- If "FileComplete", then a notification is sent whenever work on a file has been completed
and is ready for download.
- If "FinalOnly" (the default), a notification is sent only when the order is complete.
-->
<level>Detailed</level>
<!--
Optional, specifies the content-type that notifications will be transmitted with.
- If "FormUrlEncoded" (or omitted), they will be transmitted in application/x-www-form-urlencoded format.
- If "ApplicationJson", they will be transmitted in application/json format.
-->
<content_type>FormUrlEncoded</content_type>
</notification>
<!--
Optional, customer must have invoicing, it links order to PO, Project, or Department for billing
-->
<ponumber>SamplePoNumber01</ponumber>
<!--
Optional, id of the workspace the order should be placed in
-->
<workspace_id>123456789</workspace_id>
</order_request>
|