Encoding API

The Bitmovin encoding API enables you to interact directly with the bitmovin encoding service. This comes along with the possibility to integrate bitmovin directly into your application, web portal, media workflows, etc. and fully automate your encoding process.

bitmovin also provides a wide range of API clients for the most common programming languages and platforms. These clients are a wrapper on top of our REST API to ease development and help out customers to integrate the bitmovin encoding with lowest efforts.

It is highly recommended to use our API clients, which simplify the integration of our service and help you to onboard quickly!

API Clients

C Sharp Bitmovin API

C# Client

Node JS API

Node JS Client

Ruby Client

Ruby Client

js

Javascript Client

PHP Client

Python Client

Java Client

REST API

Our REST API lets you interact with the bitmovin encoding API from everything that can send an HTTP request. Requests to the bitmovin encoding API have to be send to the following endpoint: https://portal.bitcodin.com/api

REST API Reference Version 1

We are currently also working on Version 2 of our API and it will be available soon!

Request Format

GET requests have their parameter in the URL. For POST and PUT requests, the request body must be JSON, with the Content-Type header set to application/json.

Authentication is done via HTTP headers. The bitcodin-api-key header authenticates the endpoint, you just have to use your bitmovin API key. You can find your API key in the bitmovin portal in your account settings as shown below:

api-key

Using HTTP instead of HTTPS is possible, but we do not recommend it for security reasons. API requests can also select a specific API version using the bitcodin-api-version header. Here you can see a header example:

Content-Type: application/json
bitcodin-api-version: v1
bitcodin-api-key: yoursuperfancyencryptedapikey

For Javascript usage, bitmovin supports cross-origin resource sharing (CORS), so that users can use these headers in conjunction with XMLHttpRequest.

Response Format

The response format for all requests is a JSON object.

Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure. When a request fails, the response body is still JSON, but always contains information which you can use for debugging.

Basic API Example

In the following you can see an sample request to add an new input file to bitmovin. This is a POST request, containing the JSON with the URL to the input video:

Request

Header

Content-Type: application/json
bitcodin-api-version: v1
bitcodin-api-key: yoursuperfancyencryptedapikey

Body

{ 
    "type": "url",
    "url": "http://www.example.com/yourfolder/yourmovie.mp4"
}

Once this request is send, bitmovin will add this input video to your account, and you can also see it in the web interface at https://portal.bitcodin.com. bitmovin will respond to the API request with the details on the newly created input.

Response

Header

Content-Type: application/json

Body

{
    "inputId": 3,
    "filename": "yourmovie.mp4",
    "createdAt": {
        "date": "11.03.2015 16:41:00",
        "timezone": {
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "updatedAt": {
        "date": "11.03.2015 16:41:00",
        "timezone": {
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
    "inputType": "url",
    "url": "http://www.example.com/yourfolder/yourmovie.mp4",
    "basicAuthUser": "",
    "basicAuthPassword": "",
    "mediaConfigurations": [
        {
            "streamId": 0,
            "duration": 0,
            "rate": 24,
            "codec": "h264",
            "type": "video",
            "bitrate": 0,
            "width": 1280,
            "height": 544,
            "pixelFormat": "yuv420p"
        },
        {
            "streamId": 1,
            "duration": 0,
            "rate": 48000,
            "codec": "ac3",
            "type": "audio",
            "bitrate": 640000,
            "sampleFormat": 6,
            "channelFormat": 5.1
        }
    ]
}
Back to Top
Simple Share Buttons