Skip to main content
POST
/
api
/
v1
/
animations
/
slideshow
Create slideshow
curl --request POST \
  --url https://api.kynva.ai/api/v1/animations/slideshow \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "frames": [
    {
      "templateId": "<string>",
      "duration": 5050,
      "modifications": "<array>",
      "stylePreset": "<string>"
    }
  ],
  "transition": "none",
  "transitionDuration": 1050,
  "fps": 10,
  "loop": true,
  "loopConfig": {
    "count": 1,
    "transitionFrames": 2,
    "holdTime": 1
  },
  "format": "gif",
  "width": 1074,
  "height": 1074
}
'
import requests

url = "https://api.kynva.ai/api/v1/animations/slideshow"

payload = {
"frames": [
{
"templateId": "<string>",
"duration": 5050,
"modifications": "<array>",
"stylePreset": "<string>"
}
],
"transition": "none",
"transitionDuration": 1050,
"fps": 10,
"loop": True,
"loopConfig": {
"count": 1,
"transitionFrames": 2,
"holdTime": 1
},
"format": "gif",
"width": 1074,
"height": 1074
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
frames: [
{
templateId: '<string>',
duration: 5050,
modifications: '<array>',
stylePreset: '<string>'
}
],
transition: 'none',
transitionDuration: 1050,
fps: 10,
loop: true,
loopConfig: {count: 1, transitionFrames: 2, holdTime: 1},
format: 'gif',
width: 1074,
height: 1074
})
};

fetch('https://api.kynva.ai/api/v1/animations/slideshow', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kynva.ai/api/v1/animations/slideshow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'frames' => [
[
'templateId' => '<string>',
'duration' => 5050,
'modifications' => '<array>',
'stylePreset' => '<string>'
]
],
'transition' => 'none',
'transitionDuration' => 1050,
'fps' => 10,
'loop' => true,
'loopConfig' => [
'count' => 1,
'transitionFrames' => 2,
'holdTime' => 1
],
'format' => 'gif',
'width' => 1074,
'height' => 1074
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.kynva.ai/api/v1/animations/slideshow"

payload := strings.NewReader("{\n \"frames\": [\n {\n \"templateId\": \"<string>\",\n \"duration\": 5050,\n \"modifications\": \"<array>\",\n \"stylePreset\": \"<string>\"\n }\n ],\n \"transition\": \"none\",\n \"transitionDuration\": 1050,\n \"fps\": 10,\n \"loop\": true,\n \"loopConfig\": {\n \"count\": 1,\n \"transitionFrames\": 2,\n \"holdTime\": 1\n },\n \"format\": \"gif\",\n \"width\": 1074,\n \"height\": 1074\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.kynva.ai/api/v1/animations/slideshow")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"frames\": [\n {\n \"templateId\": \"<string>\",\n \"duration\": 5050,\n \"modifications\": \"<array>\",\n \"stylePreset\": \"<string>\"\n }\n ],\n \"transition\": \"none\",\n \"transitionDuration\": 1050,\n \"fps\": 10,\n \"loop\": true,\n \"loopConfig\": {\n \"count\": 1,\n \"transitionFrames\": 2,\n \"holdTime\": 1\n },\n \"format\": \"gif\",\n \"width\": 1074,\n \"height\": 1074\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.kynva.ai/api/v1/animations/slideshow")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"frames\": [\n {\n \"templateId\": \"<string>\",\n \"duration\": 5050,\n \"modifications\": \"<array>\",\n \"stylePreset\": \"<string>\"\n }\n ],\n \"transition\": \"none\",\n \"transitionDuration\": 1050,\n \"fps\": 10,\n \"loop\": true,\n \"loopConfig\": {\n \"count\": 1,\n \"transitionFrames\": 2,\n \"holdTime\": 1\n },\n \"format\": \"gif\",\n \"width\": 1074,\n \"height\": 1074\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "url": "<string>",
    "width": 123,
    "height": 123,
    "duration": 123,
    "frameCount": 123,
    "format": "<string>",
    "transition": "<string>",
    "loopType": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Your Kynva API key (kyn_live_xxx or kyn_test_xxx; legacy rf_ keys remain valid)

Body

application/json
frames
object[]
required
Required array length: 1 - 20 elements
transition
enum<string>
default:none

34 transition types available. Use GET /api/v1/capabilities/transitions for details.

Available options:
none,
fade,
dissolve,
crossfade,
slideLeft,
slideRight,
slideUp,
slideDown,
push,
reveal,
cover,
zoomIn,
zoomOut,
zoomThrough,
morph,
glitchCut,
inkBleed,
shatter,
liquidWipe,
pageTurn,
splitReveal,
particleDissolve,
lightLeak,
whipPan,
iris,
irisOut,
pixelate,
ripple,
wipeLeft,
wipeRight,
wipeUp,
wipeDown,
clock,
blinds
transitionDuration
number

Transition duration in ms. If not specified, uses recommended duration for the transition type.

Required range: 100 <= x <= 2000
fps
number
default:10
Required range: 5 <= x <= 30
loop
default:true

Loop mode. Boolean for simple loop, or string for advanced loop types. Use GET /api/v1/capabilities/loops for details.

loopConfig
object

Advanced loop configuration

format
enum<string>
default:gif
Available options:
gif,
mp4
width
number
Required range: 100 <= x <= 2048
height
number
Required range: 100 <= x <= 2048

Response

200 - application/json

Animation generated successfully

Animation generated successfully

success
boolean
data
object