Veo-3.1 Fast
Создание задачи
POST
https://gptunnel.ru/v1/media/create Асинхронный запрос вернёт задачу и её идентификатор — сохраните его для последующего получения ссылки на результат.
Пример запроса /create
import axios from 'axios'
const request = axios({ method: 'POST', url: 'https://gptunnel.ru/v1/media/create', headers: { Authorization: 'YOUR_API_KEY', }, data: { model: 'glabs-veo-3-1-fast', prompt: 'A seventy-five-year-old Soviet grandmother with grey hair in neat bun wearing vintage floral dress and old-fashioned glasses, standing at microphone on comedy stage and says in Russian: «Два дракона заходят в бар. Один другому: "Что-то здесь жарkovато". Второй в ответ: "Рот закрой"», with perfect comedic timing and mischievous smile, in modern comedy club with brick walls and neon stage lights, audience laughter and applause building in background, warm spotlight with colorful stage lighting, cinematic quality, medium shot, high resolution, nostalgic comedy atmosphere.', },})
request .then((result) => { console.log(result) }) .catch((error) => { console.error(error) })import requests
response = requests.post( "https://gptunnel.ru/v1/media/create", headers={ "Authorization": "YOUR_API_KEY", "Content-Type": "application/json", }, json={ "model": "glabs-veo-3-1-fast", "prompt": "A seventy-five-year-old Soviet grandmother with grey hair in neat bun wearing vintage floral dress and old-fashioned glasses, standing at microphone on comedy stage and says in Russian: «Два дракона заходят в бар. Один другому: \"Что-то здесь жарkovато\". Второй в ответ: \"Рот закрой\"», with perfect comedic timing and mischievous smile, in modern comedy club with brick walls and neon stage lights, audience laughter and applause building in background, warm spotlight with colorful stage lighting, cinematic quality, medium shot, high resolution, nostalgic comedy atmosphere.", },)
print(response.json())curl --request POST \ --url https://gptunnel.ru/v1/media/create \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "model": "glabs-veo-3-1-fast", "prompt": "A seventy-five-year-old Soviet grandmother with grey hair in neat bun wearing vintage floral dress and old-fashioned glasses, standing at microphone on comedy stage and says in Russian: «Два дракона заходят в бар. Один другому: \"Что-то здесь жарkovато\". Второй в ответ: \"Рот закрой\"», with perfect comedic timing and mischievous smile, in modern comedy club with brick walls and neon stage lights, audience laughter and applause building in background, warm spotlight with colorful stage lighting, cinematic quality, medium shot, high resolution, nostalgic comedy atmosphere." }'Параметры запроса
| Параметр | Тип | Описание |
|---|---|---|
model* | string | Уникальный ID модели |
prompt* | string | Промпт запроса |
images | Array<string> | Массив ссылок на изображения для контекста, принимает только 1 изображение (первый кадр) |
ar | string | Соотношение сторон, допустимые значения '1:1', '16:9', '9:16' |
Заголовки
| Параметр | Тип | Описание |
|---|---|---|
Authorization* | string | API ключ |
Пример ответа /create
{ "code": 0, "id": "684e5b2214bed9a815408cb3", "model": "glabs-veo-3-1-fast", "prompt": "", "created_at": 175300055, "status": "idle", "url": null}Получение результата
POST
https://gptunnel.ru/v1/media/result После получения 24-значного идентификатора задачи вы можете вызвать метод для получения результата. Запрос можно вызвать как POST так и GET методом передав task_id в query либо в body.
Пример запроса /result
import axios from 'axios'
const request = axios({ method: 'POST', url: 'https://gptunnel.ru/v1/media/result', headers: { Authorization: 'YOUR_API_KEY', }, data: { task_id: '684e5b2214bed9a815408cb3', },})
request .then((result) => { console.log(result) }) .catch((error) => { console.error(error) })import requests
response = requests.post( "https://gptunnel.ru/v1/media/result", headers={ "Authorization": "YOUR_API_KEY", "Content-Type": "application/json", }, json={ "task_id": "684e5b2214bed9a815408cb3", },)
print(response.json())curl --request POST \ --url https://gptunnel.ru/v1/media/result \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "task_id": "684e5b2214bed9a815408cb3" }'Пример ответа /result
{ "code": 0, "id": "684e5b2214bed9a815408cb3", "model": "glabs-veo-3-1-fast", "prompt": "A seventy-five-year-old Soviet grandmother with grey hair in neat bun wearing vintage floral dress and old-fashioned glasses, standing at microphone on comedy stage and says in Russian: «Два дракона заходят в бар. Один другому: \"Что-то здесь жарkovато\". Второй в ответ: \"Рот закрой\"», with perfect comedic timing and mischievous smile, in modern comedy club with brick walls and neon stage lights, audience laughter and applause building in background, warm spotlight with colorful stage lighting, cinematic quality, medium shot, high resolution, nostalgic comedy atmosphere.", "created_at": 175300055, "status": "done", "url": "https://timenote.storage.yandexcloud.net/predication/6870d9bc6fd394f886a7bd7f_result.mp4"}