> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pandavideo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Download Videos via API

# How to Download Videos via API

## Learn How to Use the API to Download Your Videos

Panda Video offers a dedicated endpoint for direct video downloads.  
To use it, send a **POST** request to:

https://download-us01.pandavideo.com:7443/videos/{video_id}/download

Replace `{video_id}` with the ID of the desired video.

You can use the API via code (in JavaScript, for example), tools like **Postman**, or directly through the [API documentation](https://pandavideo.readme.io/reference/download-video). Below, we explain step-by-step with images and examples.

---

## 1. Generating the API Key

To use any API functionality, you need to generate an **access key**:

* Go to **Settings > Advanced**
* Click **Generate New API Key**
* Copy the code that will be displayed

||| **Attention:** this key grants full access to your account via API. Keep it secure. If lost, you will need to generate a new one (which will invalidate the previous key).

![](https://storage.crisp.chat/users/helpdesk/website/-/5/e/f/c/5efce8ce8b62b000/chave-api_1bvv1tu.png)

---

## 2. Getting the Video ID

You can obtain the Video ID in three ways:

* Using the API's listing or properties endpoints  
* Or directly from the **video URL in the dashboard**

Go to **Videos > click on the desired video**. The ID will be at the end of the URL:

![](https://storage.crisp.chat/users/helpdesk/website/-/5/e/f/c/5efce8ce8b62b000/videoid_kw7xgi.png)

---

## 3. Using the Documentation to Generate the Request

1. Go to: [https://pandavideo.readme.io/reference/download-video](https://pandavideo.readme.io/reference/download-video)  
2. Fill in the fields with the Video ID and your API key:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/dados-na-documentacaopng_wz0oaa.png)

3. Select **Shell (CURL Request)** as the language and click the copy button:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/print-do-copiar-requestpng_1ah3s6x.png)

---

## 4. Using Postman

1. Open Postman and click **Import** (top left corner)

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/tela-postman-1png_ubrlyt.png)

2. Paste the copied CURL code into the text field:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/tela-postman-2png_159i0in.png)

3. Click **Send**. The video will appear in the **Body** tab of the response:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/postman-sendpng_1tpw2wf.png)

4. To download, click the three dots > **Save Response to file**:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/postman-downloadpng_x8xcs1.png)

---

## 5. Using Code Directly via GitHub

If you want to integrate the API into your system, you can use our **ready-made examples on GitHub**. Check it out:

👉 [GitHub - Video Download Example](https://github.com/pandavideo/Direct-Front-End-Video-Download-Example/blob/master/index.html)

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/image_1p8vp7m.png)

---

## 6. Inserting the Code into an .html File

1. Copy the code from GitHub  
2. Create an `.html` file in your editor (such as VS Code)  
3. Paste the code into the file:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/extensao-htmlpng_1iz8xfj.png)

---

## 7. Changing the Code Data

Inside the code, replace the values for:

* `'API_KEY'`  
* `'VIDEO_ID'`

With the information from your account and video:

![](https://storage.crisp.chat/users/helpdesk/website/5efce8ce8b62b000/vscode-download-apipng_16hl716.png)

|| This example was made in **VS Code**, but you can use any other editor or IDE.

---

## Got any questions?

Reach out to our support team via chat, and our team will do their best to resolve any questions you have.

Not using Panda Video yet? Visit our [pricing page](https://www.pandavideo.com/pricing) and choose the plan that’s right for your business.
