Operations

POST /orders

Summary Submit a new caption order
URL /api/v1/orders
Detailed Description Submit a new order for captioning. The order request contains two main elements:
  • Caption options. This section contains references to the input media to be captioned, as the format for the caption file you would like us to produce.

    There are three options for specifying the location of input media:

    • A uri returned from a POST to /inputs in the Location header. Use this if your media is either stored in your system, or is accessible at a URL where we can download it. First, make a POST to /inputs to send us the media. Next, you can use the returned uri to reference it in the order request.
    • external_link - this should be used for the case where you have a link to a web page where the media is embedded, but not a link to the media file as well. We do not attempt to do anything with the link specified this way at the time the API call is made. This is in contrast to when you post to /inputs with a link to a media file - in that case we do download the file. So the external_link should only be used when you can't link to the media file directly. An example would be videos stored on YouTube or Vimeo.
      If the external_link points to a YouTube page, we can determine the duration of the video on that page automatically. Otherwise, you will need to specify the media duration explicitly.

    For each input, you must provide either uri or external_link, but not both. If both or neither is provided, an error is returned.

    For each input, you may explicitly specify the video length, in seconds, of the video referenced by the input. If you do not specify the video length, we will attempt to determine it automatically from the input media; however we are not always able to do so. We can generally calculate video length of files using common video formats (e.g. mp4, quicktime, etc) that are up to 10MB in size. If your files are larger than 10MB or are using an uncommon video format, we strongly recommend you specify the video length explicitly.

    For each input, you may optionally specify speaker names and/or a glossary to help improve the quality of your order. The speaker list may have up to 100 entries, and speaker names may be up to 50 characters long. The glossary may have up to 1000 entries, and glossary entries may be up to 255 characters long.

    You can also optionally specify the desired file formats for the finished caption files. We support these formats:

    Constant Value File Format Description
    SubRip SubRip SubRip, a simple subtitle text format first used by the SubRip program. More info.
    Scc Scenarist Scenarist Closed Caption, an older but popular format, used by many video authoring tools such as Adobe Premiere. More info.
    Mcc MacCaption The MacCaption (.mcc) format is used for high-definition Broadcast TV.
    Ttml Timed Text Timed Text Markup Language, a W3C standard for specifying timed text to be displayed along with video. More info.
    QTtext Quicktime Timed Text Quicktime Timed Text, a proprietary text-based format for specifying timed text supported by Apple's Quicktime Authoring software. More info.
    Transcript Transcript Plain-text format
    WebVtt WebVTT The WebVTT (Web Video Text Tracks) format is intended for marking up external text track resources. The main use for WebVTT files is captioning or subtitling video content. More info.
    Dfxp DFXP The Distribution Format Exchange Profile is intended to be used for the purpose of transcoding or exchanging timed text information among legacy distribution content formats presently in use for subtitling and captioning functions. More info.
    CheetahCap Cheetah .CAP File format for Cheetah Captivator Offline
    Stl Spruce Subtitle File Spruce Subtitle File, a simple subtitle text format, originally used by DVD Studio Pro. More info.
    AvidDs Avid DS Subtitle File Avid DS Subtitle File, a captions file format for Avid DS Software
    AvidDvd Avid DVD Subtitle File Avid DVD Subtitle File, a captions file format for Avid DVD Software
    FacebookSubRip Facebook-ready SubRip Standard SubRip file with Facebook file naming conventions. More info.
    EbuStl EBU Subtitle File EBU Subtitle File, a standardized data file format for subtitles, popular in Europe. More info.

    Specifying these formats in the order request is optional - internally we produce the captions in a canonical format and can then export them on-the-fly as any of the above formats. However, if you specify the formats in the order request, then our team can make sure the produced captions are optimized for your desired formats, so we recommend doing so if the desired formats are known. By default, we optimize for SubRip.

    Optionally, you may specify a list of language codes if you need foreign-language subtitles. You can order subtitles for these language codes: es-es, es-la, fr, ko, ar, de, pl, zh-si, hi, pt-br, zh-tr, it, ru, cs, ja, tr, and nl.

  • Notification Info. Optionally you may request that an HTTP post be made to a url of your choice when the order enters a new status (eg being captioned) and when it is complete.

  • PO, Project, or Department. Optionally, you may add a PO, Project, or Department to specify how the order should be paid. Only Valid if customer has invoicing.

    Max Length: 64.

  • Sandbox Mode. Optionally, choose to submit the order in sandbox mode. For testing a new or changed client integration.

  • Workspace Id. Optionally, you may add a workspace id to specify the workspace the order should be placed in.

    The user must be a member of the workspace with the provided id. If no id is provided, the order is placed in the user's default team.

Payment will be done by debiting the user's account balance.

Request Headers
  • Authorization - contains client/user API keys
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
  • Location – URI identifying the newly created order. This URI can be used to request details (such as status) of the order. Only present if a 201 response code is returned
Response Body On success, empty. On error, will contain an <error/> entity with more details.
Error Codes
  • 10001 Missing Inputs - if the order request did not contain any input media
  • 10002 Invalid Input - if one of the input media URIs is invalid, eg does not identify a valid media uploaded via a POST to /inputs
  • 10003 Multiple Service Options Specified - currently, an order can be made for only one of the services we offer (transcription and caption). The service is specified by including a transcription_options, automated_transcription_options, or caption_options element. If more than one such element is included in the request, this error is returned.
  • 10004 Service type is not specified - you must include exactly one of transcription_options, automated_transcription_options, or caption_options elements. If none of these are included, this error is returned.
  • 10005 External Link and URI specified - only External Link or URI should be set for input media
  • 10006 Input Location is not specified - neither of External Link and URI set for input media
  • 10007 Cannot connect to the External Link provided
  • 10008 S3 buckets are not supported, consider using a signed S3 URL instead
  • 20001 Invalid Media Length - If one of the input medias has a specified video length that is not a positive integer. This will also be returned if you do not provide the video length and we are unable to calculate it automatically
  • 20003 Invalid Language Code - One or more of the provided language codes are invalid
  • 20004 Incompatible Language - Some of the selected output file formats do not support one or more of the specified languages. For example, Scenarist (Scc), MacCaptions (Mcc) and CheetahCap (CAP) are incompatible with languages that use non-latin alphabets.
  • 20005 Rush is not supported on caption orders that have subtitle languages
  • 20010 Reference Number Too Long Code - the reference number provided longer than 256 characters
  • 20020 Speaker list may not exceed 100 speakers
  • 20021 Speaker names may not exceed 50 characters
  • 20030 Glossary may not exceed 1000 entries
  • 20031 Glossary entries must not be null nor exceed 255 characters
  • 20050 User does not have authorization to add a Workspace Id
  • 30010 Ineligible For Balance Payments - if the user on whose behalf the order request was made is not eligible for paying using account balance
  • 30011 Account Balance Limit Exceeded - if the order request specified payment using account balance, but doing so would exceed the user's balance limit
  • 40010 PO Number Too Long - The PO, Project, or Department provided exceeded the max length
  • 40011 User Unauthorized For PO Number - User does not have invoicing set up or cannot set PO at checkout
  • 40012 Invalid Order Type For PO Number - PO, Project, or Department provided for an unsupported order type
  • 50000 Field Validation Errors - One or more of the fields are in the wrong format
  • 50002 Sandbox Mode Required - your keys are not set up to place real orders. Read about sandbox mode and getting production credentials.
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",
    /* 
       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",
    /*
       Mandatory, provides information on what needs to be captioned and
       specified the desired captions output format.
    */
    "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",
                /*
                  Optional, list of speaker names.
                  Compatible with any input format.
                */
                "speakers": ["John", "Jane", "Sam Jones"],
                /*
                  Optional, list of glossary entries.
                  Compatible with any input format.
                */
                "glossary": ["cryptography", "MD5", "SHA-1", "bcrypt"],
            },
            {
                /*
                    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, language codes to request foreign language subtitles.
        */
        "subtitle_languages": [ "es-es", "it" ],
        /*
           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 rush this order?
            Rush will deliver your files up to 5x faster.
            Requesting Rush adds $1.25 per audio minute to the cost of your orders.
        */
        "rush": true,
        /*
            Optional, do you want Premium Service Captions (PSC)? This service carries an additional charge.
        */
        "premium_service_captions": true,
        /*
            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, 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
           or has a new comment. If "FinalOnly" (the default), 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.
    -->
    <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>
                <!--
                   Optional, list of speaker names.
                   Compatible with any input format.
                -->
                <speakers>
                   <speaker>John</speaker>
                   <speaker>Jane</speaker>
                   <speaker>Sam Jones</speaker>
                </speakers>
                <!--
                   Optional, list of glossary entries.
                   Compatible with any input format.
                -->
                <glossary>
                   <entry>cryptography</entry>
                   <entry>MD5</entry>
                   <entry>SHA-1</entry>
                   <entry>bcrypt</entry>
                </glossary>
            </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, language codes to request foreign language subtitles.
        -->
        <subtitle_languages>
          <language>es-es</language>
          <language>it</language>
        </subtitle_languages>
        <!--
           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 rush this order?
            Rush will deliver your files up to 5x faster.
            Requesting Rush adds $$1.25 per audio minute to the cost of your orders.
        -->
        <rush>true</rush>
        <!--
            Optional, do you want Premium Service Captions (PSC)? This service carries an additional charge.
        -->
        <premium_service_captions>true</premium_service_captions>
        <!--
            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>
    </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 or has a new comment. If "FinalOnly" (the default),
           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>