Developer API

Video API

Ставьте AI video jobs в очередь, отслеживайте generation status, режьте длинные видео на clips и запускайте studio tools для images, audio, lipsync, edits и ads.

Create jobs

Запускайте long-running video generation и repurpose jobs. Create requests должны включать Idempotency-Key.

Пример
curl -X POST https://grik.io/api/v1/generate/video \
  -H "Authorization: Bearer GRIK_API_KEY" \
  -H "Idempotency-Key: video_job_123" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling",
    "prompt": "A cinematic product reveal on a black reflective table",
    "aspect_ratio": "16:9",
    "duration": "5s",
    "mode": "standard",
    "sound": "on"
  }'
МетодEndpoint
POST/generate/video

Запускает text-to-video или image-to-video generation с model, aspect ratio, duration, mode, image URL и sound options.

POST/repurpose

Запускает repurposing pipeline из YouTube или file URL с optional language.

Проверить status

Опрашивайте generation и repurpose records, пока job не достигнет terminal status.

МетодEndpoint
GET/generation/:id

Возвращает generation record, status, output video URL, metadata, file size и error message.

GET/repurpose/:id

Возвращает repurposing task с clips, transcripts, segments, viral scores и output URLs.

Image tools

Generate, edit, enhance, faceswap, character и 3D-angle assets для video workflows.

МетодEndpoint
POST/images/generate

Генерирует images по prompt, reference image, palette, model и resolution.

POST/images/edit

Редактирует image по prompt и source image URL.

POST/images/enhance

Улучшает или upscale image asset.

POST/images/faceswap

Делает face swap между target и source images.

POST/images/3d-angles

Генерирует 3D/360-style video из image.

POST/images/character-gen

Создает consistent character из prompt и optional reference image.

Studio tools

Запускайте speech, audio enhancement, lipsync, recast, transition, edit и ad generation operations.

МетодEndpoint
POST/repurpose/tts

Генерирует speech audio из text и voice selection.

POST/repurpose/enhance-audio

Ставит audio enhancement для source video в очередь.

POST/repurpose/lipsync

Синхронизирует video с переданным audio track.

POST/repurpose/recast

Заменяет или recast персонажа в source video по target image.

POST/video/transitions

Создает transitions между двумя или более input video URLs.

POST/video/edit

Редактирует existing video по natural-language prompt.

POST/ads/generate

Генерирует ad creative из product URL.