> For the complete documentation index, see [llms.txt](https://docs.dynamicmockups.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dynamicmockups.com/api-reference/mockanything-ai-api.md). Agents can also search and read this documentation through its [MCP server](https://docs.dynamicmockups.com/~gitbook/mcp).

# MockAnything AI API

## Create MockAnything AI Mockup

> 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. Returns a \`task\_id\` that must be polled via \`/mock-anything/status/{taskId}\`, as for a prompt.\
> \- \`image\_file\`: uploaded image file (use \`multipart/form-data\`). Returns a \`task\_id\` that must be polled via \`/mock-anything/status/{taskId}\`, as for a prompt.<br>

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups MockAnything AI API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}},"schemas":{"DecorationInput":{"type":"object","description":"A decoration to place on the product when creating a mockup.","properties":{"location":{"type":"string","description":"Decoration area to target, from `GET /mock-anything/products/{uuid}`. When omitted, the product's default decoration area is used."},"position_id":{"type":"string","description":"Exact stored decoration position identifier from `decorations[].position_id` in the product detail response. Use this to distinguish provider-specific positions that share a canonical location."},"source":{"type":"string","description":"Enabled provider source from the selected product-detail decoration's `sources` list. Matching trims surrounding whitespace and is case-insensitive; the canonical stored source is forwarded. When omitted, the position's default source is used."},"decoration_method":{"type":"string","description":"Decoration method to apply (e.g. `dtg`, `screen_print`, `embroidery`, `dtf`, `heat_transfer`). The value is forwarded as sent. When the selected position lists methods and none of them matches (case-insensitive; each run of spaces and/or hyphens reads as one `_`; common synonyms such as `screen_printing` = `screen_print` accepted), the request still proceeds and the response carries a `decoration_method_not_supported` warning for that `location`; the source and sizing are not changed. No warning is given for a disabled position or one whose data lists no methods. Positions are listed with their methods in `GET /mock-anything/products/{uuid}`.\n"},"imprint_size":{"type":"object","description":"Desired physical imprint size.","properties":{"width":{"type":"number"},"height":{"type":"number"},"unit":{"type":"string"}}}}},"MockAnythingWarning":{"type":"object","description":"Non-blocking warning returned on create and optionally echoed by status.","properties":{"location":{"type":"string","description":"Requested decoration location that triggered the warning."},"code":{"type":"string","description":"Machine-readable warning code. Known values: `no_placed_print_area_for_location`, `decoration_method_not_supported` (the location does not list the requested `decoration_method` as a supported method; the request continues unchanged), and `model_not_available_for_product` (the requested `model` does not run on a catalog product; the create runs `nano_banana_2` and is charged as it). Clients must tolerate unknown codes.\n"},"message":{"type":"string","description":"Partner-facing warning message."},"requested_model":{"type":"string","description":"Only on `model_not_available_for_product`. The model the request named."},"model":{"type":"string","description":"Only on `model_not_available_for_product`. The model that runs, and that the create is charged as."}}}}},"paths":{"/mock-anything/create":{"post":{"summary":"Create MockAnything AI Mockup","description":"Create a new MockAnything AI mockup. Exactly one of `prompt`, `image_url`, or `image_file` is required.\n\n- `prompt`: text prompt used to AI-generate an image. Returns a `task_id` that must be polled via `/mock-anything/status/{taskId}`.\n- `image_url`: URL of an existing image to use as the mockup image. Returns a `task_id` that must be polled via `/mock-anything/status/{taskId}`, as for a prompt.\n- `image_file`: uploaded image file (use `multipart/form-data`). Returns a `task_id` that must be polled via `/mock-anything/status/{taskId}`, as for a prompt.\n","operationId":"createMockAnythingMockup","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"API key required for authentication."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text prompt used to AI-generate the mockup image. Required unless `image_url` or `image_file` is provided."},"image_url":{"type":"string","format":"uri","description":"URL of an existing image to use as the mockup image. Required unless `prompt` or `image_file` is provided."},"enhance_prompt":{"type":"boolean","description":"Whether to run prompt enhancement before generation. Only applies to the `prompt` flow."},"product":{"type":"object","description":"Optional product context used to ground the AI generation.","properties":{"uuid":{"type":"string","format":"uuid","description":"UUID of a POD product (obtained via `GET /mock-anything/products`) to anchor the AI generation around a specific product type."},"selected_size":{"type":"string","maxLength":50,"description":"Optional product size. Must exactly match one of the product's `sizes[].label` values (from `GET /mock-anything/products/{uuid}`). A matched size is taken into account by the generation where the product's category and size data support it (real-world scale and/or output aspect). A value that matches none of the product's sizes is rejected with a 400 error naming the product's valid size labels; when the product cannot be resolved, the value is accepted without effect. Only meaningful together with `product.uuid`."},"color_name":{"type":"string","maxLength":255,"description":"Optional exact product color name from `GET /mock-anything/products/{uuid}`. The value is case-sensitive and must match one of `colors[].name`. Product detail must be available to validate this selector."},"side":{"type":"string","enum":["front","back"],"description":"Optional side the mockup must show. The generation is told to show that face of the product, and the print area placed is that side's (the product's default decoration area when it is on that side, otherwise that side's area from the default's provider). On a product with no enabled area on that side (wall art asked for `back`, an all-over blanket, a wrap tumbler) `side` is ignored. The mockup is generated with the product's default area and the create response carries a `side_not_applicable` warning. A `decorations` item on the opposite side of an applicable `side` is rejected as a conflict. When omitted together with `decorations` on a product that has both front and back areas, the generated scene decides the side and that side's area is placed; the status response reports the side in `side`."},"decorations":{"type":"array","description":"Optional list of decoration areas to place on the product. Each item can target a canonical `location` or an exact `position_id`, and can select an exact enabled `source`, all from `GET /mock-anything/products/{uuid}`. When omitted, the product's default decoration area and source are used, except on a product with both front and back areas, where the generated scene decides the side (see `side`).\n","items":{"$ref":"#/components/schemas/DecorationInput"}}}},"model":{"type":"string","description":"AI model used for generation. Only applies to the `prompt` flow. Required when `style` is provided. When omitted, generations default to `nano_banana_2`, which runs on Nano Banana 2.1 (Google's `gemini-nano-banana-2.1`) since October 2026. `nano_banana_lite` and `gpt_image_2` apply to product-backed generations (a `product.uuid` present).","enum":["nano_banana_2","nano_banana_lite","seedream_4_0","seedream_4_5","gpt_image_2"]},"style":{"type":"string","description":"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."},"name":{"type":"string","maxLength":255,"description":"Optional mockup name shown in the dashboard and returned in the `mockup.name` field."},"collections":{"type":"array","description":"Optional collections to attach the mockup to. Each item is either an existing collection (by `uuid`) or a new collection to create (by `name`). Exactly one of `uuid` or `name` must be provided per item.","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"UUID of an existing collection."},"name":{"type":"string","maxLength":255,"description":"Name of a new collection to create and attach."}}}},"catalog_uuid":{"type":"string","format":"uuid","description":"Optional UUID of the catalog the mockup belongs to. Defaults to the workspace's default catalog."}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"image_file":{"type":"string","format":"binary","description":"Image file upload (JPG, JPEG, PNG, GIF, or WebP; max 10 MB). Required unless `prompt` or `image_url` is provided."},"name":{"type":"string","maxLength":255,"description":"Optional mockup name."},"collections":{"type":"array","description":"Collections to attach the mockup to. Send as `collections[0][uuid]` or `collections[0][name]` form fields.","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"catalog_uuid":{"type":"string","format":"uuid"}},"required":["image_file"]}}}},"responses":{"200":{"description":"Template creation started.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"task_id":{"type":"string","format":"uuid","description":"The task identifier. Poll `GET /mock-anything/status/{taskId}` with this value to track progress. The same value will be used as the `mockup.uuid` once the mockup is created."},"status":{"type":"string","description":"Initial task status."},"selected_size":{"type":["string","null"],"description":"Echoes the requested `product.selected_size` value from the create request. The mockup has not run yet, so this is not an applied or resolved size."},"aspect_ratio":{"type":["string","null"],"description":"Echoes the requested `aspect_ratio` value from the create request. The mockup has not run yet."},"side":{"type":["string","null"],"enum":["front","back",null],"description":"Echoes the requested `product.side` (null when none was requested)."},"model":{"type":["string","null"],"description":"The model this create runs and is charged as. It is the requested `model`, or `nano_banana_2` when none was given. On a catalog product, a model that the product path cannot run is replaced by `nano_banana_2`, with a `model_not_available_for_product` warning. Null for an image upload."},"warnings":{"type":"array","description":"Non-blocking create-time warnings. A warning does not reject the request.","items":{"$ref":"#/components/schemas/MockAnythingWarning"}}}},"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request due to invalid input parameters (e.g. missing prompt/image_url/image_file, invalid model, unsupported image type)."},"401":{"description":"Unauthorized request, invalid or missing API key."},"403":{"description":"No credits available, or the authenticated user does not have access to the provided catalog or collection."},"404":{"description":"The provided `catalog_uuid` or a `collections[].uuid` could not be found."},"422":{"description":"An exact product color, decoration position, or decoration source does not exist on the selected product."},"500":{"description":"Failed to start AI generation or upload the provided image."},"503":{"description":"Product detail is temporarily unavailable, so an explicit `color_name`, `position_id`, or `source` selector cannot be validated safely."}}}}}}
```

## Get MockAnything AI Mockup Status

> 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.<br>

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups MockAnything AI API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}},"schemas":{"StatusProgressResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"task_id":{"type":"string","format":"uuid"},"state":{"type":"string","description":"Current task state.","enum":["PROGRESS","PENDING","FAILURE"]},"image_url":{"type":["string","null"],"description":"Always `null` while the task is in progress."},"status":{"type":"string","description":"Human-readable status."},"mockup":{"type":["object","null"],"description":"Always `null` while the task is in progress."},"model":{"type":["string","null"],"description":"Always `null` while the task is in progress."},"warnings":{"type":"array","description":"Non-blocking create-time warnings. Usually absent from status responses.","items":{"$ref":"#/components/schemas/MockAnythingWarning"}}}},"success":{"type":"boolean"},"message":{"type":"string"}}},"MockAnythingWarning":{"type":"object","description":"Non-blocking warning returned on create and optionally echoed by status.","properties":{"location":{"type":"string","description":"Requested decoration location that triggered the warning."},"code":{"type":"string","description":"Machine-readable warning code. Known values: `no_placed_print_area_for_location`, `decoration_method_not_supported` (the location does not list the requested `decoration_method` as a supported method; the request continues unchanged), and `model_not_available_for_product` (the requested `model` does not run on a catalog product; the create runs `nano_banana_2` and is charged as it). Clients must tolerate unknown codes.\n"},"message":{"type":"string","description":"Partner-facing warning message."},"requested_model":{"type":"string","description":"Only on `model_not_available_for_product`. The model the request named."},"model":{"type":"string","description":"Only on `model_not_available_for_product`. The model that runs, and that the create is charged as."}}},"StatusSuccessResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"task_id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["SUCCESS"]},"image_url":{"type":"string","format":"uri","description":"URL of the generated or uploaded mockup image."},"status":{"type":"string"},"selected_size":{"type":["string","null"],"description":"Requested `product.selected_size` value echoed back by MockAnything AI when present. This confirms the requested size round-trip; it is not proof of the size applied to rendering."},"aspect_ratio":{"type":["string","null"],"description":"Aspect ratio actually used by MockAnything AI when present."},"side":{"type":["string","null"],"enum":["front","back",null],"description":"Side of the product the mockup shows, front or back. It is the requested `product.side` when one was given, otherwise the side the generated scene shows; null when it is unknown or the scene shows several products on different sides."},"model":{"type":["string","null"],"description":"The model that ran, as MockAnything AI reports it. Null for an image upload, or when it is not known."},"mockup":{"$ref":"#/components/schemas/Mockup"},"warnings":{"type":"array","description":"Non-blocking create-time warnings. Usually absent from status responses.","items":{"$ref":"#/components/schemas/MockAnythingWarning"}}}},"success":{"type":"boolean"},"message":{"type":"string"}}},"Mockup":{"type":"object","description":"Mockup payload matching the MockAnything entry of the Get Mockups API. Use `uuid` as `mockup_uuid` in the Render API.","properties":{"type":{"type":"string","description":"Always `mockanything` for mockups created via this API."},"uuid":{"type":"string","format":"uuid","description":"Mockup UUID. Matches the `task_id`."},"name":{"type":"string","description":"Mockup name. Falls back to the prompt or a default if no `name` was provided on creation."},"thumbnail":{"type":"string","format":"uri","description":"URL of the mockup thumbnail."},"smart_objects":{"type":"array","description":"Print areas detected on the mockup. Each item corresponds to a renderable artwork slot and can be referenced by `uuid` in the Render API's `smart_objects` payload. Eligible templates may include a product-wide full-canvas entry identified by `kind: product_all_over`; it may be absent on other templates. That entry is explicit-only: referencing it affects a render only when the request supplies an artwork URL/file, while a bare, color-only, pattern-only, or geometry-only reference is inert. When artwork is supplied without an explicit size, it defaults to the full mockup canvas. Including this entry in a Render Print Files request rejects the whole request with HTTP 400 and produces no print files; omit it and send only named areas.","items":{"$ref":"#/components/schemas/SmartObject"}},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"thumbnails":{"type":"array","description":"Additional thumbnail sizes. Always empty for MockAnything mockups.","items":{}},"products":{"type":"array","description":"Product context (when a POD product was associated with the mockup). Each item describes the grounding product.","items":{"$ref":"#/components/schemas/Product"}},"unrendered_decorations":{"type":"array","description":"Requested decoration areas that were not rendered, so no artwork should be placed there. Present on the status response; empty when all requested areas rendered.","items":{"$ref":"#/components/schemas/UnrenderedDecoration"}}}},"SmartObject":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the smart object / print area. Use this as `smart_objects[].uuid` in the Render API."},"name":{"type":"string","description":"Name of the print area (e.g. \"Front\", \"All-over\")."},"kind":{"type":"string","enum":["product_all_over"],"description":"Present as `product_all_over` only on the product-wide full-canvas entry; absent on conventional named areas."},"size":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}}},"position":{"type":"object","properties":{"top":{"type":"integer"},"left":{"type":"integer"}}},"print_area_presets":{"type":"array","description":"Always empty for MockAnything mockups.","items":{}},"decoration":{"type":"object","description":"The named decoration area this smart object renders. Absent when `kind` is `product_all_over`, even when the MockAnything mockup is product-grounded.","properties":{"location":{"type":"string","description":"Decoration area location. Matches a `decorations[].location` from the product detail endpoint."},"name":{"type":"string","description":"Human-readable area label."}}}}},"Collection":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"Product":{"type":"object","properties":{"name":{"type":"string"},"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"subcategory":{"type":["string","null"]},"colors":{"type":"array","items":{"type":"object"}},"uuid":{"type":["string","null"],"description":"Canonical MockAnything product UUID when present. Legacy or alias-mapped identifiers may resolve as null."},"slug":{"type":["string","null"],"description":"Canonical human-readable product slug when present. Legacy or alias-mapped identifiers may resolve as null."}}},"UnrenderedDecoration":{"type":"object","properties":{"location":{"type":"string"},"reason":{"type":"string","description":"Open string describing why the requested decoration did not render. Known values:\n`not_visible_in_generated_image` means the area has placed render geometry but is hidden in this generated image.\n`no_placed_print_area_for_location` means the product has no placed print-area geometry for the requested location at product or profile tier.\nClients must treat unknown reason values as \"not rendered, place no artwork.\"\n"}}}}},"paths":{"/mock-anything/status/{taskId}":{"get":{"summary":"Get MockAnything AI Mockup Status","description":"Poll the status of a MockAnything AI mockup creation task. The response contains a `state` field:\n\n- `PROGRESS`: the task is still running. `image_url` and `mockup` are `null`.\n- `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.\n\nOther states (e.g. `FAILURE`) indicate the task terminated without producing a mockup.\n","operationId":"getMockAnythingMockupStatus","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"API key required for authentication."},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","format":"uuid"},"description":"The `task_id` returned from `POST /mock-anything/create`."}],"responses":{"200":{"description":"Task status retrieved successfully. Response shape depends on task `state`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StatusProgressResponse"},{"$ref":"#/components/schemas/StatusSuccessResponse"}]}}}},"401":{"description":"Unauthorized request, invalid or missing API key."},"500":{"description":"Failed to retrieve task status from the rendering service."}}}}}}
```

## Search POD Products

> 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).<br>

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups MockAnything AI API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}},"schemas":{"PodProduct":{"type":"object","properties":{"name":{"type":"string","description":"Product name."},"uuid":{"type":"string","format":"uuid","description":"Product UUID. Pass as `product.uuid` when creating a mockup."}}}}},"paths":{"/mock-anything/products":{"get":{"summary":"Search POD Products","description":"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).\n","operationId":"searchMockAnythingProducts","parameters":[{"in":"header","name":"Accept","required":false,"schema":{"type":"string","enum":["application/json"]},"description":"JSON is recommended; errors return JSON regardless of this header."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"API key required for authentication."},{"in":"query","name":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Search term matched against POD product names."}],"responses":{"200":{"description":"POD products matching the query.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PodProduct"}},"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized request, invalid or missing API key."},"422":{"description":"Validation error. `query` is missing or empty."},"500":{"description":"Failed to fetch POD products."}}}}}}
```

## Get POD Product Details

> 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. Each decoration also lists the \`decoration\_methods\` its enabled stored sources claim and a \`default\_decoration\_method\` (null when the data carries none); \`candidate\_decoration\_methods\` are category-level class-profile guesses and do not count as support. A decoration with \`enabled: false\` reports no methods and no default.<br>

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups MockAnything AI API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}},"schemas":{"PodProductDetail":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"brand":{"type":["string","null"]},"style_code":{"type":["string","null"]},"category":{"type":["string","null"]},"subcategory":{"type":["string","null"]},"decorations":{"type":"array","description":"Decoration areas available on this product. For exact selection, pass a `position_id` and one of that position's `sources` when creating a mockup.","items":{"$ref":"#/components/schemas/DecorationArea"}},"colors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"hex":{"type":["string","null"]}}}},"supported_sizes":{"type":"array","items":{"type":"string"}}}},"DecorationArea":{"type":"object","properties":{"position_id":{"type":"string","description":"Exact stored decoration position identifier. Pass as `decorations[].position_id` when exact position selection is required."},"location":{"type":"string","description":"Canonical decoration area identifier. Pass as `decorations[].location` for legacy canonical selection."},"name":{"type":"string","description":"Human-readable area label."},"surface":{"type":"string","description":"Product surface the area belongs to."},"sources":{"type":"array","description":"Deduplicated enabled provider source identifiers available for this exact position. Pass one as `decorations[].source`.","items":{"type":"string"}},"enabled":{"type":"boolean","description":"False only when the position is explicitly disabled. A disabled position reports empty `decoration_methods` and `candidate_decoration_methods` and a null `default_decoration_method`."},"decoration_methods":{"type":"array","description":"Decoration methods claimed by this position's enabled stored sources, in the canonical vocabulary (lowercase, `_` separated; e.g. `embroidery`, `screen_print`, `sublimation`, `laser_engraving`, `dtg`, `heat_transfer`). Empty when the catalog data names none.","items":{"type":"string"}},"default_decoration_method":{"type":["string","null"],"description":"Default method of the position's first enabled stored source. `null` when the catalog data carries none; it is never inferred."},"candidate_decoration_methods":{"type":"array","description":"Methods suggested by the product's class-profile guesses only (evidence type `class_profile_candidate`). These are guesses, not supplier claims, and do not count as support for the `decoration_method` check on create.","items":{"type":"string"}}}}}},"paths":{"/mock-anything/products/{uuid}":{"get":{"summary":"Get POD Product Details","description":"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. Each decoration also lists the `decoration_methods` its enabled stored sources claim and a `default_decoration_method` (null when the data carries none); `candidate_decoration_methods` are category-level class-profile guesses and do not count as support. A decoration with `enabled: false` reports no methods and no default.\n","operationId":"getMockAnythingProductDetail","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"API key required for authentication."},{"in":"path","name":"uuid","required":true,"schema":{"type":"string","format":"uuid"},"description":"UUID of the POD product (from `GET /mock-anything/products`)."}],"responses":{"200":{"description":"Product detail retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PodProductDetail"},"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized request, invalid or missing API key."},"404":{"description":"Product not found."},"500":{"description":"Failed to fetch the product detail."}}}}}}
```

## List Available Styles

> 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.<br>

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups MockAnything AI API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}},"schemas":{"Style":{"type":"object","properties":{"id":{"type":"string","description":"Style identifier. Pass as `style` when creating a mockup."},"description":{"type":"string","description":"Short description of the aesthetic this style produces."},"available_with":{"type":"array","description":"Models that support this style.","items":{"type":"string"}}}}}},"paths":{"/mock-anything/styles":{"get":{"summary":"List Available Styles","description":"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.\n","operationId":"listMockAnythingStyles","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"API key required for authentication."},{"in":"query","name":"model","required":false,"schema":{"type":"string","enum":["nano_banana_2","nano_banana_lite","seedream_4_0","seedream_4_5","gpt_image_2"]},"description":"Optional model filter. When provided, only styles available for that model are returned."}],"responses":{"200":{"description":"Available styles.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Style"}},"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request. Invalid `model` value."},"401":{"description":"Unauthorized request, invalid or missing API key."},"500":{"description":"Failed to fetch styles."}}}}}}
```

### 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](https://docs.dynamicmockups.com/api-reference/get-mockups-api.md) - you pass its `uuid` to the [Render Mockup API](https://docs.dynamicmockups.com/api-reference/render-api.md) 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](https://docs.dynamicmockups.com/api-reference/render-api.md).

### 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.

{% hint style="info" %}
`product.uuid`, `model`, and `enhance_prompt` only apply to the `prompt` flow. They're ignored when you send `image_url` or `image_file`.
{% endhint %}

### 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](https://docs.dynamicmockups.com/api-reference/render-api.md).
* `FAILURE` - the task terminated without producing a mockup.

{% hint style="info" %}
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.
{% endhint %}

### Using your new mockup

Once `state` is `SUCCESS`, the `mockup` field looks identical to an entry from the [Get Mockups API](https://docs.dynamicmockups.com/api-reference/get-mockups-api.md), with `type: "mockanything"`. Three fields matter for rendering:

* `mockup.uuid` - pass as `mockup_uuid` in the [Render Mockup API](https://docs.dynamicmockups.com/api-reference/render-api.md).
* `mockup.smart_objects[].uuid` - each print area detected on the image. Reference these as `smart_objects[].uuid` in the [Render Mockup API](https://docs.dynamicmockups.com/api-reference/render-api.md) 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](https://docs.dynamicmockups.com/api-reference/render-api.md) 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.

{% hint style="info" %}
Grounding is optional. Skip it if you just want the model to pick a natural composition based on the prompt alone.
{% endhint %}

### 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}`&#x20;

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:

```json
{
    "decorations": [
      { "location": "front_full_chest", "name": "Full Chest", "surface": "front" },
      { "location": "left_chest", "name": "Left Chest", "surface": "front" },
      { "location": "back_full", "name": "Full Back", "surface": "back" }
    ]
}
```

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

```json
{
    "prompt": "a person wearing a t-shirt in a sunny park",
    "model": "nano_banana_2",
    "product": {
      "uuid": "8429f141-5289-4d3b-9a83-7417130adc3a",
      "decorations": [
        { "location": "front_full_chest" }
      ]
    }
}
```

{% hint style="info" %}
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.
{% endhint %}

### 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`&#x20;

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`.

{% hint style="info" %}
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`
{% endhint %}

### 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](https://docs.dynamicmockups.com/api-reference/catalogs-api.md) 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](https://docs.dynamicmockups.com/api-reference/get-collections-api.md) to manage collections.

{% hint style="info" %}
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.
{% endhint %}

### 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.

<table><thead><tr><th>Model</th><th data-type="number">Credits</th><th>Speed</th><th>Quality</th><th>Best for</th></tr></thead><tbody><tr><td>seedream_4_0</td><td>5</td><td>~20s</td><td>Medium</td><td>Quick iterations and early exploration</td></tr><tr><td>seedream_4_5</td><td>6</td><td>~40s</td><td>Good</td><td>Higher fidelity without the pro price</td></tr><tr><td>nano_banana_2</td><td>14</td><td>~30s</td><td>High</td><td>Production-quality, final mockups</td></tr></tbody></table>

{% hint style="info" %}
Credits are charged when the task reaches `SUCCESS`. Failed generations (`FAILURE` state) don't cost anything.
{% endhint %}

{% hint style="info" %}
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.
{% endhint %}

### 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.
