Skip to main content

Quick Start

This guide walks you through the complete flow: authenticate, upload a video, wait for processing, and embed it – in under 5 minutes.

Prerequisites

You need a Streamdiver tenant with API credentials (tenantShortcode, clientId, clientSecret). Don't have one yet? Request trial access.

Step 1: Get an Access Token

Request an OAuth 2.0 token using your credentials:

curl --request POST \
--url https://sso.streamdiver.com/realms/{tenantShortcode}/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id={clientId} \
--data client_secret={clientSecret}

You'll receive a JSON response with an access_token. Use it as a Bearer token in all subsequent requests.

For details on token lifetime and refresh, see Authentication.

Step 2: Upload a Video

Create an upload and send the file with a simple PUT request:

# Create the upload
curl --request POST \
--url https://api.streamdiver.com/v2/uploads \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--data '{ "fileName": "my-video.mp4", "type": "put" }'

# Upload the file using the URL from the response
curl -X PUT -T my-video.mp4 "{url-from-response}"

For large files (5GB+), use the S3 multipart procedure. See Upload for details.

Step 3: Complete the Upload

Mark the upload as complete to trigger transcoding and AI processing. Pass an optional channelId query parameter to assign the asset to a specific channel – if omitted, it goes to the default channel.

curl --request PUT \
--url "https://api.streamdiver.com/v2/uploads/{uploadId}/complete?channelId={channelId}" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json"

The response includes the assetId – the ID of your new media asset. Streamdiver now automatically transcodes the video and runs the AI pipeline (transcription, speaker recognition, chapter generation, etc.).

Step 4: Retrieve the Media Asset

Use the assetId to fetch the media asset. The response includes processing status and the ready-to-use embed code in the player property:

curl --request GET \
--url https://api.streamdiver.com/v2/media/{assetId} \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json"
Processing time

Transcoding and AI processing run asynchronously. For short videos this typically takes a few minutes. Poll the asset periodically to check when it's ready.

Step 5: Publish the Channel

The widget requires the asset's channel to be public. If your channel isn't public yet, update its visibility (you only need to do this once per channel):

curl --request PUT \
--url https://api.streamdiver.com/v2/channels/{channelId}/visibility \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--data '{ "visibility": "public" }'

Step 6: Embed the Player

Add the Publishing-Suite widget to any webpage – cookie-free, no consent banner required:

<link rel="stylesheet" href="https://assets.streamdiver.com/playerwidget/2/sdwebwidgets.css">
<script type="module" crossorigin src="https://assets.streamdiver.com/playerwidget/2/sdwebwidgets.js"></script>

<sd-media-widget
tenant-name="{tenantShortcode}"
asset-id="{assetId}">
</sd-media-widget>
Cookie-free

Unlike YouTube or Vimeo embeds, Streamdiver widgets set no cookies and require no cookie consent banner – fully GDPR-compliant out of the box.

What's Next?