Test version. Sandbox only: no real orders are printed, shipped or charged.

Home / For agents

API for AI agents

Madely for AI agents

Madely is print-on-demand fulfillment built for AI agents, branded Fulfilled by Madely. You MADE the product. Your agent sends the order. Madely prints it to order in the USA, with a production time of 2–3 business days. Product prices are whole dollars. Shipping is billed at carrier cost. There is no subscription.

v0 test version: orders are test-only, nothing is printed, shipped or charged. No account, no human step: mint a free sandbox key with one call.

Start here

Order in five calls

GET  https://api.madely.ai/v1/products?q=mug
GET  https://api.madely.ai/v1/products/K04/print-spec        # size, bleed, safe zone, prompt suffix
POST https://api.madely.ai/v1/print-spec/validate            # check your file
POST https://api.madely.ai/v1/quotes                         # exact whole-dollar quote, no key
POST https://api.madely.ai/v1/sandbox/keys                   # free test key
POST https://api.madely.ai/v1/orders                         # Idempotency-Key + payment
GET  https://api.madely.ai/v1/orders/{order_id}

Send your key as Authorization: Bearer <key>, on REST and on MCP requests. Errors carry a fix field.

How does an agent pay Madely?

Madely charges when the order is submitted, before production, for the quote total of items plus shipping. An agent can pay with a Stripe Shared Payment Token (agent_token), a card on file, or a prepaid balance. max_cost_usd is a hard ceiling: above it there is no order and no charge. In the test version no real money moves.

MCP tools (16)

ToolTypeWhat it does
get_print_specread-onlyMachine-readable print spec for one product: canvas_px, inches, dpi, bleed, safe_zone, print_zones (with wrap/curvature for mugs), color_mode, accepted_formats, max_file_mb, background (transparent?), orientation, a generation_hint for image models, and template_urls.
get_productread-onlyOne product with whole-dollar price, photo URL, production time, links and its full print_spec and template_urls.
validate_print_fileread-onlyValidate an artwork file URL or declared properties (dimensions, format, size, transparency, color mode, content box) against the product's print spec.
list_productsread-onlySearch the Madely catalog.
get_quoteread-onlyGet an exact, deterministic quote: itemized whole-dollar product prices, carrier-cost shipping, total, estimated ship date, and the volume tier applied.
create_orderwritesCreate a TEST order from a quote.
get_orderread-onlyGet an order: status (draft, in_production, shipped, delivered), tracking, events and totals.
check_print_fileread-onlyAlias of validate_print_file (kept for older agents).
submit_orderwritesPay for and start production on a draft order.
cancel_orderwritesCancel a draft or in_production order and refund it in full to the original payment method (balance orders credit the balance).
get_payment_optionsread-onlyHow an agent can pay Madely: agent payment tokens (Stripe Shared Payment Tokens), card on file, prepaid balance.
add_payment_methodwritesSave a card on file (a Stripe Customer plus PaymentMethod) so orders can be charged off-session with payment {method:"card_on_file"}.
get_balanceread-onlyPrepaid balance in USD plus the last 20 ledger entries (top-ups, order debits, refunds).
top_up_balancewritesAdd a whole-dollar amount (10 to 5000) to the prepaid balance, paid by card on file or an agent payment token.
create_sandbox_payment_tokenwritesSANDBOX ONLY.
get_pricing_tiersread-onlyPublished volume tiers, the same for every merchant.

Sandbox endpoints

Endpoints tagged Sandbox in the OpenAPI spec (/v1/sandbox/* and the Stripe webhook receiver /v1/webhooks/stripe) exist only in the test version and are not part of the production contract.