MMashaGPT API
MMashaGPT API
МоделиДокументацияТестированиеAPI-ключиПлатежи
МоделиДокументацияТестированиеAPI-ключиПлатежи
К обзору модели

API-документация

Подробное подключение Task API для Seedance 2.5 Text-to-Video

API-документация

Эндпоинт

Базовый URLhttps://api.mashagpt.ru/v1
Эндпоинт
POST
/v1/tasks/seedance-v2-5-text-to-video
Авторизация
x-api-key: YOUR_API_KEY
илиAuthorization: Bearer YOUR_API_KEY

Как прикрепить изображение

В запрос модели файл не отправляется напрямую. Сначала загрузите файл в MashaGPT storage, получите публичный URL и передайте его в параметр firstFrameUrl, lastFrameUrl, referenceImageUrls, referenceVideoUrls, referenceAudioUrls.

Не передавайте в JSON blob:, file://, data:, base64 или сырые байты. Storage принимает multipart/form-data с одним полем file. Подробный контракт: /v1/storage/upload.

1. Загрузить файл
curl -X POST "https://api.mashagpt.ru/v1/storage/upload" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@./reference.png"

Ответ вернет URL вида https://static.mashagpt.ru/...

2. Передать URL в модель
curl -X POST "https://api.mashagpt.ru/v1/tasks/seedance-v2-5-text-to-video" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "prompt": "Опишите желаемый результат",
  "firstFrameUrl": "https://static.mashagpt.ru/dl/mashagpt/reference.webp"
}'

Если файл уже доступен по публичному URL, его можно передать сразу. Загрузка через MashaGPT storage надежнее для файлов с компьютера.

Параметры запроса

ПараметрТипОписание
prompt*
stringText prompt describing the video content (max 30000 characters). Пример — A single 30-second tracking shot through a rainy neon market.
aspectRatio
stringДопустимые значения: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, adaptive. Output aspect ratio. Ignored for frame tasks: when firstFrameUrl or lastFrameUrl is set the provider accepts only "adaptive", so the value is normalized to it. По умолчанию — 16:9.
resolution
stringДопустимые значения: 480p, 720p, 1080p. Output resolution. Price per second increases with resolution. По умолчанию — 720p.
duration*
integerДопустимые значения: -1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30. Video duration: integer 4-30, or -1 for automatic duration. Auto reserves up to 30 output seconds. On completion, the authenticated provider charge is billed at 2x, capped by the reservation. If completed output is verified but its charge is unavailable after bounded retries, it is delivered without charge. Пример — 10.
fixedLens
booleanUse fixed/static camera (true) or dynamic camera movement (false).
firstFrameUrl
stringFirst frame image URL — use last frame of previous scene for continuity.
lastFrameUrl
stringLast frame image URL — specify the ending frame.
referenceImageUrls
string[]Reference image URLs for character/style consistency (up to 30, max 30MB each).
referenceVideoUrls
string[]Reference video URLs (up to 10, MP4/MOV, max 200MB each, 2-30s each, total duration up to 30s). Price includes measured input and output seconds.
referenceAudioUrls
string[]Reference audio URLs for audio style (up to 10, 2-30s each, total up to 30s, max 15MB each).
generateAudio
booleanGenerate synchronized audio. По умолчанию — true.
returnLastFrame
booleanReturn the final frame alongside the video. По умолчанию — false.
outputFormat
stringДопустимые значения: mp4, mov. По умолчанию — mp4.
webSearch
booleanEnable web search. По умолчанию — false.
nsfwChecker
booleanДопустимые значения: true. Provider content filter. Must remain enabled. По умолчанию — true.

Пример запроса и ответа

Запрос
curl -X POST https://api.mashagpt.ru/v1/tasks/seedance-v2-5-text-to-video \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "prompt": "A single 30-second tracking shot through a rainy neon market",
  "aspectRatio": "16:9",
  "resolution": "720p",
  "duration": -1,
  "generateAudio": true,
  "returnLastFrame": false,
  "outputFormat": "mp4",
  "webSearch": false,
  "nsfwChecker": true
}'
Ответ
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "550e8400-e29b-41d4-a716-446655440000",
    "state": "queued"
  }
}

Асинхронная обработка

Модель работает асинхронно. После запроса вы получите taskId задачи для отслеживания статуса.

GET
/v1/tasks/{id}статус задачи
Проверка статуса задачи:
curl -X GET "https://api.mashagpt.ru/v1/tasks/{task_id}" \
  -H "x-api-key: YOUR_API_KEY"

Жизненный цикл задачи:

queued→processing→completed|failed

Сводка

Основные параметры Task API.

Модельseedance-v2-5-text-to-video
Провайдер
ByteDance
Эндпоинт/v1/tasks/seedance-v2-5-text-to-video
Тип ответа
видео
Стоимость
от 280,01 ₽