Generate Pattern
The core endpoint. Takes an image and target dimensions, and returns a complete pattern with materials list and assembly instructions.
Authentication
Bearer token. Example: Bearer px_live_your_key
Request body
Base64-encoded image data. Provide either image or image_url, not both.
URL of the image to process. Provide either image or image_url, not both.
Target niche ID. Use GET /api/v1/niches to see available options.
Target width in centimeters (10–1000).
Target height in centimeters (10–1000).
Width of each unit in cm. Defaults to the niche’s default.
Height of each unit in cm. Defaults to the niche’s default.
Maximum number of colors in the palette. If set, the palette is trimmed to this count.
Color catalog to use. Currently: "default" or "custom" (uses your API key’s custom colors).
Example request
Response
Response fields
Common errors