API v1.4.2 [STABLE]
OpenAPI Spec

Pure Automation.

Seamlessly integrate industrial-grade AI pattern generation into your textile production pipeline. Our REST API handles the heavy compute, providing print-safe assets at scale.

Authentication

All API requests require a Bearer Token. Enter your key in the Authorization header.

Authorization: Bearer sk_live_51M_...

Rate Limits

We utilize a dynamic token-bucket algorithm to ensure fair access. Enterprise tiers enjoy significantly higher burst capacities and dedicated compute lanes.

Standard Tier
60 RPM
Shared GPU Cluster
Enterprise Tier
1000+ RPM
Dedicated NVIDIA H100 Instance

Error Codes

CodeDescription
401Invalid or missing API key.
402Insufficient credits in account.
429Rate limit exceeded. Slow down your requests.
500Engine synchronization failure. Transactions are automatically refunded.

Generate Pattern

POST /api/generate

Deploy the **Neural Core v4** specifically tuned for textile geometries. Direct prompt-to-tile support.

Parameters

  • prompt: [string] Descriptive design query (min 3 chars).
  • compositionType: [enum] "single" | "tile" (repeating).
  • colorPalette: [array] List of HEX/HSL targets.
{
  "prompt": "traditional damask, silk texture",
  "aspectRatio": "1:1",
  "density": "high",
  "compositionType": "tile",
  "output_format": "png"
}

Vectorize

POST /api/vectorize

Industrial raster-to-SVG conversion. Zero-stroke commitment for cleaner CAM/CAD parsing.

curl -X POST /api/vectorize \
  -H "Authorization: Bearer sk_..." \
  -F "[email protected]" \
  -F "quality=high" \
  -F "config={"iterMax":20}"

Upscale 16x

POST /api/upscale
Response Object
{
  "url": "https://cdn.sapphire.com/res_..."
  "width": 16384,
  "height": 16384,
  "processingTimeMs": 12450
}

Need dedicated compute?

Large-scale manufacturers can request dedicated GPU instances for guaranteed latency and private security models.

Contact Engineering