From an image to a cut file,
with the real numbers.

This walk runs what a print shop actually buys — background removal, a cut line in millimetres, and a DXF a plotter opens — in one call. Every request and response here was captured from the running system and is re-executed on every test run: this page cannot drift from the API.

  1. The input: a sticker with its own transparency

    A logo, line art, text, a sticker — a PNG with a transparent background and a margin, the way a customer sends it. That is what this chain is built for. A photograph will go through, but comes out posterised; this walk is for flat artwork.

  2. A quote before you pay

    The whole chain is priced up front — three steps in one charge, with a bundle discount. The figures here are pulled live from /api/pricing, never typed into the page.

    … creditsEstimate for the chain
    …bundle discount versus three separate calls
  3. One call

    /v1/pipeline takes the file and the list of steps. Every step goes through the engine registry; the estimate, the cap and the charge come from the whole chain, not the first step. The Idempotency-Key is what stops a double charge when the network drops after the server has received the job.

    curl -X POST http://localhost:8080/v1/pipeline \
      -H "Authorization: Bearer $VECTORFY_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -F file=@sticker.png \
      -F 'steps=@steps.json'
    [
      {
        "operation": "cutout",
        "params": {
          "feather_px": 0
        }
      },
      {
        "operation": "cutline",
        "params": {
          "output": "svg"
        }
      },
      {
        "operation": "export",
        "params": {
          "output": "dxf"
        }
      }
    ]
  4. A 202, then the result

    The reply comes back at once with an id and an estimate; you poll the job. When it finishes, credits_charged equals estimated_credits — what was quoted is what was charged. A job that fails is not charged at all.

    … creditsEstimate for the chain
  5. What certifies the cut before vinyl

    Do not read only the status. cut_mm is the sticker and physical_mm the output page. page_expanded says the page grew to preserve edge bleed, page_padding_mm is [left, top, right, bottom], and artwork_box_mm locates the upload. clipped_at_edge is a defensive failure flag, true only if a contour escaped even that page; mask_source says where the mask came from.

    {
      "id": "job_…",
      "status": "succeeded",
      "operation": "pipeline",
      "engine": "pipeline-runner",
      "estimated_credits": "…",
      "credits_charged": "…",
      "result": {
        "url": "https://<your-host>/files/out/…/output.dxf?sig=…",
        "bytes": 4695
      },
      "diagnostics": {
        "steps": [
          {
            "operation": "cutout",
            "diagnostics": {
              "method": "existing-alpha",
              "model_ran": false
            }
          },
          {
            "operation": "cutline",
            "diagnostics": {
              "mask_source": "alpha",
              "cut_mm": [
                50.3,
                36.76
              ],
              "physical_mm": [
                59.3,
                42.3
              ],
              "page_expanded": false,
              "page_padding_mm": [
                0.0,
                0.0,
                0.0,
                0.0
              ],
              "artwork_box_mm": [
                0.0,
                0.0,
                59.267,
                42.333
              ],
              "cut_contour_deviation_mm": 0.0393,
              "clipped_at_edge": false
            }
          },
          {
            "operation": "export",
            "diagnostics": {
              "cut_mm": [
                50.29,
                36.74
              ],
              "physical_mm": [
                59.27,
                42.33
              ]
            }
          }
        ]
      }
    }
    {
      "cutout": [
        "method",
        "model_ran"
      ],
      "cutline": [
        "mask_source",
        "cut_mm",
        "physical_mm",
        "page_expanded",
        "page_padding_mm",
        "artwork_box_mm",
        "cut_contour_deviation_mm",
        "clipped_at_edge"
      ],
      "export": [
        "cut_mm",
        "physical_mm"
      ]
    }
  6. The DXF: millimetres, and one closed path

    The file declares $INSUNITS=4 — millimetres — because an R12 with no units is a file a sign package assumes is in inches, and a 50 mm sticker imports at 1,270. Open it in CutStudio, SignCut or FlexiSign and measure it with a ruler before cutting vinyl. A test in code is not a machine cutting.

  7. Who did the work — and what you must pass on

    The top-level engine is the catalogue row that was billed — not a claim that a model ran. The truth is in diagnostics.model_ran: a file that arrives with its own mask does not run the segmentation model, and the response says so. When a trained model did run, diagnostics.model names it and the licence disclosure rides in warnings — a reseller must pass it on to their customer.

  8. The money, in order

    Quote → estimate in the 202 → charge on completion, and all three are the same number. Credits never expire. The mixed-design gang sheet (gangsheet-nest) carries an introductory price that is not yet final — every other figure on this page is the live price.

From here