Generate a video that transitions between two frames
curl --request POST \
--url https://app.dafty.ai/api/v1/videos/frames \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"startImage": "5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e",
"endImage": "4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54",
"prompt": "Smooth dolly from the wide shot to the close-up",
"duration": 6,
"aspectRatio": "16:9",
"resolution": "720p"
}
'import requests
url = "https://app.dafty.ai/api/v1/videos/frames"
payload = {
"startImage": "5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e",
"endImage": "4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54",
"prompt": "Smooth dolly from the wide shot to the close-up",
"duration": 6,
"aspectRatio": "16:9",
"resolution": "720p"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startImage: '5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e',
endImage: '4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54',
prompt: 'Smooth dolly from the wide shot to the close-up',
duration: 6,
aspectRatio: '16:9',
resolution: '720p'
})
};
fetch('https://app.dafty.ai/api/v1/videos/frames', 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://app.dafty.ai/api/v1/videos/frames",
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([
'startImage' => '5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e',
'endImage' => '4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54',
'prompt' => 'Smooth dolly from the wide shot to the close-up',
'duration' => 6,
'aspectRatio' => '16:9',
'resolution' => '720p'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.dafty.ai/api/v1/videos/frames"
payload := strings.NewReader("{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.dafty.ai/api/v1/videos/frames")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dafty.ai/api/v1/videos/frames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3f9a4c2e-7b1d-4e8a-9c3f-2a1b0c9d8e7f",
"type": "image.generate",
"status": "pending",
"createdAt": "2026-06-16T10:00:00.000Z"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Videos
Generate a video that transitions between two frames
A planned start→end motion. Both startImage and endImage are required. Slower and pricier than image-to-video; use it when you have both ends of the shot.
POST
/
videos
/
frames
Generate a video that transitions between two frames
curl --request POST \
--url https://app.dafty.ai/api/v1/videos/frames \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"startImage": "5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e",
"endImage": "4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54",
"prompt": "Smooth dolly from the wide shot to the close-up",
"duration": 6,
"aspectRatio": "16:9",
"resolution": "720p"
}
'import requests
url = "https://app.dafty.ai/api/v1/videos/frames"
payload = {
"startImage": "5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e",
"endImage": "4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54",
"prompt": "Smooth dolly from the wide shot to the close-up",
"duration": 6,
"aspectRatio": "16:9",
"resolution": "720p"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startImage: '5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e',
endImage: '4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54',
prompt: 'Smooth dolly from the wide shot to the close-up',
duration: 6,
aspectRatio: '16:9',
resolution: '720p'
})
};
fetch('https://app.dafty.ai/api/v1/videos/frames', 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://app.dafty.ai/api/v1/videos/frames",
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([
'startImage' => '5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e',
'endImage' => '4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54',
'prompt' => 'Smooth dolly from the wide shot to the close-up',
'duration' => 6,
'aspectRatio' => '16:9',
'resolution' => '720p'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.dafty.ai/api/v1/videos/frames"
payload := strings.NewReader("{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.dafty.ai/api/v1/videos/frames")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dafty.ai/api/v1/videos/frames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startImage\": \"5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e\",\n \"endImage\": \"4d9c2b1a-7e6f-4a8b-9c2d-1f0e8a7b6c54\",\n \"prompt\": \"Smooth dolly from the wide shot to the close-up\",\n \"duration\": 6,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3f9a4c2e-7b1d-4e8a-9c3f-2a1b0c9d8e7f",
"type": "image.generate",
"status": "pending",
"createdAt": "2026-06-16T10:00:00.000Z"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Authorizations
apiKeybearerAuth
Headers
Optional unique key (≤255 chars) that makes this create idempotent: a retry with the same key returns the original job rather than starting a new one. Scoped to your API key; retained ~24h.
Maximum string length:
255Body
application/json
The first frame of the clip.
Required string length:
1 - 2048The last frame the clip transitions to.
Required string length:
1 - 2048Describe the motion between the two frames. Up to 2000 characters.
Required string length:
1 - 2000Clip length in seconds (4-15).
Required range:
4 <= x <= 15Output resolution. 720p costs more credits than 480p.
Available options:
480p, 720p Aspect ratio of the output video. 'auto' matches the start frame.
Available options:
16:9, 9:16, 4:3, 3:4, 1:1, 21:9, auto Generate audio for the clip.
Describe what to avoid in the generation.
Maximum string length:
1000Response
Accepted
Show child attributes
Show child attributes
⌘I

