{"uid":"cap_2c8hCelGyENVGHAi3AFJ8","slug":"writerslogic-carton-fit-3d-bin-packing-api-ecf244ed","name":"WritersLogic Carton Fit — 3D Bin Packing API","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/carton-fit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"boxes":{"type":"array","items":{"type":"object","required":["id","l","w","h"],"properties":{"h":{"type":"number","maximum":100000,"minimum":0.001,"description":"Inner height."},"l":{"type":"number","maximum":100000,"minimum":0.001,"description":"Inner length."},"w":{"type":"number","maximum":100000,"minimum":0.001,"description":"Inner width."},"id":{"type":"string","maxLength":64,"description":"Carton id (unique)."},"maxWeight":{"type":"number","maximum":1000000000,"minimum":0,"description":"Maximum content weight; requires every item to carry a weight."}}},"maxItems":20,"minItems":1,"description":"At most 20. Use inner dimensions."},"items":{"type":"array","items":{"type":"object","required":["id","l","w","h"],"properties":{"h":{"type":"number","maximum":100000,"minimum":0.001,"description":"Height (the vertical axis when thisSideUp)."},"l":{"type":"number","maximum":100000,"minimum":0.001,"description":"Length, at most 3 decimals."},"w":{"type":"number","maximum":100000,"minimum":0.001,"description":"Width."},"id":{"type":"string","maxLength":64,"description":"Item id (unique)."},"qty":{"type":"integer","maximum":50,"minimum":1,"description":"Copies of this item (default 1)."},"weight":{"type":"number","maximum":1000000000,"minimum":0,"description":"Weight in one unit shared with maxWeight."},"thisSideUp":{"type":"boolean","description":"Keep h vertical (only rotation about the vertical axis allowed)."}}},"maxItems":50,"minItems":1,"description":"At most 50 item lines and 50 units in total (sum of qty)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_N1w78YpEtRv7u4ZdOxqPi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether up to 50 box-shaped items fit into any of up to 20 candidate cartons and recommends the smallest-volume carton with per-item placement coordinates","exampleAgentPrompt":"I need to ship 3 items — a 12×8×4 inch book (2 lb, must stay upright), a 6×6×6 inch cube (1 lb), and a 10×4×3 inch tube (0.5 lb) — check whether they fit into any of these cartons: a 14×10×8 inch box (max 10 lb) or an 18×12×10 inch box (max 20 lb), and tell me the smallest one that works with where each item goes.","exampleUseCases":[{"title":"E-commerce order carton selection","prompt":"I have an online order with 4 items: a 9×6×2 inch book (0.8 lb), two 5×5×5 inch mugs (0.5 lb each), and a 12×4×4 inch poster tube (0.3 lb, must stay upright). Which of my carton options fits them all — a 10×8×6 inch box (max 5 lb), a 14×10×8 inch box (max 10 lb), or an 18×14×10 inch box (max 15 lb) — and what's the smallest one that works?"},{"title":"Multi-SKU warehouse fulfillment sizing","prompt":"We're packing a wholesale order: 5 units of a 4×3×2 inch widget (0.4 lb each) and 2 units of a 10×6×5 inch gadget (1.5 lb each). Can you check if they fit into any of these standard warehouse cartons — a 12×10×8 inch box (max 8 lb), a 16×12×10 inch box (max 15 lb), or a 20×16×14 inch box (max 25 lb) — and tell me the tightest fit with placement coordinates?"},{"title":"Fragile this-side-up gift box validation","prompt":"I need to ship a gift set with 3 items that must stay upright: a 4×4×12 inch vase (2 lb), a 6×6×8 inch candle jar (3 lb), and a 3×3×6 inch bottle (1 lb). Do any of these boxes work — a 10×8×14 inch box (max 8 lb) or a 12×10×16 inch box (max 12 lb)? Show me the smallest that fits and where each item goes."}],"resultDescription":"Returns the smallest-volume carton for which a valid packing was found (status: pass), along with 3D placement coordinates (x, y, z position and chosen orientation) for every item. For cartons that failed, returns status fail (provably impossible due to dimension or weight excess) or unknown (heuristic found no solution but cannot prove impossibility). Includes the winning carton's id and volume.","failureModes":["Item exceeds all carton orientations in at least one dimension — returns fail status","Total item volume exceeds carton volume — returns fail status","Total item weight exceeds carton maxWeight — returns fail status","Heuristic finds no packing but cannot prove impossibility — returns unknown status (may still be packable)","More than 50 total item units (sum of qty) — validation error","More than 20 cartons submitted — validation error","Dimension values out of allowed range (< 0.001 or > 100000) — validation error","Weight fields missing on some items when carton maxWeight is set — schema error"],"whenToPreferThis":"Use this endpoint when an AI agent or fulfillment system needs to automatically select a shipping carton from a list of candidates and needs placement coordinates for packing verification. It handles axis-aligned rotations, this-side-up constraints, and weight limits in one call. Prefer it over manual sizing tables when dealing with mixed SKU orders or when you need machine-readable placement data. Note that it uses a greedy heuristic — an 'unknown' result does not mean packing is impossible, so consider retrying with relaxed constraints or a larger carton.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T00:31:33.183Z","isFirstParty":false,"canonicalSlug":"writerslogic-carton-fit-3d-bin-packing-api-ecf244ed"}