SwitchX Video
Меняет в уже снятом видео фон, объект или свет по тексту, одному референсу и опциональной маске, сохраняя субъект — его форму, движение и мимику. Длительность берётся из исходника, на выходе 720p или 1080p.
Стоимость
от 9 токенов/с
IDEMPOTENCY_KEY="${IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.givon.ai/api/v1/generations \
-H "Authorization: Bearer $GIVON_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"video","model":"switchx-video","input":{"prompt":"кинематографичный пролёт дрона над ночным городом","aspectRatio":"auto","resolution":"720p","sourceVideo":"asset://asset_...","referenceAssetUris":["asset://asset_..."]}}'Входные поля
* — обязательное| Поле | Тип | По умолчанию | Допустимо |
|---|---|---|---|
prompt* promptGeneration prompt describing the scene, action and direction. | string | — | до 2000 симв. |
aspectRatio aspectRatio | string | auto | auto |
resolution resolution | string | 720p | 720p, 1080p |
Source video* sourceVideoAsset input for the sourceVideo slot. | string | — | video · asset, https, data |
Mask video switchxAlphaVideoAsset input for the switchxAlphaVideo slot. | string | — | video · asset, https, data |
Reference images referenceAssetUrisOptional reference assets as asset:// URIs, HTTPS URLs, or data URIs. | array | — | image · до 1 · asset, https, data |
providerOptions providerOptions | object | — | object |
promptGeneration prompt describing the scene, action and direction.
- Тип
- string
- По умолчанию
- —
- Допустимо
- до 2000 симв.
aspectRatio- Тип
- string
- По умолчанию
- auto
- Допустимо
- auto
resolution- Тип
- string
- По умолчанию
- 720p
- Допустимо
- 720p, 1080p
sourceVideoAsset input for the sourceVideo slot.
- Тип
- string
- По умолчанию
- —
- Допустимо
- video · asset, https, data
switchxAlphaVideoAsset input for the switchxAlphaVideo slot.
- Тип
- string
- По умолчанию
- —
- Допустимо
- video · asset, https, data
referenceAssetUrisOptional reference assets as asset:// URIs, HTTPS URLs, or data URIs.
- Тип
- array
- По умолчанию
- —
- Допустимо
- image · до 1 · asset, https, data
providerOptions- Тип
- object
- По умолчанию
- —
- Допустимо
- object
Стоимость
от 9 токенов/сВариант подбирается по полям запроса автоматически — указывать его не нужно.
Возможности
video_editsourceVideo:video*switchxAlphaVideo:videoreferenceAssetUris:image[]<=1Запустить SwitchX Video
Получи API-ключ — и этот же запрос заработает для любой модели каталога.