---
title: "Import Video"
method: POST
path: "/import-video"
tags: ["Shorts"]
---

# Import Video

`POST /import-video`

## Request

- Base URL: `https://api-v2.pandavideo.com.br/shorts`
- URL: `https://api-v2.pandavideo.com.br/shorts/import-video`
- Auth: API key in header `Authorization`

Creates a new video processing job. Routes internally based on `source_type` to handle YouTube URLs, PandaVideo library videos, or uploaded files.

## Request body

- object
  - `source_type` 'youtube' | 'library' | 'upload', required: The source of the video. Must be `youtube`, `library` or `upload`.
  - `source_url` string: **Required when `source_type` is `youtube`**. The YouTube video URL.
  - `video_id` string: **Required when `source_type` is `library`**. The PandaVideo library video ID.
  - `pullzone_name` string: **Required when `source_type` is `library`**. The pullzone name associated with the library video.
  - `s3_key` string: **Required when `source_type` is `upload`**. The S3 key of the previously uploaded video file (obtained from the upload endpoints).
  - `start_time` number, required: Start time of the video segment to analyze, in seconds. Must be less than `end_time`.
  - `end_time` number, required: End time of the video segment to analyze, in seconds. Must be greater than `start_time`.
  - `user_context` object: Rendering context options including caption style, font, colors, and layout mode.
    - `video_title` string: Title of the video.
    - `context` string: Additional context for AI analysis.
    - `aspect_ratio` string: Desired output aspect ratio (e.g. `9:16`).
    - `duration_preset` string: Target duration preset for generated shorts.
    - `language` string: Language code for transcription and captions.
    - `caption_style` 'style1' | 'style2' | 'style3' | 'style4': Caption visual style preset.
    - `font` 'Archivo' | 'Bangers' | 'Inter' | 'Montserrat' | 'Nunito Sans' | 'Fredoka': Font family for captions.
    - `text_color` string: Hex color for caption text.
    - `highlight_color` string: Hex color for highlighted caption words.
    - `layout_mode` 'static' | 'blur' | 'gaming' | 'react' | 'split': Video layout mode for the generated short.
    - `video_external_id` string: **Required when `source_type` is `library`**. The PandaVideo library video External ID.
  - `aspect_ratio` 'vertical' | 'horizontal' | 'square': Desired output aspect ratio.
  - `cookies` string: Cookies for YouTube authentication (used when `source_type` is `youtube` and the video requires authentication).

## Response `201`

201

- object
  - `success` boolean
  - `job_id` string: UUID of the created short.
  - `status` 'waiting' | 'processing': Current short status.
  - `analysis_duration` number: Duration of the video segment to be analyzed, in seconds.
  - `estimated_processing_seconds` number: Estimated time to complete processing, in seconds.

## Other responses

- `400`: 400
- `500`: 500

---

[API](https://skmtc.dev/pandavideo/apis/shorts.md) - [All operations](https://skmtc.dev/pandavideo/apis/shorts/llms.txt) - [OpenAPI document](https://skmtc.dev/pandavideo/apis/shorts/revisions/912538d74790?raw)
