Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pixy.art/llms.txt

Use this file to discover all available pages before exploring further.

What You Need

Before you send a generate request, you need:
  1. An Automation key
  2. A design id
  3. One or more element id values for the parts you want to change

Get An Automation Key

Create or copy an Automation key from your Pixy API settings. Get Automation key

Install The SDK

If you prefer a wrapper instead of writing raw fetch requests, install the official npm package:
npm install @pixy-art/sdk

Search Public Templates

Use the public templates endpoint when you need a template designId to start from. Supported query parameters:
  • search filters templates by name or keyword
  • page is a zero-based page index
  • perPage controls how many templates are returned, up to 100
  • promoted optionally filters promoted templates
  • orderBy optionally controls ordering. Use oldest for oldest created templates first. Omit it for latest updated templates first.
import { Pixy } from '@pixy-art/sdk'

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

const templates = await pixy.templates.list({
  search: 'plane',
  page: 0,
  perPage: 24,
  orderBy: 'oldest',
})

console.log(templates.data)
The response includes data, total, page, perPage, and search. Each template includes its id, name, thumbnail, category, size, orientation, fonts, and supported export formats. Use a returned template id as the designId for generation, or open it in the Embed editor with openAsCopy: true.

Duplicate a Design

Use the duplicate endpoint when you need a separate editable copy of a design. The response returns a new id; saving or editing that copy will not change the source design. If the source design was created through Embed with a userId, the copied design keeps the same association.
cURL
curl -X POST "https://app.pixy.art/api/v1/YOUR_DESIGN_ID/duplicate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Copy for campaign B"
  }'

Find Design ID

Open the design or template in Pixy, then use the Copy design id action in the editor. Design ID placeholder

Find Element IDs

Once the design is open in the editor, select the element you want to modify and use Copy element id. Typical targets include:
Use these when you want to change text content, fill color, or stroke color.Text element placeholder
Use these when you want to swap the source image, or change stroke color.Image element placeholder
Use these when you want to change fill or stroke color.Shape element placeholder

Send Your First Request

Use your authenticated Automation key to send modifications in the request body.
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',
  },
])
If the request succeeds, the response includes the render id, the designId, total duration, and generated files, with each file returning its URL, size, dimensions, mimetype, and an optional previewUrl for outputs such as PDFs.

Common Modification Patterns

const image = await pixy.generate('YOUR_DESIGN_ID', [
  { id: 'TITLE_ID', text: 'New season drop' },
  { id: 'IMAGE_ID', src: 'https://example.com/cover.jpg' },
  { id: 'ELEMENT_ID', fill: '#111827', stroke: '#ffffff' },
])

Supported Modifications

Review the full Modifications guide for the supported fields, examples, and combinations.