Seedream 3
Создание задачи
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: 'seedream-3', ar: '9:16', prompt: 'Cyberpunk Einstein head constructed from white medical equipment and computer parts, blue glowing eyes, flowing cable hair, surrounded by electronic debris and machinery, dystopian workshop setting, detailed mechanical textures, sci-fi horror aesthetic', },})
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": "seedream-3", "ar": "9:16", "prompt": "Cyberpunk Einstein head constructed from white medical equipment and computer parts, blue glowing eyes, flowing cable hair, surrounded by electronic debris and machinery, dystopian workshop setting, detailed mechanical textures, sci-fi horror aesthetic", },)
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": "seedream-3", "ar": "9:16", "prompt": "Cyberpunk Einstein head constructed from white medical equipment and computer parts, blue glowing eyes, flowing cable hair, surrounded by electronic debris and machinery, dystopian workshop setting, detailed mechanical textures, sci-fi horror aesthetic" }'Параметры запроса
| Параметр | Тип | Описание |
|---|---|---|
model* | string | Уникальный ID модели |
prompt* | string | Промпт запроса |
images | Array<string> | Массив ссылок на изображения для изменения (принимает 1 изображение), если передано то ar игнорируется |
ar | string | Соотношение сторон, допустимые значения '1:1', '16:9', '9:16', '4:3', '3:4' |
Заголовки
| Параметр | Тип | Описание |
|---|---|---|
Authorization* | string | API ключ |
Пример ответа /create
{ "code": 0, "id": "6876a7a68cc456ab830ab9df", "model": "seedream-3", "prompt": "Cyberpunk Einstein head constructed from white medical equipment and computer parts, blue glowing eyes, flowing cable hair, surrounded by electronic debris and machinery, dystopian workshop setting, detailed mechanical textures, sci-fi horror aesthetic --ar 9:16", "created_at": 1753185911, "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: '6876a7a68cc456ab830ab9df', },})
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": "6876a7a68cc456ab830ab9df", },)
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": "6876a7a68cc456ab830ab9df" }'Пример ответа /result
{ "code": 0, "id": "6876a7a68cc456ab830ab9df", "model": "seedream-3", "prompt": "Cyberpunk Einstein head constructed from white medical equipment and computer parts, blue glowing eyes, flowing cable hair, surrounded by electronic debris and machinery, dystopian workshop setting, detailed mechanical textures, sci-fi horror aesthetic --ar 9:16", "created_at": 1753185911, "status": "done", "url": "https://timenote.storage.yandexcloud.net/predication/6876a7a68cc456ab830ab9df--original.webp"}