Create images (batch)
curl --request POST \
--url https://api.kynva.ai/api/v1/images/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobs": [
{
"templateId": "<string>",
"modifications": "<array>",
"metadata": {}
}
],
"format": "webp",
"scale": 2
}
'import requests
url = "https://api.kynva.ai/api/v1/images/batch"
payload = {
"jobs": [
{
"templateId": "<string>",
"modifications": "<array>",
"metadata": {}
}
],
"format": "webp",
"scale": 2
}
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({
jobs: [{templateId: '<string>', modifications: '<array>', metadata: {}}],
format: 'webp',
scale: 2
})
};
fetch('https://api.kynva.ai/api/v1/images/batch', 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/images/batch",
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([
'jobs' => [
[
'templateId' => '<string>',
'modifications' => '<array>',
'metadata' => [
]
]
],
'format' => 'webp',
'scale' => 2
]),
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/images/batch"
payload := strings.NewReader("{\n \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\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/images/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kynva.ai/api/v1/images/batch")
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 \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"batchId": "<string>",
"totalJobs": 123,
"completed": 123,
"failed": 123,
"totalRenderTime": 123,
"results": [
{
"index": 123,
"success": true,
"id": "<string>",
"imageUrl": "<string>",
"width": 123,
"height": 123,
"renderTime": 123,
"error": "<string>"
}
]
}
}Images
Create images (batch)
Render multiple images in a single request. Batch size limit depends on your tier: FREE=10, STARTER=50, PRO=100, ENTERPRISE=500.
POST
/
api
/
v1
/
images
/
batch
Create images (batch)
curl --request POST \
--url https://api.kynva.ai/api/v1/images/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobs": [
{
"templateId": "<string>",
"modifications": "<array>",
"metadata": {}
}
],
"format": "webp",
"scale": 2
}
'import requests
url = "https://api.kynva.ai/api/v1/images/batch"
payload = {
"jobs": [
{
"templateId": "<string>",
"modifications": "<array>",
"metadata": {}
}
],
"format": "webp",
"scale": 2
}
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({
jobs: [{templateId: '<string>', modifications: '<array>', metadata: {}}],
format: 'webp',
scale: 2
})
};
fetch('https://api.kynva.ai/api/v1/images/batch', 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/images/batch",
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([
'jobs' => [
[
'templateId' => '<string>',
'modifications' => '<array>',
'metadata' => [
]
]
],
'format' => 'webp',
'scale' => 2
]),
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/images/batch"
payload := strings.NewReader("{\n \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\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/images/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kynva.ai/api/v1/images/batch")
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 \"jobs\": [\n {\n \"templateId\": \"<string>\",\n \"modifications\": \"<array>\",\n \"metadata\": {}\n }\n ],\n \"format\": \"webp\",\n \"scale\": 2\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"batchId": "<string>",
"totalJobs": 123,
"completed": 123,
"failed": 123,
"totalRenderTime": 123,
"results": [
{
"index": 123,
"success": true,
"id": "<string>",
"imageUrl": "<string>",
"width": 123,
"height": 123,
"renderTime": 123,
"error": "<string>"
}
]
}
}Authorizations
Your Kynva API key (kyn_live_xxx or kyn_test_xxx; legacy rf_ keys remain valid)
Body
application/json
Array of render jobs (limit depends on tier: FREE=10, STARTER=50, PRO=100, ENTERPRISE=500)
Minimum array length:
1Show child attributes
Show child attributes
Output format for all images
Available options:
png, jpg, webp Resolution multiplier
Required range:
1 <= x <= 3⌘I