Skip to main content
POST
https://app.pixy.art
/
api
/
v1
/
{designId}
/
generate
cURL
curl --request POST \
  --url https://app.pixy.art/api/v1/{designId}/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
import { Pixy } from '@pixy-art/sdk'

const pixy = new Pixy({
  apiKey: 'YOUR_API_KEY',
})

const image = await pixy.generate('YOUR_DESIGN_ID', [
  {
    id: 'TITLE_ID',
    text: 'Spring launch sale',
  },
])

console.log(image.files)
import requests

url = "https://app.pixy.art/api/v1/{designId}/generate"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.pixy.art/api/v1/{designId}/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([
    
  ]),
  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;
}
require 'uri'
require 'net/http'

url = URI("https://app.pixy.art/api/v1/{designId}/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 = "{}"

response = http.request(request)
puts response.read_body
{ "id": "run_123", "designId": "des_123", "duration": 842, "files": [ { "url": "https://assets.example.com/generated/design-output-1.png", "previewUrl": null, "size": 237993, "width": 1080, "height": 1920, "mimetype": "image/png" }, { "url": "https://assets.example.com/generated/design-output-2.png", "previewUrl": null, "size": 236102, "width": 1080, "height": 1920, "mimetype": "image/png" } ] }

Allowed Modifications

Review the Modifications guide for the full support matrix and example payloads.

Authorizations

Authorization
string
header
required

Organization API key passed as a bearer token.

Path Parameters

designId
string
required

Pixy design or template identifier.

Body

application/json
format
enum<string>
default:jpeg

Output format. Defaults to jpeg. jpg is also accepted and normalized to jpeg.

Available options:
png,
jpeg,
pdf
modifications
object[]

Optional object-level overrides applied before rendering.

Supported overrides are inferred from the current implementation: text replacement for text objects, fill/stroke color replacement for text, image, and SVG objects, and source image replacement for image objects.

Response

Successfully rendered one or more output files.

id
string
required

Render run identifier.

designId
string
required

Design identifier used for the render.

duration
integer
required

Total render duration in milliseconds.

files
object[]
required

Rendered output files, one per generated page. When format is pdf, each page is returned as a separate PDF file.