Skip to content
Media CloudDocs
Happy HolidaysSave 20% with codeValid through December 31Shop the sale
Setting Up api.video
On this page

Setting Up api.video

Connect Media Cloud to api.video with an API key, optional sandbox mode and a public webhook host.

3 min read·3 tags

api.video is a video encoding and delivery platform. Media Cloud imports uploaded videos into api.video, registers a webhook for encoding events, and plays the HLS renditions with the Media Cloud player.

api.video support is labeled Beta in Media Cloud.

Before you start

You need:

  • An api.video account.
  • An API key from the project you want to use.
  • A publicly reachable site, or a tunnel such as ngrok, for the webhook.

Step 1 – Copy the API key

  1. Open the api.video dashboard.
  2. Go to Project Settings → API Keys.
  3. Copy the API key.

Production and sandbox environments use different keys. If you enable Sandbox Mode in Media Cloud, use the sandbox key.

Step 2 – Configure Media Cloud

  1. Go to Media Cloud → Settings → Video Encoding.
  2. Set Video Encoding Provider to api.video.
  3. Fill in the credentials:
FieldValue
API Keyapi.video API key
Sandbox ModeOn for sandbox, off for production
Webhook HostThe public base URL of your site
  1. Save the settings.

Media Cloud registers the webhook with api.video automatically. The webhook URL is built as:

<Webhook Host>/__api-video/webhook

Enter your site URL, including the scheme. For local development, use your ngrok URL.

Step 3 – Upload a video

Upload a video through the WordPress media library. Media Cloud sends the video to api.video and waits for the encoding webhook. When encoding finishes, Media Cloud stores the video metadata and downloads the poster image.

If Cloud Storage is enabled, Media Cloud gives api.video a short-lived pre-signed URL for the source file. If Cloud Storage is not enabled, the WordPress attachment URL must be publicly accessible.

Playback

api.video videos play as HLS through the Media Cloud player. Use the video player block or shortcode. See Player Blocks.

Pro features

The Pro version adds:

  • Use api.video’s Embedded Player to replace the Media Cloud player with api.video’s iframe player.
  • Watermark settings for imported videos.

Security settings are not available for this provider.

Limitations

  • api.video support is beta.
  • Encoding settings and security settings are not available for this provider.
  • Sandbox and production use different API keys; switching modes requires updating the key.
  • The webhook host must be publicly reachable.

Troubleshooting

ProblemLikely cause
401 from api.videoThe API key is invalid or belongs to the other environment (sandbox vs production).
Video stays in a processing stateThe webhook host is wrong or not publicly reachable.
Video imports into the wrong environmentSandbox Mode does not match the API key.
Embedded player does not appearUse api.video’s Embedded Player is off, or the Video Player tool is disabled.
Watermark is missingWatermark settings are Pro-only and apply when a video is imported.

Need a hand with this guide?

Send support the exact step you’re stuck on and we’ll help you finish the setup.

Contact support
Start typing to search the docs

Escto close·⌘Kto open

View all results →