Skip to content

Lapas API · For developers and AI agents

Nesting as an API. Drawings in, cut-ready sheets out.

Send DXF, SVG or DWG drawings and the sheets you have in stock. Lapas packs the parts onto as few sheets as it can, checks every layout, and returns the placements with machine files: DXF, G-code, PLT, SVG or a PDF report. One HTTP request, from $0.05 a nest.

$5 of free nesting, no card · Test keys never charged · Only successful nests are billed

POST /v1/nests 200 · succeeded
curl https://app.lapas.io/v1/nests \
  -H "Authorization: Bearer $LAPAS_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "files":  [{ "name": "brackets.dxf",
                 "content_base64": "…", "unit": "mm" }],
    "items":  [{ "file": "brackets.dxf", "quantity": 30 }],
    "sheets": [{ "width_mm": 3000, "height_mm": 1500 }],
    "time_limit_seconds": 20,
    "wait_seconds": 30,
    "exports": [{ "format": "gcode",
                  "options": { "machine": "…" } }]
  }'
Response
{
  "status": "succeeded",
  "items_requested": 30, "items_placed": 30,
  "sheets": [{ "index": 0, "density_percent": 71.4,
               "placements": [ … ] }],
  "unplaced": [],
  "cost_cents": 11,
  "exports": [{ "format": "gcode",
                "download_url": "/v1/exports/export_…/content" }]
}

Who it is for

Put nesting inside the software your shop already runs

ERP, MES and shop software

Send the job straight from the system that already holds the order, and store the sheets, the parts that did not fit and the machine files against it. No retyping between screens.

Quoting tools and cut-to-order stores

Price on the sheets a job really needs, not on part area. Ask the request to wait and a quote-sized nest comes back finished in the same call.

Your own scripts

A folder of DXFs and a stock list is enough. Nest them overnight, get a PDF report and machine files for each job in the morning.

AI agents and assistants

Plain-text docs at /llms.txt, an OpenAPI 3.1 document and precise, machine-readable errors, so an assistant can write the integration or run the nest itself.

How it works

Three steps, one request

  1. 01

    Send drawings and stock

    DXF, SVG or DWG, inline in the request or uploaded once. Say how many of each part and which sheets you have: sizes, quantities, spacing, allowed rotations.

  2. 02

    Lapas nests and checks

    Lapas Core packs the parts onto as few sheets as it can in the search time you ask for, then checks the layout for overlaps and parts off the sheet. A layout that fails is never returned.

  3. 03

    Get sheets and files back

    Every placement, every part that did not fit and why, and the files you asked for: DXF, G-code for your machine, PLT, SVG or a PDF report. In the same call, or by webhook when it finishes.

Why Lapas

Fewer sheets, files you can cut

A plate saved is worth far more than the price of the nest that saved it. The API runs the same engine the app does, which you can check against other tools on our published benchmarks.

The same engine as the app

True-shape nesting, parts in holes, mixed sheet sizes, remnants first, kits kept together. Nothing is cut down for the API.

Layouts you can cut

Every layout is checked before it is returned. You are charged only for a nest that produced one.

Machine files included

G-code from built-in or your own machine posts, DXF with true arcs, PLT, SVG and the PDF report. Part of the nest price.

Never a silent guess

A drawing with no declared unit is refused until you confirm it, and every error names the exact field that caused it.

Built for integration

What your developer gets

One call per job
Drawings inline, exports requested up front, result in the response.
Instant mode
wait_seconds (up to 60): a finished nest comes back in the same call.
Signed webhooks
nest.succeeded, nest.failed, nest.canceled. HMAC-SHA256, retried for about 45 hours.
Free estimate
POST /v1/nests/estimate prices and validates a request without running it.
Test keys
The real engine and real files, never charged. Up to 100 parts and 30 s a nest.
Safe retries
Idempotency keys on every POST: a retried request is never run or charged twice.
Reproducible
Same drawings, settings, seed and engine version give the same layout.
Readable errors
Stable codes, the field at fault, and your own request log at GET /v1/logs.

Pricing

Pay per nest, from $0.05

Prepaid, in US dollars, on any Lapas account, separate from your app plan. You are charged only when a nest succeeds on a live key. Failed and cancelled nests, test keys and estimates cost nothing, and machine files are included.

price = $0.10 × each 30 s of search time + $0.01 × each 50 parts (minimum $0.05)

NestPrice
40 parts, 30 s$0.11
100 parts, 60 s$0.22
500 parts, 120 s$0.50
2,000 parts, 120 s$0.80

The price is quoted before the nest runs and depends on the search time you ask for, not the time used.

$5 free to start

About 45 typical nests, no card. Then top up:

  • Pay $25$25 of nesting
  • Pay $100$110 of nesting
  • Pay $500$600 of nesting

Or switch on automatic top-up, with a monthly ceiling you set.

For AI agents

Written for machines to read, too

Ask your AI assistant to connect Lapas to your system, or to nest a job for you. Everything it needs is published as plain text and a formal schema, and the API behaves the same way every time: one JSON request, stable error codes, and no step that needs a person.

Rules an agent should follow

  1. Base URL https://app.lapas.io/v1, header Authorization: Bearer lap_test_… while developing.
  2. JSON is snake_case, lengths are millimetres, money is integer cents (USD).
  3. One call per job: inline files, items that name a file, wait_seconds and exports.
  4. Send an Idempotency-Key on every POST; retry only 429 and 5xx.
  5. Compare items_placed with items_requested and read unplaced before calling a job done.
  6. Never assume a drawing's unit: pass unit explicitly.

Limits

What one nest can hold

Search time per nest 1–120 s (test keys up to 30 s)
Parts per nest up to 5,000 copies of up to 500 different parts (test keys 100 copies)
Drawing formats in DXF, SVG, DWG
Files out DXF, SVG, G-code, PLT, PDF report
File size 50 MB per upload, 36 MB of drawings inline in one request
Wait in the same call up to 60 s
Nests at once 1 running and 10 queued per account
Rate limits 600 reads and 60 writes a minute per key

Good to know

What it does not do

  • No ready-made ERP connector.

    Your software, or your developer, calls Lapas. Lapas writes nothing into your ERP, MES or CAM by itself.

  • It does not write your quote.

    It tells you the sheets, placements and utilization a job needs. Turning that into a price for your customer is yours to do.

  • Bigger jobs belong in the app.

    A nest through the API gets at most 120 s of search time and 5,000 parts.

  • Prepaid only.

    The API runs on a balance you top up by card, or automatically under a monthly ceiling you set. There is no invoicing on account terms.

Questions

Frequently asked

Do I need a paid Lapas plan to use the API?

No. Any Lapas account can create API keys, including a free one. API nests are paid from a separate prepaid balance, not from your plan, and every account starts with $5 of free nesting with no card.

What does a nest cost?

US$0.10 for every 30 seconds of search time you ask for, plus $0.01 for every 50 parts, and never less than $0.05. A 40-part nest at the default 30 seconds costs $0.11. You are charged only when a nest succeeds on a live key; failed and cancelled nests, test keys and estimates are free, and machine files are included.

Can I try it without paying?

Yes, two ways. Test keys run the real engine and return real files, up to 100 parts and 30 seconds a nest, and are never charged. And the $5 of free balance covers about 45 typical live nests.

Which files does it take and return?

In: DXF, SVG and DWG, sent inline in the nest request or uploaded first. Out: DXF, SVG, G-code for a built-in or your own machine post, PLT, and the PDF report.

How fast is it?

You choose the search time, from 1 to 120 seconds; a quote-sized job usually needs 10 to 20. With wait_seconds the finished nest comes back in the same call, about that search time plus a few seconds. Longer jobs run in the background and notify you by webhook.

Can an AI agent use it?

Yes. The docs are published as plain text for agents at app.lapas.io/llms.txt and llms-full.txt, with an OpenAPI 3.1 document at app.lapas.io/openapi/v1.json. The whole job is one JSON request, and every error names the field to fix.

How long are my files kept?

Uploaded drawings are kept for 7 days and export downloads for 24 hours. Finished nests appear in your account history like jobs from the app.

Nest your first job through the API today

Sign in or create a free Lapas account, create a test key, and send one request. It takes about five minutes.