API reference
Print Resize
rebuild an image for an exact print size in centimetres. Rectangle, square, and round take any size from 10 to 240 cm; oval placemats come in 19 fixed industry shapes.
/api/refitParameters
| Parameter | Values | Notes |
|---|---|---|
| imageUrl / image | URL or image file | JPG, PNG, WebP. Required. Uploaded files up to 20 MB. |
| widthCm, heightCm | 10 – 240 each | Required, both fields always. For square/round pass the same value twice. |
| shape | rect · square · round · oval | Default rect. Oval takes maskId below. |
| maskId | see oval mask list | Required when shape=oval (19 fixed placemat shapes); width/height come from the mask. |
| quality | standard · enhanced | Default standard. Affects detail and price. |
| padEdge | extend · solid | Default solid. When the target ratio has no exact fit: extend the pattern into the added edges, or keep them a solid color. |
| prompt | free text, 500 chars | Optional constraints, e.g. "keep the printed text exactly as it is". |
Response
{
"success": true,
"taskId": "f4a2e6c1-...",
"credits": 6
}Poll the task, then download. A failed run refunds the credits automatically.
Shapes
rect takes any width and height from 10 to 240 cm.square and round also take widthCm and heightCm — pass the same value in both (the diameter for round). oval placemats are fixed industry shapes — pass the maskId of one of the 19 presets (105 × 65 up to 180 × 100 cm, straight edge between the arcs); the size comes from the mask.
Rejected submissions return 400 size_out_of_range (outside 10–240 cm) or 400 too_far (source resolution too low to reach the target print size).
When the ratio has no exact fit
padEdge: extend to continue the pattern into the added edges, or padEdge: solid to keep them a plain ground color. The website’s workbench estimates the resulting DPI before you commit; through the API you read dpi from the task after it completes.Quality
standard suits most prints (typically 6–9 credits for a full rebuild). enhanced puts more detail back into the rebuild and costs more — the exact number is always in the response before any work starts.
