Flat lay to model

Start a new job

This endpoint takes flat/article images (SKUs) and generates Product Detail Page images with the specified model identity wearing the articles.

Unlike model_swap (1 input → 1 output), flat_2_model combines ALL input images and generates multiple outputs based on the instructions list:

  • N input SKU images + M instructions → M output images
POST
/flat-2-model
AuthorizationBearer <token>

Token-based authentication using access tokens.

In: header

identity_codeIdentity Code

The identity code of the model to use for generating PDP images.

project_idProject Id

The project identifier where SKU/article images are stored.

imagesImages

List of SKU/article image UUIDs - ALL images are combined for each output.

Items1 <= items <= 10
instructions?Instructions

List of instructions - each instruction produces ONE output image. The number of instructions determines the number of output images (parallel workers). If empty, a single default instruction will be used.

Items1 <= items <= 10
post_process?Post Process

Enables or disables post processing for all images in the batch.

Defaultfalse
options?Options

Global options applied to all instructions (can be overridden per-instruction).

Default{}

Empty Object

review_config?Review Config

Optional review configuration. If provided, creates a review pipeline for this job. Fields: requires_review (bool), default_reviewer_type (str), default_retouch_method (str), auto_approve_threshold (float).

Defaultnull

Response Body

Examples

curl -X POST "https://v2.api.piktid.com/flat-2-model" \
  -H "Content-Type: application/json" \
  -d '{
    "identity_code": "string",
    "project_id": "string",
    "images": [
      "string"
    ]
  }'
{
  "job_id": "string",
  "status": "string",
  "message": "string",
  "total_outputs": 0
}
{
  "error": "Invalid request",
  "detail": [
    {
      "field": null,
      "message": "string",
      "position": "query"
    }
  ]
}
Empty
Empty
Empty
Empty