Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pixcraft.es/llms.txt

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

PixCraft API

The PixCraft API lets you integrate image-to-pattern conversion into any application. Whether you’re building an e-commerce platform, a crafting app, or an automation workflow, the API gives you access to the same engine that powers pixcraft.es.

What you can build

  • Material stores — Add a pattern configurator to your product pages so customers can visualize their projects before buying.
  • Crafting apps — Use PixCraft’s color-matching algorithm and pattern generation without building it from scratch.
  • Automations — Connect with Zapier, Make, or n8n to automatically generate patterns when orders arrive.

How it works

  1. Send an image (base64 or URL) to the API along with target dimensions and a niche (curtains, mosaics, LEGO, etc.)
  2. The API processes the image using perceptual color matching (CIE Lab Delta E)
  3. You receive a complete pattern: materials list, assembly guide, and optional PDF

Quick example

curl -X POST https://www.pixcraft.es/api/v1/generate \
  -H "Authorization: Bearer px_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/photo.jpg",
    "niche": "curtains",
    "width_cm": 200,
    "height_cm": 250,
    "max_colors": 8
  }'
Response:
{
  "success": true,
  "niche": "curtains",
  "dimensions": {
    "width_cm": 200,
    "height_cm": 250,
    "cols": 133,
    "rows": 125,
    "total_units": 16625
  },
  "materials": [
    {
      "color_id": "blanco",
      "color_name": "Blanco",
      "hex": "#FFFFFF",
      "quantity": 10804,
      "percentage": 81.2
    }
  ],
  "assembly_guide": [...],
  "usage": {
    "calls_used": 244,
    "calls_remaining": 4756
  }
}

Supported niches

The API dynamically supports all niches configured in PixCraft. Currently available:
IDNameUnitDefault size
curtainsCortinaseslabon1.5 × 2.0 cm
mosaicsMosaicostesela2.0 × 2.0 cm
crossstitchPunto de cruzpunto0.3 × 0.3 cm
legoLEGOstud0.8 × 0.8 cm
diamondDiamond Paintingdiamante0.25 × 0.25 cm
embroideryBordadopuntada0.4 × 0.4 cm
rugsAlfombrasnudo0.6 × 0.6 cm
hamaHama Beadscuenta0.5 × 0.5 cm
crochetCrochet tapizpunto0.5 × 0.6 cm
paintnumbersPintura por númeroszona1.0 × 1.0 cm
minecraftMinecraft Pixel Artbloque1.0 × 1.0 cm
bottlecapsTapones de botellatapón3.2 × 3.2 cm
knittingTricotpunto0.4 × 0.6 cm
latchhookLatch Hookhebra1.0 × 1.0 cm
stainedglassVitralpieza2.0 × 2.0 cm
needlepointBordado en cañamazopunto0.35 × 0.35 cm
macrameMacraménudo0.8 × 0.8 cm
robloxRoblox Pixel Artbloque1.0 × 1.0 cm
quillingQuillingtira0.5 × 0.5 cm
weavingTejido en telarpasada0.3 × 0.4 cm
petitpointPetit Pointpunto0.15 × 0.15 cm
When new niches are added to PixCraft, they automatically become available in the API — call GET /api/v1/capabilities to see the current list.

Next steps

Quickstart

Get your API key and make your first request in under 5 minutes.

API Reference

Full documentation for every endpoint.