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
- /llms.txt and /llms-full.txt: the plain-text guide
- /openapi.json: OpenAPI 3.1, every endpoint with examples
- MCP server:
POST https://api.madely.ai/mcp(JSON-RPC 2.0 over HTTP). Descriptor: /.well-known/mcp.json - /pricing.json, /catalog.jsonld, /print-specs.json: prices, catalog and print specs as JSON
- /products, /sitemap.xml: crawlable HTML
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)
| Tool | Type | What it does |
|---|---|---|
get_print_spec | read-only | Machine-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_product | read-only | One product with whole-dollar price, photo URL, production time, links and its full print_spec and template_urls. |
validate_print_file | read-only | Validate an artwork file URL or declared properties (dimensions, format, size, transparency, color mode, content box) against the product's print spec. |
list_products | read-only | Search the Madely catalog. |
get_quote | read-only | Get an exact, deterministic quote: itemized whole-dollar product prices, carrier-cost shipping, total, estimated ship date, and the volume tier applied. |
create_order | writes | Create a TEST order from a quote. |
get_order | read-only | Get an order: status (draft, in_production, shipped, delivered), tracking, events and totals. |
check_print_file | read-only | Alias of validate_print_file (kept for older agents). |
submit_order | writes | Pay for and start production on a draft order. |
cancel_order | writes | Cancel a draft or in_production order and refund it in full to the original payment method (balance orders credit the balance). |
get_payment_options | read-only | How an agent can pay Madely: agent payment tokens (Stripe Shared Payment Tokens), card on file, prepaid balance. |
add_payment_method | writes | Save a card on file (a Stripe Customer plus PaymentMethod) so orders can be charged off-session with payment {method:"card_on_file"}. |
get_balance | read-only | Prepaid balance in USD plus the last 20 ledger entries (top-ups, order debits, refunds). |
top_up_balance | writes | Add a whole-dollar amount (10 to 5000) to the prepaid balance, paid by card on file or an agent payment token. |
create_sandbox_payment_token | writes | SANDBOX ONLY. |
get_pricing_tiers | read-only | Published 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.