К содержимому
← Все модели
МОДЕЛЬ / API

Wan 2.6

wan-2.6

Асинхронная генерация видео.

Создать API-ключ

Возможности

Видео
Окно контекста
Не указано в каталоге
Максимальный ответ
Не указано в каталоге

Стоимость использования

Секунда видео
7,85 ₽

Пример использования

Сохраните ключ на сервере в переменной AKI_GATE_API_KEY.

Python · /v1/videos
import os, time, json
from pathlib import Path
from urllib.parse import quote
import requests

base = "https://akigate.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["AKI_GATE_API_KEY"]}

def request(method, path, **kwargs):
    response = requests.request(method, base + path, headers=headers,
                                timeout=(10, 120), **kwargs)
    response.raise_for_status()
    return response

job = request("POST", "/videos", json=json.loads("{\n  \"model\": \"wan-2.6\",\n  \"prompt\": \"Premium cinematic brand film, photorealistic live action, Greenland arctic fjord in late summer, immense bare granite cliffs, deep blue bay with a few distant icebergs, subtle warm low evening sunlight, muted teal and warm amber grade, restrained luxury outdoor travel cinematography. One fictional adult man age 35, short dark hair, subtle stubble, dark charcoal outdoor jacket and dark trousers, holding a plain ivory ceramic coffee mug. No text, no logos, no subtitles, no speech, no voiceover. Sound: original gentle felt-piano and warm airy string-pad instrumental, calm quiet triumph and contentment after a job well done, slow 68 bpm, no drums, no vocals, soft wind and distant water beneath the music. A medium three-quarter rear-profile shot of the man seated comfortably on a broad stable granite ledge above the fjord. He slowly raises the coffee mug with one hand, takes one relaxed sip, then lowers it and watches the water. His feet rest naturally on the wide ledge. Camera slowly dollies backwards and slightly sideways, beginning to reveal the huge bay below. Realistic hands and a single mug. Smooth uninterrupted camera move; no cuts.\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"16:9\"\n}")).json()
print("Сохраните ID задачи:", job["id"])
path = "/videos/" + quote(job["id"], safe="")
for _ in range(60):
    job = request("GET", path).json()
    if job["status"] == "completed":
        break
    if job["status"] in ("failed", "cancelled", "canceled"):
        raise RuntimeError(job)
    time.sleep(2)
else:
    raise TimeoutError("Продолжите опрос задачи " + path)

with request("GET", path + "/content", stream=True) as response:
    with Path("video.mp4").open("wb") as output:
        for chunk in response.iter_content(65536):
            output.write(chunk)
print("Сохранено: video.mp4")
Другие примеры подключения

Подключить с помощью ИИ

Руководство в Markdown