Skip to main content
POST
/
api
/
v1
/
facade
/
generate
Generate a design (the canonical entry point)
curl --request POST \
  --url https://api.kynva.ai/api/v1/facade/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "spec_type": "renderforge_request",
  "spec_version": "1.0",
  "intent": {
    "identity": {
      "request_id": "<string>",
      "brand_id": "<string>"
    },
    "content": {
      "spec_type": "content",
      "spec_version": "1.0",
      "headline": "<string>",
      "subhead": "<string>",
      "body": "<string>",
      "cta": "<string>",
      "points": [
        "<string>"
      ]
    },
    "brand_kit": {},
    "style_brief": {
      "spec_type": "style_brief",
      "spec_version": "1.0",
      "tone": [
        "<string>"
      ],
      "design_preset": {
        "preset_id": "<string>"
      }
    },
    "export_intent": {
      "spec_type": "export_intent",
      "spec_version": "1.0",
      "primary": {
        "platform": "instagram",
        "format": "png",
        "profile_id": "ig_square_1x1"
      },
      "transparent_background": true
    },
    "assets": {}
  },
  "execution": {
    "seed": 123,
    "quality_floor": 50
  },
  "debug": {
    "include_decision_trace": true,
    "include_html": true
  }
}
'
import requests

url = "https://api.kynva.ai/api/v1/facade/generate"

payload = {
"spec_type": "renderforge_request",
"spec_version": "1.0",
"intent": {
"identity": {
"request_id": "<string>",
"brand_id": "<string>"
},
"content": {
"spec_type": "content",
"spec_version": "1.0",
"headline": "<string>",
"subhead": "<string>",
"body": "<string>",
"cta": "<string>",
"points": ["<string>"]
},
"brand_kit": {},
"style_brief": {
"spec_type": "style_brief",
"spec_version": "1.0",
"tone": ["<string>"],
"design_preset": { "preset_id": "<string>" }
},
"export_intent": {
"spec_type": "export_intent",
"spec_version": "1.0",
"primary": {
"platform": "instagram",
"format": "png",
"profile_id": "ig_square_1x1"
},
"transparent_background": True
},
"assets": {}
},
"execution": {
"seed": 123,
"quality_floor": 50
},
"debug": {
"include_decision_trace": True,
"include_html": True
}
}
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({
spec_type: 'renderforge_request',
spec_version: '1.0',
intent: {
identity: {request_id: '<string>', brand_id: '<string>'},
content: {
spec_type: 'content',
spec_version: '1.0',
headline: '<string>',
subhead: '<string>',
body: JSON.stringify('<string>'),
cta: '<string>',
points: ['<string>']
},
brand_kit: {},
style_brief: {
spec_type: 'style_brief',
spec_version: '1.0',
tone: ['<string>'],
design_preset: {preset_id: '<string>'}
},
export_intent: {
spec_type: 'export_intent',
spec_version: '1.0',
primary: {platform: 'instagram', format: 'png', profile_id: 'ig_square_1x1'},
transparent_background: true
},
assets: {}
},
execution: {seed: 123, quality_floor: 50},
debug: {include_decision_trace: true, include_html: true}
})
};

fetch('https://api.kynva.ai/api/v1/facade/generate', 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/facade/generate",
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([
'spec_type' => 'renderforge_request',
'spec_version' => '1.0',
'intent' => [
'identity' => [
'request_id' => '<string>',
'brand_id' => '<string>'
],
'content' => [
'spec_type' => 'content',
'spec_version' => '1.0',
'headline' => '<string>',
'subhead' => '<string>',
'body' => '<string>',
'cta' => '<string>',
'points' => [
'<string>'
]
],
'brand_kit' => [

],
'style_brief' => [
'spec_type' => 'style_brief',
'spec_version' => '1.0',
'tone' => [
'<string>'
],
'design_preset' => [
'preset_id' => '<string>'
]
],
'export_intent' => [
'spec_type' => 'export_intent',
'spec_version' => '1.0',
'primary' => [
'platform' => 'instagram',
'format' => 'png',
'profile_id' => 'ig_square_1x1'
],
'transparent_background' => true
],
'assets' => [

]
],
'execution' => [
'seed' => 123,
'quality_floor' => 50
],
'debug' => [
'include_decision_trace' => true,
'include_html' => true
]
]),
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/facade/generate"

payload := strings.NewReader("{\n \"spec_type\": \"renderforge_request\",\n \"spec_version\": \"1.0\",\n \"intent\": {\n \"identity\": {\n \"request_id\": \"<string>\",\n \"brand_id\": \"<string>\"\n },\n \"content\": {\n \"spec_type\": \"content\",\n \"spec_version\": \"1.0\",\n \"headline\": \"<string>\",\n \"subhead\": \"<string>\",\n \"body\": \"<string>\",\n \"cta\": \"<string>\",\n \"points\": [\n \"<string>\"\n ]\n },\n \"brand_kit\": {},\n \"style_brief\": {\n \"spec_type\": \"style_brief\",\n \"spec_version\": \"1.0\",\n \"tone\": [\n \"<string>\"\n ],\n \"design_preset\": {\n \"preset_id\": \"<string>\"\n }\n },\n \"export_intent\": {\n \"spec_type\": \"export_intent\",\n \"spec_version\": \"1.0\",\n \"primary\": {\n \"platform\": \"instagram\",\n \"format\": \"png\",\n \"profile_id\": \"ig_square_1x1\"\n },\n \"transparent_background\": true\n },\n \"assets\": {}\n },\n \"execution\": {\n \"seed\": 123,\n \"quality_floor\": 50\n },\n \"debug\": {\n \"include_decision_trace\": true,\n \"include_html\": true\n }\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/facade/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"spec_type\": \"renderforge_request\",\n \"spec_version\": \"1.0\",\n \"intent\": {\n \"identity\": {\n \"request_id\": \"<string>\",\n \"brand_id\": \"<string>\"\n },\n \"content\": {\n \"spec_type\": \"content\",\n \"spec_version\": \"1.0\",\n \"headline\": \"<string>\",\n \"subhead\": \"<string>\",\n \"body\": \"<string>\",\n \"cta\": \"<string>\",\n \"points\": [\n \"<string>\"\n ]\n },\n \"brand_kit\": {},\n \"style_brief\": {\n \"spec_type\": \"style_brief\",\n \"spec_version\": \"1.0\",\n \"tone\": [\n \"<string>\"\n ],\n \"design_preset\": {\n \"preset_id\": \"<string>\"\n }\n },\n \"export_intent\": {\n \"spec_type\": \"export_intent\",\n \"spec_version\": \"1.0\",\n \"primary\": {\n \"platform\": \"instagram\",\n \"format\": \"png\",\n \"profile_id\": \"ig_square_1x1\"\n },\n \"transparent_background\": true\n },\n \"assets\": {}\n },\n \"execution\": {\n \"seed\": 123,\n \"quality_floor\": 50\n },\n \"debug\": {\n \"include_decision_trace\": true,\n \"include_html\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.kynva.ai/api/v1/facade/generate")

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 \"spec_type\": \"renderforge_request\",\n \"spec_version\": \"1.0\",\n \"intent\": {\n \"identity\": {\n \"request_id\": \"<string>\",\n \"brand_id\": \"<string>\"\n },\n \"content\": {\n \"spec_type\": \"content\",\n \"spec_version\": \"1.0\",\n \"headline\": \"<string>\",\n \"subhead\": \"<string>\",\n \"body\": \"<string>\",\n \"cta\": \"<string>\",\n \"points\": [\n \"<string>\"\n ]\n },\n \"brand_kit\": {},\n \"style_brief\": {\n \"spec_type\": \"style_brief\",\n \"spec_version\": \"1.0\",\n \"tone\": [\n \"<string>\"\n ],\n \"design_preset\": {\n \"preset_id\": \"<string>\"\n }\n },\n \"export_intent\": {\n \"spec_type\": \"export_intent\",\n \"spec_version\": \"1.0\",\n \"primary\": {\n \"platform\": \"instagram\",\n \"format\": \"png\",\n \"profile_id\": \"ig_square_1x1\"\n },\n \"transparent_background\": true\n },\n \"assets\": {}\n },\n \"execution\": {\n \"seed\": 123,\n \"quality_floor\": 50\n },\n \"debug\": {\n \"include_decision_trace\": true,\n \"include_html\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "spec_type": "renderforge_response",
  "design_id": "<string>",
  "outputs": [
    {
      "profile_id": "<string>",
      "format": "<string>",
      "platform": "<string>",
      "url": "<string>",
      "mime": "<string>",
      "width": 123,
      "height": 123
    }
  ],
  "warnings": [
    "<string>"
  ],
  "cost": {}
}
{
"job": {
"job_id": "job-9f3c2a1e-77b4-4d2c-9a1b-0c8d7e6f5a4b",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z"
}
}

Authorizations

Authorization
string
header
required

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

Body

application/json
spec_type
enum<string>
required
Available options:
renderforge_request
spec_version
enum<string>
required
Available options:
1.0
operation
enum<string>
required

preview = sync (200), render = async job (202)

Available options:
preview,
render
generation_type
enum<string>
required

video requires the video pipeline to be enabled

Available options:
image,
carousel,
video,
gif
intent
object
required
execution
object
required
debug
object

Response

Sync preview result (operation = preview)

spec_type
enum<string>
Available options:
renderforge_response
status
enum<string>
Available options:
ok,
error
design_id
string
outputs
object[]
warnings
string[]
cost
object

Credits charged + remaining balance