Skip to main content
This guide makes a print product: a pattern printed on something, such as napkins or a cushion. To make jewelry, follow the jewelry quickstart. It follows one example from start to finish: a lemon-branch pattern that becomes a throw pillow.
Pattern of lemon branches with coral blossoms and navy leaves on a cream ground

Lemon branches with coral blossoms and navy leaves on a soft cream ground

1

Get an API key

Create a key in Arcade Studio under Settings → API keys, then export it. A key has the same access as your account, so keep it on your server.
Every sample sends a User-Agent header that names your integration and a contact. Replace it with your own; see Identify your client.
2

Generate a pattern

Send a prompt. The requestId is an ID you choose; it makes the request safe to retry. See Idempotency.
The response is a job:
Already have artwork? Upload it as a pattern instead. The upload returns a patternId directly, so skip the next step too.
3

Wait for the job

Call jobs/get every 10 seconds until status is succeeded or failed. Generation takes a minute or two.
result.patternId is your pattern. Call patterns/get with it to get the image. If the job failed, error.message says why.
4

Edit it with a description

This step is optional. Describe the change in plain words. The edit returns a job.
Poll the job as before. When it succeeds, result.patternId is a new pattern. The original pattern stays as it was.
Original pattern with navy leaves

Before: navy leaves

Edited pattern with deep forest green leaves

After: “Turn the leaves to a deep forest green”

Other refines, such as crop, makeSeamless and extendPattern, work the same way: you send a pattern, get a job, and the job makes a new pattern. recolor needs one extra call first: recolorClusters, which lists the pattern’s colors.
5

Choose a category

A category is a type of product. List the categories and choose one whose world is print.
Category IDs can change. Read them from categories/list; don’t hardcode them.
Corner of a printed cushion with coral piping

A print category: cushions

6

Choose the options

Each category has options, such as fabric and size. Call categories/get with the categoryId and an empty selections to see them.
Among other fields, the response includes:
  • options lists every option and its values.
  • selections is the set of choices to build with: yours, plus a value for the options you left out, the default where possible.
  • canManufacture says whether a maker can make the product in selections.
If the defaults suit you and canManufacture is true, go to the next step.To change an option, send your choice and call categories/get again. For example, send "selections": { "fabric": "linen" } to choose linen. Choose only values with available: true. The response fills in the remaining options again.
7

Create the product

Call products/create with the edited patternId, the categoryId and the selections object from the latest categories/get response. Send the whole object, not only the choices you made.The values below are examples. Use the ones your category returned.
The response is a job. Poll it as before; when it succeeds, result.productId is your product.
Throw pillow printed with the lemon-branch pattern with forest green leaves

The edited pattern, made as a throw pillow

If the pattern and the product have different shapes, products/create can also need a fit, which says how to crop or extend the pattern. See Create a product.
8

Order it

Create a checkout with the productId and a quantity, then open checkoutUrl to pay.
To order a single unit, see Dropshipping.
9

Track the order

After payment, Arcade handles manufacturing and fulfillment. Call orders/get with the checkoutId to see the order’s status and its lines. It can return 404 for a short time right after payment; try again shortly.
A maker finishing a printed cushion by hand

A maker finishing a printed cushion

Next steps

  • Skip the pattern step: products/generate makes a product straight from a prompt, and Arcade picks the options.
  • Get notified when a job finishes with webhooks instead of polling.

Tips

  • Retry with the same requestId. The work runs once, and the retry returns the original result. Use a new requestId for new work. See Idempotency.
  • Poll every 10 seconds. Polling faster counts against the rate limit and doesn’t make a job finish sooner.
  • Read category IDs from categories/list. They can change, so don’t hardcode them.
  • Send the complete selections. Use the object categories/get returns, not only the choices you sent.