---
title: "Create a mockup from a product photo"
method: POST
path: "/api/v1/sudoai/2d-mockups"
tags: ["Photo mockups"]
deprecated: true
---

# Create a mockup from a product photo

`POST /api/v1/sudoai/2d-mockups`

## Request

- Base URL: `https://api.sudomock.com`
- URL: `https://api.sudomock.com/api/v1/sudoai/2d-mockups`
- Auth: API key in header `x-api-key`

> **Deprecated.**

Turns one product photo into a reusable mockup. By default the request returns the ready mockup; set is_async=true to receive a job URL. Costs 25 credits.

## Request body

- PhotoMockupCreateRequest: Create a reusable photo mockup from one source image.
  - `source_url` string, nullable: Public HTTPS URL of the source image.
  - `source_base64` string, nullable: Base64-encoded source image, with or without a data URL prefix.
  - `name` string, nullable: Optional display name for the mockup.
  - `is_async` boolean: If true, the mockup is QUEUED and the call returns 202 immediately with a job_id (poll GET /api/v1/jobs/{job_id}, or receive a webhook if one is configured); result_url carries the new mockup_uuid on success. If false (default), the create runs synchronously and returns the mockup.
  - `print_areas` PhotoMockupPrintAreaInput[], nullable: Optional: 1-8 convex four-point printable areas in source-image pixels. When provided, these areas are used verbatim and automatic print-area detection is skipped.
    - `points` array[], required: Four [x, y] points in image coordinates.
      - number[]
    - `name` string, nullable: Optional print-area label, e.g. "Front" or "Back".

## Response `201`

Successful Response

- PhotoMockupDetailResponse
  - `data` PhotoMockupDetail, required
    - `mockup_id` string, required: Unique identifier for the mockup.
    - `name` string, required: Display name of the mockup.
    - `status` string, required: Preparation state of the mockup: draft, processing, ready or error.
    - `customizable` boolean, required: Whether the mockup is ready to accept artwork.
    - `thumbnail_url` string, nullable: URL of the mockup's thumbnail image.
    - `source_width` integer, nullable: Width of the source image in pixels.
    - `source_height` integer, nullable: Height of the source image in pixels.
    - `quads` PhotoMockupPrintArea[]: Printable areas saved on this mockup.
      - `print_area_id` string, required: Unique identifier for the print area.
      - `points` array[], nullable: The area's four [x, y] corner points in source image pixels.
        - number[]
      - `name` string, nullable: Label for the print area, such as 'Front'.
      - `sort_order` integer: Position of this print area in the mockup's own order, starting at 0.
    - `surfaces` PhotoMockupSurface[]: Printable product surfaces in the photo, each addressable as a render target.
      - `surface_uuid` string, required: Unique identifier for the printable product surface.
      - `points` array[], nullable: Outline of the surface as [x, y] points in source image pixels.
        - number[]
      - `bbox` object, nullable: Box enclosing the surface, with x, y, width and height in source pixels.
    - `version` integer: Version of this mockup's saved definition.
    - `created_at` string, date-time, required: When the mockup was created.
    - `updated_at` string, date-time, required: When the mockup was last updated.
  - `success` true: Always true on a successful response.

## Other responses

- `202`: Async creation job accepted

---

[API](https://skmtc.dev/sudomock/apis/sudomock-api.md) · [All operations](https://skmtc.dev/sudomock/apis/sudomock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sudomock/apis/sudomock-api/revisions/c1cc24006c60?raw)
