Developers API

Developers can use the API to programmatically interact with Streams.

Authentication

Authenticate with the API by providing an Authorization:Bearer header with each request.

Request Headers

ParameterTypeDescription
AuthorizationstringAn authorization bearer token.

                                    Authorization: Bearer your_authorization_token
                                

Get Authorization token

Use an API key to authenticate with the API.

Request

Method: POST
Content-Type: application/json
https://stream.gradedblue.com/api/v1/auth/authorize
Request Body
ParameterTypeDescription
apiKeystringAn API key generated in the dashboard.

                                    {
                                        "apiKey": "AE0u-NfkwD...nbA9HrYPBW"
                                    }
                                

Response

Content-Type: application/json
ParameterTypeDescription
authorizationTokenstringA short-lived authorization bearer token.
expiresInnumberThe number of seconds in which the token expires.

                                    {
                                        "authorizationToken": "eyJhbGciOi...C0dLLvQB9Q",
                                        "expiresIn": 3600
                                    }
                                

List Regions

Get a list of region IDs.

Request

Method: GET
https://stream.gradedblue.com/api/v1/regions

Response

Content-Type: application/json
ParameterTypeDescription
regionsarrayA list of all available region IDs.

                                    {
                                        "regions": [
                                            "lhr",
                                            "ams",
                                            "fra",
                                            "cdg",
                                            "atl",
                                            "dfw",
                                            "lax",
                                            "yto",
                                            "nrt",
                                            "icn",
                                            "sgp",
                                            "syd"
                                        ]
                                    }
                                

Try this API

Request parameters
Authentication

Sign in to use authentication.

Send

Get Plans

Get all plans and their details.

Request

Method: GET
https://stream.gradedblue.com/api/v1/plans

Response

Content-Type: application/json
ParameterTypeDescription
plansobjectA map of all available plans.
plans.{planId}objectContains details on the plan's restrictions.
plans.{planId}.maxClientsnumberThe maximum receiving clients.
plans.{planId}.maxResolutionobjectA maxResolution object.
plans.{planId}.maxResolution.widthnumberThe maximum width in pixels.
plans.{planId}.maxResolution.heightnumberThe maximum height in pixels.
plans.{planId}.maxFrameRatenumberThe maximum frames per second.
plans.{planId}.maxBitratenumberThe maximum bitrate in Kbps.

                                    {
                                        "plans": {
                                            "basic": {
                                                "maxClients": 3,
                                                "maxResolution": {
                                                    "width": 1280,
                                                    "height": 720
                                                },
                                                "maxFrameRate": 60,
                                                "maxBitrate": 7000
                                            },
                                            "standard": {
                                                "maxClients": 6,
                                                "maxResolution": {
                                                    "width": 1920,
                                                    "height": 1080
                                                },
                                                "maxFrameRate": 60,
                                                "maxBitrate": 10000
                                            },
                                            "pro": {
                                                "maxClients": 12,
                                                "maxResolution": {
                                                    "width": 3840,
                                                    "height": 2160
                                                },
                                                "maxFrameRate": 60,
                                                "maxBitrate": 55000
                                            }
                                        }
                                    }
                                

Try this API

Request parameters
Authentication

Sign in to use authentication.

Send

List Streams

Get a list of streamIds for all active subscriptions.

Request

Method: GET
https://stream.gradedblue.com/api/v1/stream

Response

Content-Type: application/json
ParameterTypeDescription
streamsarrayA list of all streamIds associated with your account.

                                    {
                                        "streams": [
                                            "sub_Hqc6U5q2bIw1h3",
                                            "sub_HquS3f7Vgy7N22",
                                            "sub_Ht9WxVaXVo09zU",
                                            "sub_HtzaZpgkT1DyRh",
                                            "sub_HylOoAUNoy0bkz",
                                            "sub_HylPhKo8NoBpWM"
                                        ]
                                    }
                                

Try this API

Request parameters
Authentication

Sign in to use authentication.

Send

Get Stream Info

Get the details of a specific stream.

Request

Method: GET
https://stream.gradedblue.com/api/v1/stream/{streamId}

Response

Content-Type: application/json
ParameterTypeDescription
namestringA list of all streamIds associated with your account.
keystringThe stream key.
regionstringThe stream's region ID.
ingeststringIngest server URL.
outputstringOutput stream URL.
renewingbooleanIf the stream will renew at the end of the billing period.
planstringThe plan name. One of 'basic', 'standard' or 'pro'.
timingobjectA timing object. Values in seconds from the unix epoch.
timing.creatednumberWhen the stream was created.
timing.expiresnumberWhen the stream renews/expires.

                                    {
                                        "name": "Pro AMS",
                                        "key": "85276a675940d3afab547c5f25ca96ae84a437a6d436cbbe2d",
                                        "region": "ams",
                                        "ingest": "rtmp://stream-ams1.graded.blue/live",
                                        "output": "rtmp://stream-ams1.graded.blue/live/85276a675940d3afab547c5f25ca96ae84a437a6d436cbbe2d",
                                        "renewing": true,
                                        "plan": "pro",
                                        "timing": {
                                            "created": 1599498693,
                                            "expires": 1602090693
                                        }
                                    }
                                

Try this API

Request parameters
Authentication

Sign in to use authentication.

Send

Regenerate Stream Key

Regenerate the key for a stream. Any active clients will be disconnected.

Request

Method: POST
https://stream.gradedblue.com/api/v1/stream/{streamId}/regen

Response

Content-Type: application/json
ParameterTypeDescription
keystringThe new stream key.

                                    {
                                        "key": "1b50951d0611f564a5cae4b73e45e9d59a56ae04dd07674a3c"
                                    }
                                

Try this API

Request parameters
Authentication

Sign in to use authentication.

Send