Veo-3
API для получения генерации от модели Veo 3 (Quality)
Запрос
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: {
// use your API key here
Authorization: 'YOUR_API_KEY',
},
data: {
model:"glabs-veo-3",
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: «Многие под старость задумываются, будет ли жизнь после смерти. Что я могу им сказать? Конечно, будет. Но без вас», 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., 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)
})
Request Body
model*
string
Уникальный ID модели
prompt*
string
Промпт запроса
images
Array<string>
Массив ссылок на изображения для контекста, принимает только 1 изображение (первый кадр)
ar
string
Соотношение сторон, допустимые значения '1:1', '16:9', '9:16'
Headers
Authorization*
string
API ключ
Пример ответа /create
{
"code": 0,
"id": "6870d9bc6fd394f886a7bd7f",
"model": "glabs-veo-3",
"prompt": "",
"created_at": 1753202556,
"status": "idle",
"url": null
}
После получения 24-значного идентификатора задачи вы можете вызвать метод для получения результата.
POST
https://gptunnel.ru/v1/media/result
Запрос можно вызвать как POST так и GET методом передав task_id
в query либо в body. Результатом выполнения запроса будет json объект с ссылкой на изображение.
Пример запроса /result
import axios from 'axios'
const request = axios({
method: 'POST',
url: 'https://gptunnel.ru/v1/media/result',
headers: {
// use your API key here
Authorization: 'YOUR_API_KEY',
},
data: {
task_id:"6870d9bc6fd394f886a7bd7f"
},
})
request.then((result) => {
console.log(result)
}).catch((error) => {
console.error(error)
})
Пример ответа /result
{
"code": 0,
"id": "6870d9bc6fd394f886a7bd7f",
"model": "glabs-veo-3",
"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: «Многие под старость задумываются, будет ли жизнь после смерти. Что я могу им сказать? Конечно, будет. Но без вас», 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., 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": 1753102441,
"status": "done",
"url": "https://timenote.storage.yandexcloud.net/predication/6870d9bc6fd394f886a7bd7f_result.mp4"
}
Ссылка на файл доступна в течение 48 часов. Если вы планируете получить доступ к сгенерированному файлу позже, рекомендуется сохранить его на вашем ресурсе.
Last updated