For the complete documentation index, see llms.txt. This page is also available as Markdown.
newbeta

MockAnything AI API

Create MockAnything AI Mockup

post

Create a new MockAnything AI mockup. Exactly one of prompt, image_url, or image_file is required.

  • prompt: text prompt used to AI-generate an image. Returns a task_id that must be polled via /mock-anything/status/{taskId}.

  • image_url: URL of an existing image to use as the mockup image. Completes synchronously.

  • image_file: uploaded image file (use multipart/form-data). Completes synchronously.

Authorizations
x-api-keystringRequired

API key required for authentication.

Header parameters
Acceptstring · enumRequired

The request must accept JSON responses.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Body
promptstringOptional

Text prompt used to AI-generate the mockup image. Required unless image_url or image_file is provided.

image_urlstring · uriOptional

URL of an existing image to use as the mockup image. Required unless prompt or image_file is provided.

enhance_promptbooleanOptional

Whether to run prompt enhancement before generation. Only applies to the prompt flow.

modelstring · enumOptional

AI model used for generation. Only applies to the prompt flow. Required when style is provided. When omitted, product-backed generations default to nano_banana_2 and prompt-only generations without a product default to seedream_4_0. nano_banana_lite and gpt_image_2 apply to product-backed generations (a product.uuid present).

Possible values:
stylestringOptional

Visual style applied to the AI generation (e.g. polaroid-etsy, ugc, fashion). Use GET /mock-anything/styles?model={model} to list the styles available for a given model; not every model supports every style. When style is provided, model is required.

Example: polaroid-etsy
namestring · max: 255Optional

Optional mockup name shown in the dashboard and returned in the mockup.name field.

catalog_uuidstring · uuidOptional

Optional UUID of the catalog the mockup belongs to. Defaults to the workspace's default catalog.

Responses
401

Unauthorized request, invalid or missing API key.

No content

post/mock-anything/create
POST /api/v1/mock-anything/create HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: application/json
Content-Type: application/json
Content-Length: 72

{
  "prompt": "A man jogging through a sunny park in a plain white t-shirt"
}

No content

Get MockAnything AI Mockup Status

get

Poll the status of a MockAnything AI mockup creation task. The response contains a state field:

  • PROGRESS: the task is still running. image_url and mockup are null.

  • SUCCESS: the task finished and the mockup has been created. image_url is populated and mockup contains a payload that can be used immediately as mockup_uuid in the Render API.

Other states (e.g. FAILURE) indicate the task terminated without producing a mockup.

Authorizations
x-api-keystringRequired

API key required for authentication.

Path parameters
taskIdstring · uuidRequired

The task_id returned from POST /mock-anything/create.

Example: f6d7fb41-d32c-4fc3-8db9-37843d3476cf
Header parameters
Acceptstring · enumRequired

The request must accept JSON responses.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Responses
401

Unauthorized request, invalid or missing API key.

No content

get/mock-anything/status/{taskId}
GET /api/v1/mock-anything/status/{taskId} HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: application/json

No content

Search POD Products

get

Search the Print-on-Demand (POD) product catalog used to ground AI generations. The returned uuid can be passed as product.uuid when creating a mockup so the generated image is anchored to that specific product (e.g. a Gildan 5000 t-shirt).

Authorizations
x-api-keystringRequired

API key required for authentication.

Query parameters
querystring · min: 1Required

Search term matched against POD product names.

Example: gildan
Header parameters
Acceptstring · enumOptional

JSON is recommended; errors return JSON regardless of this header.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Responses
401

Unauthorized request, invalid or missing API key.

No content

get/mock-anything/products
GET /api/v1/mock-anything/products?query=text HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: */*

No content

Get POD Product Details

get

Get the full detail of a single POD product: its identity, available decoration areas (decorations), colors, and supported sizes. Use a decoration's position_id and one of its sources for exact selection when creating a mockup. location remains available for canonical area selection.

Authorizations
x-api-keystringRequired

API key required for authentication.

Path parameters
uuidstring · uuidRequired

UUID of the POD product (from GET /mock-anything/products).

Example: 8429f141-5289-4d3b-9a83-7417130adc3a
Header parameters
Acceptstring · enumRequired

The request must accept JSON responses.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Responses
401

Unauthorized request, invalid or missing API key.

No content

get/mock-anything/products/{uuid}
GET /api/v1/mock-anything/products/{uuid} HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: application/json

No content

List Available Styles

get

List the visual styles that can be applied to an AI-generated mockup. The returned id can be passed as style when creating a mockup to apply that aesthetic to the generation. Pass a model query parameter to scope the result to styles supported by that model; not every model supports every style. When model is omitted the response includes every known style across all models.

Authorizations
x-api-keystringRequired

API key required for authentication.

Query parameters
modelstring · enumOptional

Optional model filter. When provided, only styles available for that model are returned.

Example: nano_banana_2Possible values:
Header parameters
Acceptstring · enumRequired

The request must accept JSON responses.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Responses
401

Unauthorized request, invalid or missing API key.

No content

get/mock-anything/styles
GET /api/v1/mock-anything/styles HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: application/json

No content

Overview

MockAnything AI lets you create a new mockup on the fly, either by generating an image from a text prompt or by bringing an image you already have. Once created, each mockup behaves exactly like one from the Get Mockups API - you pass its uuid to the Render Mockup API to print artwork on it.

Creation is asynchronous: you submit a task, then poll until the mockup is ready.

Workflow

  1. (Optional) Search POD products to find a product.uuid for grounding the generation around a specific product.

  2. (Optional) Get a product's decoration areas via Get POD Product Details action, then target one or more with product.decorations on the mockup creation.

  3. (Optional) List available styles to set the visual direction of a mockup using a style parameter.

  4. Call Create MockAnything AI Mockup. You get back a task_id.

  5. Poll Get MockAnything AI Mockup Status until state is SUCCESS. The response includes a mockup object. Use mockup.uuid as the mockup_uuid in the Render Mockup API.

Three ways to create a mockup

prompt - Generate a brand-new image with AI. Best when you don't already have reference imagery, or when you want to quickly produce variations of a scene. Runs asynchronously.

image_url - Turn a publicly-accessible image into a MockAnything mockup. Use this when you already host product photos somewhere. Completes on the first status call.

image_file - Upload an image file directly (multipart/form-data). Best for private images you don't want to host publicly. Completes on the first status call.

Exactly one of these three must be provided per request. The remaining fields (name, collections, catalog_uuid) work the same for all three modes.

product.uuid, model, and enhance_prompt only apply to the prompt flow. They're ignored when you send image_url or image_file.

Polling for completion

After POST /mock-anything/create, poll GET /mock-anything/status/{taskId} with the returned task_id. The response contains a state field:

  • PROGRESS - still running. image_url and mockup are null. Poll again in a moment.

  • SUCCESS - ready. image_url is populated and mockup contains everything you need for the Render Mockup API.

  • FAILURE - the task terminated without producing a mockup.

We recommend polling every 2 seconds. AI generations typically finish in 10–30 seconds; image_url and image_file flows are usually ready on the very first status call.

Using your new mockup

Once state is SUCCESS, the mockup field looks identical to an entry from the Get Mockups API, with type: "mockanything". Three fields matter for rendering:

  • mockup.uuid - pass as mockup_uuid in the Render Mockup API.

  • mockup.smart_objects[].uuid - each print area detected on the image. Reference these as smart_objects[].uuid in the Render Mockup API payload to place your artwork on each area.

  • mockup.smart_objects[].decoration - optional decoration area for this product, when the mockup was grounded with a product.uuid on mockup creation. Use it to pick the right smart object for a specific spot.

From here everything works exactly like rendering a classic mockup. The Render Mockup API handles both types through the same endpoint, so you don't need a separate integration.

Grounding the AI with a product

If you want the AI to anchor the generated image around a specific product (say a Gildan 5000 t-shirt rather than a generic tee), first look up a product with Search POD Products, then pass the returned uuid as product.uuid on the create request.

GET /mock-anything/products?query=gildan

The response is a simple list of { name, uuid } entries. Pick the one that matches the product you're mocking up.

Grounding is optional. Skip it if you just want the model to pick a natural composition based on the prompt alone.

Targeting decoration areas

When you ground a generation with a product, you can also tell the AI where on that product the artwork should sit - the full chest, left chest, a sleeve, the back, and so on. These spots are called decorations.

First, look up the decorations a product offers with Get POD Product Details:

GET /mock-anything/products/{uuid}

The response includes a decorations array. Each entry has a location (the ID you pass back on create), a human-readable name, and the surface it sits on:

Then pass the location(s) you want as product.decorations on the mockup creation request:

Decorations are optional. Omit `product.decorations` and the product's default area is used. Send no `product` at all and the AI composes freely, returning a single default area.

Set visual direction with a style

If you want the AI mockup to land in a specific look (warm Polaroid, editorial flash, casual UGC, etc.) instead of the default photographic style, list the styles available for your chosen model with List Available Styles, then pass the returned id as style on the create request.

GET /mock-anything/styles?model=nano_banana_2

The response is a list of { id, description, available_with } entries. Read the description to pick the look you want, then send its id as style.

Style is optional. Skip it for the default look. When you do pass style, model is also required - not every model supports every style.

The style will be applied only if you create a mockup using a prompt

Catalogs and collections

MockAnything mockups live inside your catalogs and collections, the same as any other mockup:

  • catalog_uuid - places the mockup in a specific catalog. Defaults to your workspace's default catalog. See the Catalogs API to list available catalogs.

  • collections - attaches the mockup to one or more collections. Each entry is either an existing collection referenced by uuid, or a new one referenced by name (which will find-or-create for you). See the Collections API to manage collections.

Passing collections[].name will create a collection if one with that name doesn't exist in the target catalog - a handy way to organize on the fly. Use collections[].uuid when you already know which collection to attach to.

Choosing a model

The model parameter controls which AI model generates your image. Different models trade off speed, quality, and credit cost. If you don't set model, generation will use seedream_4_0 as default.

Model
Credits
Speed
Quality
Best for

seedream_4_0

5

~20s

Medium

Quick iterations and early exploration

seedream_4_5

6

~40s

Good

Higher fidelity without the pro price

nano_banana_2

14

~30s

High

Production-quality, final mockups

Credits are charged when the task reaches SUCCESS. Failed generations (FAILURE state) don't cost anything.

The credits pricing per model applies only if you use the prompt for mockup generation. If you generate a mockup from image_url or image_file, 4 credits cost is applied per generation.

Rate Limit

Create MockAnything AI Mockup endpoint is limited to 50 requests per minute.

Requests exceeding this limit will receive a 429 Too Many Requests response. If you expect higher throughput, contact support to discuss your use case.

Last updated