# Deliva > Deliva makes custom products that an AI agent can order for its user. An agent sends a picture and gets back a picture of the product with it, the price with shipping, and a link its user can open to look at the design, change it and order it. No account and no key. ## Make a preview Start here. A preview is one design under one ID. It holds `image_url` (the product with the picture on it, as a JPEG), `quote` (the price with shipping, and `quote.summary`, which says what it buys) and `approval_url` (the page for the user). Read `next_step` first: it starts with anything that was not understood, with the values that work. Tell the user every warning in `issues`, such as `low_resolution` or `heavy_crop`, and then give them `approval_url`. Four ways lead to a preview: - A client that sends JSON: POST to `https://api.deliva.ai/v1/previews` with `Content-Type: application/json` and `{"product": "poster", "country": "DE", "inputs": {"artwork": "https://images.metmuseum.org/CRDImages/ep/original/DP-19279-001.jpg"}}`. It answers with status 201. - A client that only opens URLs: GET on an address of the form `https://api.deliva.ai/v1/previews/new?product=poster&country=DE&artwork={picture URL, percent-encoded}`. It always answers with status 200. Example: `https://api.deliva.ai/v1/previews/new?product=poster&country=DE&artwork=https%3A%2F%2Fimages.metmuseum.org%2FCRDImages%2Fep%2Foriginal%2FDP-19279-001.jpg`. Each request makes a new preview. The picture URL goes last. Under 250 characters is safest. - A client that can send a file: POST to `https://api.deliva.ai/v1/uploads` as multipart/form-data with the field `file`, up to 4 MB. The `id` of the answer goes in `inputs.artwork`. - A client that can do none of these, or a picture that has no public URL: a link for the user, `https://deliva.ai/new?product=poster&country=DE&from=api`, where they add their picture. It is also in a product's `links.user_link`. Opening it makes nothing. With `&artwork={picture URL, percent-encoded}` at the end it holds the picture. The picture is a PNG, JPEG or WebP. A URL is public and https, needs no login and answers within 5 seconds. At most 20 MB, 40 megapixels and 12,000 px a side, at least 200 px. The [terms](https://deliva.ai/terms) and the [content policy](https://deliva.ai/content-policy) apply to it. Only `product` is required. Anything that is missing or wrong is in `issues`, with the values that would work. A `blocking` issue, such as a size that does not exist, leaves the design or its price incomplete, and `status` is `needs_input`: tell the user what was not understood, not a price. A `warning` does not block. `status: ready` means the request is complete, not that the picture suits the product. - `status`: `ready`, `rendering`, `needs_input` or `failed`. While `retry_after` is a number, `links.check_again` is the address that shows the picture after that many seconds. It always answers with status 200. - `next_step` says in words what there is and where. - `approval_url` opens without an account. Anyone who has it can see the design, change it and delete it. A preview is kept for 7 days, or for 90 days after its last change once somebody has changed it or opened its page. - `placement.artwork`: `fit` (`cover` fills the sheet and crops, `contain` shows the whole picture), `scale` (0.1 to 5), `x` and `y` (the center, as fractions of the sheet, negative `y` is up), `rotation` (degrees clockwise) and `background` (a color such as `#ffffff`). In a URL they are written `placement.artwork.fit=contain`. The default is `cover`, centered. - A low resolution at the printed size is a `low_resolution` warning with the numbers. - What the picture looks like is in the JPEG at `image_url` and nowhere in the JSON. ## Change a preview PATCH `https://api.deliva.ai/v1/previews/{id}` with JSON. `revision` names the revision that the change starts from, and each change makes the next one. The ID and the link stay the same. Example: `{"revision": 1, "placement": {"artwork": {"y": -0.08}}}` moves the picture up. - It takes `options`, `inputs`, `placement`, `country` (a two-letter code) and `quantity`. What is left out keeps its value. A value that cannot be used is `422 invalid_field`, and then nothing changes. - `409 revision_conflict` means that somebody else changed the preview first. The answer names the current revision. - The user can move and scale the picture and add another picture on `approval_url`, and chooses the country at checkout. A client that only opens URLs cannot change a preview. It can make another. ## What Deliva offers - Product: poster. Your picture printed on matte paper, in 11 sizes from 8 x 10 in (20 x 25 cm) to 24 x 36 in (60 x 90 cm). Priced one at a time, with shipping to Germany, the United States, Canada and Australia. - Product: framed-poster. Your picture on matte paper in a wooden frame, ready to hang, in five sizes and four frame colors. Priced one at a time, with shipping to Germany, the United States, Canada and Australia. - Product: canvas. Your picture printed on canvas and stretched over wooden bars, in six sizes, slim or thick. Priced one at a time, with shipping to Germany, the United States, Canada and Australia. - Product: mug. Your picture on a glossy white ceramic mug, 11 or 15 oz, or 11 oz with a color inside. Priced one at a time, with shipping to Germany, the United States, Canada and Australia. - Product: t-shirt. Your picture on the front of a soft cotton unisex T-shirt, XS to 5XL, in eight colors. Priced one at a time, with shipping to the United States. - Product: tri-blend-t-shirt. Your picture on the front of a soft, fitted tri-blend unisex T-shirt, L to 4XL, in eight colors. Priced one at a time, with shipping to the United States. - Product: mens-midweight-t-shirt. Your picture on the front of a 180 g/m² cotton men's T-shirt, M to 3XL, in five colors. Priced one at a time, with shipping to the United States. - Previews from a public picture URL or a file, and changes to them. When the API answers `capacity_reached`, it is busy: try again shortly. Prices still work then. - Orders of a preview at its price, by `POST /v1/orders` or by the button "Pay" at the end of the site's checkout. - The API at api.deliva.ai, which answers with JSON. - The MCP server at https://api.deliva.ai/mcp, with the same as tools. - A price only where Deliva has checked one. No delivery to the United Kingdom. ## Order it POST `https://api.deliva.ai/v1/orders` with `{"items": [{"preview": "prv_...", "revision": 1, "price_id": "prc_..."}]}`, from the preview's `id`, `revision` and `quote.price_id`, orders the design at that price. Order only when your user has seen the design and the price and asked for it. Your user can also add it to the cart on `approval_url` and press "Pay" at checkout. - `409 revision_conflict` and `409 price_changed` mean that the user saw something else than what is there now. The answer shows what is current, for the user to look at again. - `409 preview_incomplete` means that the design is missing something. `issues` says what. - The answer says what happened. Tell the user what it says. ## Find a product - [Every product](https://api.deliva.ai/v1/products) - [Every product, with its price with shipping to Germany](https://api.deliva.ai/v1/products?country=DE) - [The poster: options, print file and countries](https://api.deliva.ai/v1/products/poster) - [The framed poster: options, print file and countries](https://api.deliva.ai/v1/products/framed-poster) - [The canvas: options, print file and countries](https://api.deliva.ai/v1/products/canvas) - [The mug: options, print file and countries](https://api.deliva.ai/v1/products/mug) - [The unisex t-shirt: options, print file and countries](https://api.deliva.ai/v1/products/t-shirt) - [The tri-blend t-shirt: options, print file and countries](https://api.deliva.ai/v1/products/tri-blend-t-shirt) - [The men's midweight t-shirt: options, print file and countries](https://api.deliva.ai/v1/products/mens-midweight-t-shirt) - A search has the form `https://api.deliva.ai/v1/products?q=wall+art&country=DE`. ## Get a price with shipping - [Poster to Germany, the United States, Canada and Australia](https://api.deliva.ai/v1/quotes?product=poster&country=DE,US,CA,AU) - [Framed poster to Germany, the United States, Canada and Australia](https://api.deliva.ai/v1/quotes?product=framed-poster&country=DE,US,CA,AU) - [Canvas to Germany, the United States, Canada and Australia](https://api.deliva.ai/v1/quotes?product=canvas&country=DE,US,CA,AU) - [Mug to Germany, the United States, Canada and Australia](https://api.deliva.ai/v1/quotes?product=mug&country=DE,US,CA,AU) - [Unisex T-shirt to the United States](https://api.deliva.ai/v1/quotes?product=t-shirt&country=US) - [Tri-blend T-shirt to the United States](https://api.deliva.ai/v1/quotes?product=tri-blend-t-shirt&country=US) - [Men's midweight T-shirt to the United States](https://api.deliva.ai/v1/quotes?product=mens-midweight-t-shirt&country=US) A price is for the default of every option, such as the size. Another one is asked for by its name: `https://api.deliva.ai/v1/quotes?product=poster&country=DE&options.size=24x36`. The product's address lists the options, and the price of each variant when it has `?country=`. A size, an option or a quantity that does not exist prices nothing: the answer is a problem that lists the values that work. `country` is the destination country and not the city: a two-letter code, or an English name such as Germany. Several are separated by commas. In an answer: - `data[].price.total` is the price with shipping, in the currency of the country. There is one price per country, whatever the address. - `data[].summary` is the same in one sentence, with what it buys: the product, its size in that country (inches in the United States and Canada, centimeters elsewhere), the quantity and the country. `data[].dimensions` is that size. - `price_status` is `final` when nothing comes on top. It is `estimate` when something does, named in `unknown_charges`. In the United States and Canada that is sales tax, which depends on the address. - The countries without a price are in `unavailable`. `pricing_unavailable` means that Deliva has not checked a price. It does not mean that nothing is sent there. `country_not_served` means that Deliva does not deliver there, and `detail` says so. The United Kingdom answers that: "We do not deliver to the United Kingdom." - `issues` says what in the request was not understood. No answer says when something would arrive, because Deliva has not checked that. ## Reading answers - `https://api.deliva.ai/v1/products/{product}`, `https://api.deliva.ai/v1/quotes`, `https://api.deliva.ai/v1/previews/new` and `https://api.deliva.ai/v1/previews/{preview}/status` always answer with status 200. `object: problem` in the body means that it did not work, and `next_url` is the address that helps next. - [The index of the API](https://api.deliva.ai/v1) - [The OpenAPI file](https://api.deliva.ai/v1/openapi.json), generated from the code that answers, and the one to import. - [The MCP server card](https://api.deliva.ai/mcp/server-card), for a client that discovers servers. ## Pages - [Home](https://deliva.ai/) - [Catalog](https://deliva.ai/catalog) - [For agents](https://deliva.ai/agents)