---
title: "Create MockAnything AI Mockup"
method: POST
path: "/mock-anything/create"
---

# Create MockAnything AI Mockup

`POST /mock-anything/create`

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.

## Headers

- `Accept` 'application/json', required
- `x-api-key` string, required

## Request body

- object
  - `prompt` string — Text prompt used to AI-generate the mockup image. Required unless `image_url` or `image_file` is provided.
  - `image_url` string, uri — URL of an existing image to use as the mockup image. Required unless `prompt` or `image_file` is provided.
  - `enhance_prompt` boolean — Whether to run prompt enhancement before generation. Only applies to the `prompt` flow.
  - `product` object — Optional product context used to ground the AI generation.
    - `uuid` string, uuid — UUID of a POD product (obtained via `GET /mock-anything/products`) to anchor the AI generation around a specific product type.
    - `selected_size` string — 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`.
    - `decorations` DecorationInput[] — Optional list of decoration areas to place on the product. Each item targets a `location` (from `GET /mock-anything/products/{uuid}`) with an optional decoration method and imprint size. When omitted, the product's default decoration area is used.
      - `location` string — Decoration area to target, from `GET /mock-anything/products/{uuid}`. When omitted, the product's default decoration area is used.
      - `decoration_method` string — Decoration method to apply (e.g. `dtg`, `screen_print`, `embroidery`, `dtf`, `heat_transfer`).
      - `imprint_size` object — Desired physical imprint size.
        - `width` number
        - `height` number
        - `unit` string
  - `model` 'nano_banana_2' | 'nano_banana_lite' | 'seedream_4_0' | 'seedream_4_5' | 'gpt_image_2' — 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).
  - `style` string — 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` string — Optional mockup name shown in the dashboard and returned in the `mockup.name` field.
  - `collections` object[] — 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.
    - `uuid` string, uuid — UUID of an existing collection.
    - `name` string — Name of a new collection to create and attach.
  - `catalog_uuid` string, uuid — Optional UUID of the catalog the mockup belongs to. Defaults to the workspace's default catalog.

## Response `200`

Template creation started.

- object
  - `data` object
    - `task_id` string, uuid — 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` string — Initial task status.
    - `selected_size` string, nullable — 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` string, nullable — Echoes the requested `aspect_ratio` value from the create request. The mockup has not run yet.
    - `warnings` MockAnythingWarning[] — Non-blocking create-time warnings. A warning does not reject the request.
      - `location` string — Requested decoration location that triggered the warning.
      - `code` string — Machine-readable warning code.
      - `message` string — Partner-facing warning message.
  - `success` boolean
  - `message` string

## Other responses

- `400` — Bad request due to invalid input parameters (e.g. missing prompt/image_url/image_file, invalid model, unsupported image type).
- `401` — Unauthorized request, invalid or missing API key.
- `403` — No credits available, or the authenticated user does not have access to the provided catalog or collection.
- `404` — The provided `catalog_uuid` or a `collections[].uuid` could not be found.
- `500` — Failed to start AI generation or upload the provided image.

---

[API](https://skmtc.dev/dynamicmockups/apis/dynamic-mockups-mockanything-ai-api.md) · [All operations](https://skmtc.dev/dynamicmockups/apis/dynamic-mockups-mockanything-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dynamicmockups/dynamic-mockups-mockanything-ai-api/revisions/5582facc8ca8/schema)
