Setting Up api.video
Connect Media Cloud to api.video with an API key, optional sandbox mode and a public webhook host.
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
- Open the api.video dashboard.
- Go to Project Settings → API Keys.
- 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
- Go to Media Cloud → Settings → Video Encoding.
- Set Video Encoding Provider to api.video.
- Fill in the credentials:
| Field | Value |
|---|---|
| API Key | api.video API key |
| Sandbox Mode | On for sandbox, off for production |
| Webhook Host | The public base URL of your site |
- 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
| Problem | Likely cause |
|---|---|
| 401 from api.video | The API key is invalid or belongs to the other environment (sandbox vs production). |
| Video stays in a processing state | The webhook host is wrong or not publicly reachable. |
| Video imports into the wrong environment | Sandbox Mode does not match the API key. |
| Embedded player does not appear | Use api.video’s Embedded Player is off, or the Video Player tool is disabled. |
| Watermark is missing | Watermark 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.