API Kandinsky

Programmatic access to Kandinsky models: image generation and editing, video with sound, talking avatars, upscaling

Where to start

Choose what you want to create.

How it works

All models work the same way and differ only in address and parameters.

1

Create a task

POST /v1/tasks/<model>

2

Check the status

GET /v1/tasks/<task_id>

3

Download the result

GET /v1/tasks/<task_id>/result

Base URLhttps://kandinskyapi.sberdevices.ru/v1

Authorization: the header Authorization: Bearer <token>. The body of every POST contains censor and an object params with the model parameters. Files (images, video, audio) are passed in params as a Base64 string.

Quick start

Copy an example and paste your token: in cURL instead of <TOKEN>, in Python into the TOKEN. Python examples need the requests library: python -m pip install requests.

1

Create a task

Send a POST to the address of the model you need. The response contains a task_id.

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/k6-image-t2i" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"query":"A watercolor house by a lake at dawn","resolution":"1024x1024"}}'
2

Check the status

Request the task by task_id until it finishes.

curl -fS "https://kandinskyapi.sberdevices.ru/v1/tasks/<TASK_ID>" \
  -H "Authorization: Bearer <TOKEN>"
3

Download the result

When the task is done, download the file: PNG, MP4 or ZIP, depending on the model.

curl -fS "https://kandinskyapi.sberdevices.ru/v1/tasks/<TASK_ID>/result" \
  -H "Authorization: Bearer <TOKEN>" \
  --output result.bin

Images

Kandinsky 6 T2I

Text to image

Creates an image from a text description.

POST/v1/tasks/k6-image-t2i

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/k6-image-t2i" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"query":"A watercolor house by a lake at dawn","resolution":"1024x1024","beautificator":"enabled"}}'
FieldReq.Values and limits
queryyesPrompt text, up to 2048 characters. Describes the content and style of the image.
resolutionno1280x768, 768x1280, 1024x1024, 768x768 or auto. With auto the service picks the size.
beautificatornoenabled (default) or disabled. Automatic prompt expansion.

Result. PNG. Sizes: 1280×768, 768×1280, 768×768 and 1024×1024.

Kandinsky 6 I2I

Images and text to image

Builds a new image from 1–3 references and a text description. The order of the pictures matters: you can refer to them in the prompt.

POST/v1/tasks/k6-i2i

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/k6-i2i" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"image":["<BASE64_IMAGE_1>"],"query":"Place the object on a light studio background","beautificator":"enabled"}}'
FieldReq.Values and limits
imageyesAn array of 1–3 JPEG/PNG images in Base64, up to 4096×4096. Request body up to 100 MB.
queryyesText up to 2048 characters. Say which elements to take from each image and how to compose the result.
beautificatornoenabled (default) or disabled.

Result. PNG. The size is chosen by aspect ratio: 1280×768, 768×1280 or 1024×1024.

Kandinsky Super Res

Image upscaling

Enlarges an image 2 or 4 times and redraws the details.

POST/v1/tasks/kandinsky-image-sr-2

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/kandinsky-image-sr-2" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"image":"<BASE64_IMAGE>","upscale":2,"creativity":4}}'
FieldReq.Values and limits
imageyesOne JPEG/PNG image in Base64, up to 4096×4096. Request body up to 100 MB.
upscaleyesUpscale factor: 2 or 4.
creativitynoAn integer from 0 to 8, default 4. 0 stays closer to the source, 8 gives more freedom in the details.

Result. PNG. The maximum result size is 16384×16384.

Video

Kandinsky 6.5 Preview T2VA

Text to video with sound

Generates video with sound from text. Describe the scene, the motion and the sound you want in the prompt.

POST/v1/tasks/kandinsky6.5-preview-t2va

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/kandinsky6.5-preview-t2va" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"query":"A calm sea at sunset, the soft sound of waves","aspect_ratio":"16:9","duration":5}}'
FieldReq.Values and limits
queryyesText up to 2048 characters: scene, motion, sound.
aspect_rationo1:1, 16:9 or 9:16. Default 16:9.
durationnoDuration in seconds: 5, 10 or 15. Default 5.

Result. MP4 with sound, 24 fps. Sizes: 1:1 — 2048×2048, 16:9 — 2688×1536, 9:16 — 1536×2688.

Kandinsky 6.5 Preview Ref2VA

References to video with sound

Brings up to three references to life: characters, objects, background. Describe the action and the sound in the prompt.

POST/v1/tasks/kandinsky6.5-preview-i2va

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/kandinsky6.5-preview-i2va" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"images":["<BASE64_IMAGE_1>"],"query":"A character walks through a park, birds can be heard","aspect_ratio":"16:9","duration":5}}'
FieldReq.Values and limits
imagesyesAn array of 1–3 JPEG/PNG images in Base64, up to 4096×4096. Request body up to 100 MB.
queryyesText up to 2048 characters: action and sound.
aspect_rationo1:1, 16:9 or 9:16. Default 16:9.
durationno5, 10 or 15 seconds. Default 5.

Result. MP4 with sound, 24 fps. Sizes are the same as for T2VA.

Kandinsky 6 Pro Fast T2VA

Text to video, sound and size settings

Fast video from text. You can choose the size and turn off the sound track.

POST/v1/tasks/k6-video-pro-fast-t2va

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/k6-video-pro-fast-t2va" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"query":"Dawn over the sea","aspect_ratio":"16:9","beautificator":"disabled","output_resolution":"hd","include_audio":true}}'
FieldReq.Values and limits
queryyesText up to 2048 characters.
aspect_rationo1:1, 16:9 or 9:16. Default 1:1.
beautificatornoenabled or disabled. Off by default: turn it on only if you need automatic prompt expansion.
output_resolutionnosd, hd or fhd. Default fhd.
include_audionotrue or false, default true. false turns off the generated sound track.

Result. MP4, 5 seconds, 24 fps. SD — 16:9 864×480, 9:16 480×864, 1:1 480×480. HD — 1280×720, 720×1280, 720×720. FHD — 1920×1080, 1080×1920, 1080×1080.

Kandinsky 6 Pro Fast I2VA

Image to video, sound and size settings

Animates an image. Describe the motion of the object or the camera in the prompt.

POST/v1/tasks/k6-video-pro-fast-i2va

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/k6-video-pro-fast-i2va" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"image":"<BASE64_IMAGE>","query":"The camera slowly moves closer","aspect_ratio":"9:16","beautificator":"disabled","output_resolution":"fhd","include_audio":false}}'
FieldReq.Values and limits
imageyesOne JPEG/PNG image in Base64, up to 4096×4096. Request body up to 100 MB.
queryyesText up to 2048 characters: motion of the object or the camera.
aspect_rationo1:1, 16:9 or 9:16. Default 1:1.
beautificatornoenabled or disabled. Off by default.
output_resolutionnosd, hd or fhd. Default fhd.
include_audionotrue or false, default true.

Result. MP4, 5 seconds, 24 fps. SD — 16:9 832×464, 9:16 464×832, 1:1 624×624. HD — 1536×864, 864×1536, 1152×1152. FHD — 1856×1056, 1056×1856, 1408×1408.

Kandinsky Video Super Res

Video upscaling

Increases the resolution of a finished video 2 or 4 times, or up to a chosen size.

POST/v1/tasks/kandinsky-video-sr-2

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/kandinsky-video-sr-2" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"video":"<BASE64_MP4>","resolution_scale":2,"include_audio":true}}'
FieldReq.Values and limits
videoyesOne MP4 in Base64, up to 100 MB, at least 256×256.
resolution_scaleno2 or 4, default 2. Used if target_resolution is not set.
target_resolutionnohd, fullhd or 2k. Sizes depend on the orientation of the input video.
include_audionotrue or false, default true. Keeps the original sound track; false removes it (no sound is generated).

Result. Video of the chosen size. HD — 1280×720 / 720×1280 / 720×720, Full HD — 1920×1080 / 1080×1920 / 1080×1080, 2K — 2560×1440 / 1440×2560 / 1440×1440. Input limits: at ×2 up to 1280×720 and 180 s, at ×4 up to 960×576 and 60 s.

Avatars

Kandinsky Avatar 1.0

Talking video avatar

Turns a portrait into a talking video. The avatar speaks a text or ready-made speech.

POST/v1/tasks/giga_avatar

curl -X POST "https://kandinskyapi.sberdevices.ru/v1/tasks/giga_avatar" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"censor":true,"params":{"image":"<BASE64_IMAGE>","query":"Hello! Let me tell you about our new product.","default_audio":"woman","repeat":false,"emotion":"happiness_subtle","output_resolution":"fhd"}}'
FieldReq.Values and limits
imageyesJPEG/PNG in Base64, a string or a list (the first one is used). Up to 25 MB per file, up to 2048 px on each side.
queryconditionalNon-empty text up to 1000 characters. Required when repeat: false, optional when repeat: true.
audioconditionalMP3/WAV in Base64. Required when repeat: true. When repeat: false it is a voice sample for synthesis and takes priority over default_audio. Trimmed after 60 seconds.
repeatnotrue or false, default false. true uses the speech you pass as is, without synthesis.
default_audioconditionalman or woman. A voice preset, used when repeat: false and there is no audio.
emotionnodefault, anger_subtle, happiness_subtle, sadness_subtle, anger_moderate, happiness_moderate, sadness_moderate. Default is default.
output_resolutionnosd, hd or fhd. Default fhd.
include_sd_videonotrue or false, default false. With FHD it can add an SD version to the ZIP.

Result. A video avatar. With repeat: true you need ready-made non-empty audio.

General

Limits

  • Images: JPEG or PNG in Base64, up to 4096×4096 (up to 2048 px per side for avatars).
  • Request body: up to 100 MB.
  • All results are downloaded through /result: PNG, MP4 or ZIP.

Access and limits

Tokens and limits are issued on request, and limits are set separately for each client. To get access, write to us.

Feedback

Questions about the API, access and limits — choose the most convenient way to reach us