> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Quickstart

The FastPix Video API lets you build and stream videos that fit your workflow and design. You can customize videos for specific users and use cases. With streamlined setup and integration, developers can build modern video interactions and experiences for any stack, any app, at any scale, anywhere - with a faster time to market.

\


## Start using FastPix

Quickly get started with streaming videos; upload and playback videos in your application with FastPix video APIs.

\


### Activate your account

To get started with FastPix, activate your account and follow the dashboard setup steps in the **[Activate Account](/getting-started/activate-your-account)** page. Learn more about creating your account, setting up a workspace, and generating your API credentials (Access Token ID and Secret Key).

> 📘 NOTE
>
> The [Activate account guide](/getting-started/activate-your-account) includes screenshots and step-by-step instructions for creating a workspace, generating Access Token ID and Secret Key, selecting permissions, and securely downloading credentials as a `.env` file.

\


## Upload your first video using dashboard

Now that your FastPix account is set up, you can upload videos in two ways:

* [Upload a video from a URL](/upload-videos/upload-videos-from-a-url#upload-a-video-from-a-url)
* [Upload a video directly from your device](/upload-videos/upload-videos-from-device#upload-a-video-from-your-device)

For large or high-resolution uploads, including 4K content, review the recommended settings in the [Upload 4K videos guide](/upload-videos/upload-4k-videos).

\


Watch this Video Tutorial for a better understanding.

\


## Upload a video using API

To upload a video to FastPix, you need to follow these steps:

**a. Identify the video** : Every video that you store in FastPix is called a Media.

**b. Create a Media**: To create your first media, send a POST request to the [/on-demand](/video-on-demand-api/upload-and-import-videos/create-media) API endpoint, where the input value must be the URL of a video file that is accessible online.

**c. Use a demo video link**: For your convenience, we’ve provided a demo video link that you can use to send the request. FastPix retrieves the video from the provided URL and store it as a media asset.

\


**`Sample URL`**

```Text Sample URL
https://static.fastpix.com/fp-sample-video.mp4
```

\


By using this link, you can easily familiarize yourself with the process of creating a media in FastPix. After you’re comfortable with the process, you can start uploading your own videos and expanding your media library.

\


In the following curl command, replace `ACCESS_TOKEN_ID` and `SECRET_KEY` with the **Access Token ID** and **Secret Key** values from the `.env` file you downloaded.

\


**`POST /on-demand`**

```shell POST /on-demand
curl -X POST "https://api.fastpix.com/v1/on-demand" \
  -u {ACCESS_TOKEN_ID}:{SECRET_KEY} \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": [
      {
        "type": "video",
        "url": "https://static.fastpix.com/fp-sample-video.mp4"
      }
    ],
    "accessPolicy": "public"
  }'

```

\


The response contains unique identifiers like a **Media ID** and a **Playback ID**.

1. Media IDs are essential for media management on **api.fastpix.com/v1**. For instance, you can use them to read or delete specific media files.
2. **Playback IDs** are used to deliver media content to a video player through **stream.fastpix.com**. You can link multiple playback IDs to a single media file to create streaming or playback URLs with different access permissions. Additionally, you can also delete playback IDs to revoke viewing rights without the need to erase the actual media file.

\


**`200`**

```json 200
{
  "success": true,
  "data": {
    "id": "4ee2ec6a-7426-4501-8051-277ea1eb4014",
    "trial": true,
    "status": "Created",
    "createdAt": "2025-10-30T09:46:32.098964Z",
    "updatedAt": "2025-10-30T09:46:32.098967Z",
    "playbackIds": [
      {
        "id": "fe142e1f-c9c6-4098-b350-1bdf97b9b332",
        "accessPolicy": "public",
        "accessRestrictions": {
          "domains": {
            "defaultPolicy": "allow",
            "allow": [],
            "deny": []
          },
          "userAgents": {
            "defaultPolicy": "allow",
            "allow": [],
            "deny": []
          }
        }
      }
    ],
    "sourceAccess": false,
    "maxResolution": "1080p",
    "inputs": [
      {
        "type": "video",
        "url": "https://static.fastpix.com/fp-sample-video.mp4"
      }
    ],
    "subtitles": {},
    "optimizeAudio": false
  }
}
```

\


> **NOTE**
>
> FastPix does not store the original video file in it's exact form. Therefore, if preserving your original high-quality files is crucial, refrain from deleting them after uploading to FastPix.

\


### Check if media is ready

After initiating the`POST` request, FastPix initiates the download and processing of the video content. This operation is generally completed within seconds for smaller-sized files, but larger files or slower internet connections might extend this duration to several minutes.

After the video is fully processed and ready for playback, the media `status` changes to `"ready"`. It is essential to wait until this status update before attempting to play the video.

For timely updates on media status changes, the best way is through `webhooks`. FastPix can send over a webhook notification as soon as the asset is ready. (Refer to the [webhooks guide](/webhooks/set-up-webhooks) for more details.)

\


### Watch your video

To initialize playback of the media, you can insert the `playbackId` received from the API response or from the dashboard in the stream URL below.

**`Example`**

```json Example
https://stream.fastpix.com/{PLAYBACK_ID}.m3u8
```

You can use this URL (with .m3u8 extension) in other video players as per your use case.

\


To directly stream your video on a browser, you can also use the playback stream URL which is sharable. Simply preview your video by adding the `playbackId` to the stream URL.

**`Example`**

```Text Example
 https://play.fastpix.com/?playbackId=d983edb7-c672-4474-8e41-adc8d4d83b05
```

\


**FastPix Player integration with HTML**

You can integrate uploaded videos in FastPix Player which is built-in with video data tracking  to enhance your application’s media experience.

**`Example`**

```html Example
<script src="https://cdn.jsdelivr.net/npm/@fastpix/fp-player@<fp-player-version>/dist/player.js"></script>  
 
<fastpix-player  
    playback-id="{PLAYBACK_ID}"  
</fastpix-player> 
```

\


In the HTML snippet replace `<fp-player-version>` with the version of the player to activate the player functionality.

[Refer to the player guide](/web-player/install-the-fastpix-web-player)  for more details on integrating with the FastPix video player. You can further customize your [player interface](/web-player/adjust-player-layout-and-ui)  and video [playback experience](/web-player/autoplay-loop-and-mute)  as per your requirements.

After you have successfully implemented the integration, [connect FastPix Video Data](/web-players/monitor-the-fastpix-player)  with your player to monitor playback performance.

\


### Manage your media

Upload and playback of your video is just one part of geting started. To build video effectively into your product, you need other functionalities. After you have already added media files into your FastPix workspace, the following endpoints would come in handy:

* [Create media from URL](/video-on-demand-api/upload-and-import-videos/create-media)   `API`
* [Get list of all media](/video-on-demand-api/manage-videos/list-media)   `API`
* [Get a media by ID](/video-on-demand-api/manage-videos/get-media)    `API`
* [Update a media by ID](/video-on-demand-api/manage-videos/updated-media)   `API`
* [Delete a media by ID](/video-on-demand-api/manage-videos/delete-media)    `API`
* [Get info of media inputs](/video-on-demand-api/manage-videos/retrieve-media-input-info)  `API`
* [Create a playback ID](/video-on-demand-api/playback/create-media-playback-id)  `API`
* [Delete a playback ID](/video-on-demand-api/playback/delete-media-playback-id)   `API`
* [Upload media from device](/video-on-demand-api/upload-and-import-videos/direct-upload-video-media)  `API`

#### Frequently asked questions

Send a `POST` request to `https://api.fastpix.com/v1/on-demand` with HTTP Basic Auth (your `Access Token ID` as username, `Secret Key` as password) and an `inputs` array containing the source URL. FastPix pulls the file, runs transcoding, and returns a `mediaId` and `playbackId` in the response.

On-Demand Video is pre-recorded content a viewer can start at any time, as opposed to a live broadcast. FastPix ingests the source, runs encoding to produce HLS renditions, and serves them via adaptive bitrate streaming from `stream.fastpix.com/<playbackId>.m3u8`.

Short clips typically reach `ready` within seconds. Larger files or slower source-URL connections can extend this to several minutes. Listen for the `video.media.ready` webhook rather than polling when possible.

A 401 means the `Access Token ID` or `Secret Key` is missing, swapped, or revoked. Confirm you are using HTTP Basic Auth with the token ID as username and the secret as password, that both values come from the same workspace's `.env` file, and that the credential has not been deleted in the dashboard.

Yes. Create additional `playbackId` values with different `accessPolicy` settings — for example, one `public` ID for marketing and one `private` signed ID for paid users. Deleting a `playbackId` revokes that URL without affecting the underlying media.

Enable live-to-VOD recording on your live stream configuration. When the stream ends, FastPix automatically creates an On-Demand Video asset with its own `mediaId` and `playbackId`, so viewers can replay the broadcast through the same HLS manifest pattern at `stream.fastpix.com/<playbackId>.m3u8`.

## What's next?

* [Upload videos from URL](/upload-videos/upload-videos-from-a-url)
* [Secure playback with signed URLs](/video-security/generate-jwts-for-secure-media)
* [API reference: Create media](/video-on-demand-api/upload-and-import-videos/create-media)