Skip to content

Generation Endpoints

Image generation tasks, predictions, refinements, and training.


Overview

Generations

Method Endpoint Description
GET /generations/ List generations
POST /generations/ Create generation
GET /generations/{id} Get generation
POST /generations/{id}/cancel Cancel generation

Predictions

Method Endpoint Description
GET /predictions/ List predictions
GET /predictions/{id} Get prediction
POST /predictions/{id}/select Select prediction

Refines

Method Endpoint Description
GET /refines/ List refine tasks
POST /refines/ Create refine task
GET /refines/{id} Get refine task

Training

Method Endpoint Description
GET /training/ List training jobs
POST /training/ Start training
GET /training/{id} Get training status
POST /training/{id}/cancel Cancel training

API Reference

Sartiq Backend Server - Generation 0.1.0

generations


POST /api/v1/generations/

Create Generation

Description

Create new generation (normal or agentic).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
v query string 1 No

Request body

{
    "batch_size": 0,
    "negative_prompt": null,
    "subject_id": null,
    "subject_slug": null,
    "product_id": null,
    "product_slug": null,
    "product_image": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_slug": null,
    "product2_image": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_slug": null,
    "style_lora_weight": 10.12,
    "width": null,
    "height": null,
    "steps": 0,
    "seed": null,
    "refine": true,
    "scale_factor": null,
    "target_width": null,
    "target_height": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "extra_prompt": null,
    "generated_prompt": null,
    "auto_generate_prompt": true,
    "generation_type": null,
    "generation_strategy": null,
    "tool": null,
    "shot_type_string": null,
    "shot_type": null,
    "shot_type_id": null,
    "pose_preset_id": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "subject_lora_enabled": true,
    "product_lora_enabled": true,
    "product2_lora_enabled": true,
    "style_lora_enabled": true,
    "subject_lora_trigger": null,
    "product_lora_trigger": null,
    "product2_lora_trigger": null,
    "style_lora_trigger": null,
    "subject_gender": null,
    "product_gender": null,
    "status": null,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "autogenerated": true,
    "config": null,
    "reference_image_strength": null,
    "generative_models_id": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "default": 4
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "subject_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Slug"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "product_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Slug"
        },
        "product_image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 0.9
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Slug"
        },
        "product2_image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 0.8
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Slug"
        },
        "style_lora_weight": {
            "type": "number",
            "title": "Style Lora Weight",
            "default": 0.7
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps",
            "default": 20
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "target_width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Width"
        },
        "target_height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Height"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "auto_generate_prompt": {
            "type": "boolean",
            "title": "Auto Generate Prompt",
            "default": true
        },
        "generation_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationType"
                },
                {
                    "type": "null"
                }
            ],
            "default": "BASE"
        },
        "generation_strategy": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationStrategy"
                },
                {
                    "type": "null"
                }
            ],
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "shot_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type"
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "pose_preset_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose Preset Id"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "subject_lora_enabled": {
            "type": "boolean",
            "title": "Subject Lora Enabled",
            "default": true
        },
        "product_lora_enabled": {
            "type": "boolean",
            "title": "Product Lora Enabled",
            "default": false
        },
        "product2_lora_enabled": {
            "type": "boolean",
            "title": "Product2 Lora Enabled",
            "default": false
        },
        "style_lora_enabled": {
            "type": "boolean",
            "title": "Style Lora Enabled",
            "default": false
        },
        "subject_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Lora Trigger"
        },
        "product_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Lora Trigger"
        },
        "product2_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Lora Trigger"
        },
        "style_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Lora Trigger"
        },
        "subject_gender": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Gender"
        },
        "product_gender": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Gender"
        },
        "status": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationStatus"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "config": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Config"
        },
        "reference_image_strength": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 100.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Image Strength",
            "description": "Influence of the reference image on generation (0-100)"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "title": "GenerationCreate",
    "description": "Schema for creating a new generation."
}

Responses

{
    "id": "43adcbcd-6f05-4a61-a544-e0030395193e",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "61216b1c-edfd-4120-8d1f-f8d55aeca0c9",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "02d10c4e-f191-44e9-992d-2db36d779fb0",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "0684fb6b-ed01-4ff9-bfbd-1e8ba21bb564",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "6e1c2ab8-6074-4e8d-b008-8456e3ca4600",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "3f335ecc-da2a-4ac0-8cae-9427078b1787",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generations/

Read Generations

Description

Retrieve generations with optional filtering. Results are ordered by creation date descending and include pagination metadata.

When organization_id query param is provided, returns generations belonging to that organization. Without organization_id, returns only personal generations (not belonging to any organization).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
created_at_from query No Filter generations created after this date
created_at_to query No Filter generations created before this date
generation_type query No Filter by generation type (BASE or AGENTIC)
limit query integer 100 No
organization_id query No
product_id query No Filter by product ID (searches both product_id and product2_id)
refined_only query No Filter to only include generations with predictions that have at least one refine
shot_id query No Filter by shot ID
shot_type_id query No Filter by shot type ID
shot_type_string query No Filter by shot type name
skip query integer 0 No
status query No Filter by generation status
style_id query No Filter by style ID
subject_id query No Filter by subject ID
tools query No Filter by one or more generation tool types (OR logic)

Responses

{
    "data": [
        {
            "id": "cb8c36f7-0dcc-4131-870c-6e0d309116e0",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "batch_size": 0,
            "status": "PENDING",
            "negative_prompt": null,
            "subject_id": null,
            "product_id": null,
            "subject_image_url": null,
            "product_image_url": null,
            "product_lora_weight": 10.12,
            "subject_lora_weight": 10.12,
            "product2_id": null,
            "product2_image_url": null,
            "product2_lora_weight": 10.12,
            "style_id": null,
            "style_name": null,
            "width": 0,
            "height": 0,
            "steps": 0,
            "seed": 0,
            "refine": true,
            "revised": true,
            "scale_factor": null,
            "lighting": null,
            "framing": null,
            "perspective": null,
            "background": null,
            "tone": null,
            "pose": null,
            "generated_prompt": null,
            "extra_prompt": null,
            "predictions": [
                {
                    "seed": 0,
                    "status": "pending",
                    "result_image_url": null,
                    "result_video_url": null,
                    "duration_seconds": null,
                    "favourite": true,
                    "error_message": null,
                    "error_category": null,
                    "id": "72ac79ea-6f9c-4917-a126-fc501474502b",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "generation_id": "010ee9ad-862d-4c2e-98ca-e344cc3fb729",
                    "shot_type": null,
                    "refines": [
                        {
                            "status": "pending",
                            "result_image_url": null,
                            "width": null,
                            "height": null,
                            "scale_factor": null,
                            "prompt": null,
                            "refine_model_id": null,
                            "error_message": null,
                            "error_category": null,
                            "refines_refine_id": null,
                            "id": "fe3f99d6-8fe9-43c6-aced-1538455f9a6a",
                            "created_at": "2022-04-13T15:42:05.901Z",
                            "updated_at": "2022-04-13T15:42:05.901Z",
                            "prediction_id": "2860f3a1-ebf2-4a8d-9d2b-2e1299b63f58",
                            "task_id": null,
                            "result_image_media": null
                        }
                    ],
                    "result_image_media": null,
                    "result_video_media": null,
                    "refined_image_url": null
                }
            ],
            "owner_id": "6023c0a2-65c0-4d35-b8a9-f772afc67bc4",
            "shot_id": null,
            "generation_type": "BASE",
            "generation_strategy": "GENERATE",
            "tool": null,
            "shot_type_id": null,
            "shot_type_string": null,
            "subject_description": null,
            "product_description": null,
            "product2_description": null,
            "style_description": null,
            "has_subject_lora": true,
            "has_product_lora": true,
            "has_product2_lora": true,
            "has_style_lora": true,
            "garment_placement_base_image_url": null,
            "reference_images_paths": [
                "string"
            ],
            "generative_models_id": null,
            "autogenerated": true,
            "shooting_look_id": null,
            "organization_id": null,
            "subject_image_media": null,
            "product_image_media": null,
            "product2_image_media": null,
            "garment_placement_base_image_media": null,
            "reference_images_media": null
        }
    ],
    "count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/GenerationPublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "GenerationsPublic",
    "description": "Schema for paginated generation responses with count."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generations/{id}

Read Generation

Description

Get generation by ID.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No
organization_id query No

Responses

{
    "id": "3fffafb8-e32f-4b52-9cca-4780fcfdb814",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "3e224430-0ccd-4912-9ec7-35e3cf4fcbd9",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "3be22c70-1623-47ec-992c-659a19a29946",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "2133796a-8b79-4649-a6d9-31dafd495b45",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "4b37b158-98b2-44fa-ace3-65fa1d48e83c",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "ccab3622-83f2-462a-bb4b-b87e04dbadeb",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/generations/{id}

Delete Generation

Description

Delete a generation and all its associated predictions and images.

This endpoint properly cleans up: - All predictions associated with the generation - Temporary files (garment placement images, reference images) - Prediction result images - Empty directories after file deletion

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No

Responses

{
    "message": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "message": {
            "type": "string",
            "title": "Message"
        }
    },
    "type": "object",
    "required": [
        "message"
    ],
    "title": "Message"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PATCH /api/v1/generations/{id}

Update Generation

Description

Update a generation (currently only 'revised' field).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No

Request body

{
    "revised": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "revised": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Revised"
        }
    },
    "type": "object",
    "title": "GenerationUpdate",
    "description": "Schema for updating a generation."
}

Responses

{
    "id": "d7a08326-34e6-43bc-9377-10c5df45d1b1",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "432601a3-5ca8-4195-a067-8de6b2e1aabb",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "1e57a658-dcf1-4614-88e7-1442b03ae19d",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "80ba8bef-724b-4b0b-b0bb-e19d471fcaa9",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "e6e6f2a8-7265-4f9f-b191-1a843ba16a75",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "cf1c6e05-71b9-41b8-b294-b727ed98214a",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generations/{id}/stats

Get Generation Stats

Description

Get the statistics of a generation including predictions status.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No
organization_id query No

Responses

{
    "id": "6d9c44ea-d4d2-4714-acca-e55dceca7026",
    "status": "PENDING",
    "total": 0,
    "completed": 0,
    "error": 0,
    "latest_prediction_status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus"
        },
        "total": {
            "type": "integer",
            "title": "Total"
        },
        "completed": {
            "type": "integer",
            "title": "Completed"
        },
        "error": {
            "type": "integer",
            "title": "Error"
        },
        "latest_prediction_status": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/PredictionStatus"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "id",
        "status",
        "total",
        "completed",
        "error"
    ],
    "title": "GenerationStats",
    "description": "Schema for generation statistics."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/by-ids

Get Generations By Ids

Description

Fetch specific generations by their IDs. Only returns generations owned by the current user.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

[
    "7dc841e8-3eaa-4411-8ba2-8151a272e34b"
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "items": {
        "type": "string",
        "format": "uuid"
    },
    "type": "array",
    "title": "Generation Ids"
}

Responses

[
    {
        "id": "12a65ba8-b5a7-457e-a62e-f1ca9c927ab4",
        "created_at": "2022-04-13T15:42:05.901Z",
        "updated_at": "2022-04-13T15:42:05.901Z",
        "batch_size": 0,
        "status": "PENDING",
        "negative_prompt": null,
        "subject_id": null,
        "product_id": null,
        "subject_image_url": null,
        "product_image_url": null,
        "product_lora_weight": 10.12,
        "subject_lora_weight": 10.12,
        "product2_id": null,
        "product2_image_url": null,
        "product2_lora_weight": 10.12,
        "style_id": null,
        "style_name": null,
        "width": 0,
        "height": 0,
        "steps": 0,
        "seed": 0,
        "refine": true,
        "revised": true,
        "scale_factor": null,
        "lighting": null,
        "framing": null,
        "perspective": null,
        "background": null,
        "tone": null,
        "pose": null,
        "generated_prompt": null,
        "extra_prompt": null,
        "predictions": [
            {
                "seed": 0,
                "status": "pending",
                "result_image_url": null,
                "result_video_url": null,
                "duration_seconds": null,
                "favourite": true,
                "error_message": null,
                "error_category": null,
                "id": "f2faefa4-6fa7-4401-b231-f06bf2937cc0",
                "created_at": "2022-04-13T15:42:05.901Z",
                "updated_at": "2022-04-13T15:42:05.901Z",
                "generation_id": "86a7a797-1324-429a-806c-039847a79341",
                "shot_type": null,
                "refines": [
                    {
                        "status": "pending",
                        "result_image_url": null,
                        "width": null,
                        "height": null,
                        "scale_factor": null,
                        "prompt": null,
                        "refine_model_id": null,
                        "error_message": null,
                        "error_category": null,
                        "refines_refine_id": null,
                        "id": "4668a750-255f-45c4-9fad-496a70d295eb",
                        "created_at": "2022-04-13T15:42:05.901Z",
                        "updated_at": "2022-04-13T15:42:05.901Z",
                        "prediction_id": "3187f6d3-7c51-487d-94a4-93b828572d4b",
                        "task_id": null,
                        "result_image_media": null
                    }
                ],
                "result_image_media": null,
                "result_video_media": null,
                "refined_image_url": null
            }
        ],
        "owner_id": "ba824759-0fa0-4a88-8dd4-e9637c30d38c",
        "shot_id": null,
        "generation_type": "BASE",
        "generation_strategy": "GENERATE",
        "tool": null,
        "shot_type_id": null,
        "shot_type_string": null,
        "subject_description": null,
        "product_description": null,
        "product2_description": null,
        "style_description": null,
        "has_subject_lora": true,
        "has_product_lora": true,
        "has_product2_lora": true,
        "has_style_lora": true,
        "garment_placement_base_image_url": null,
        "reference_images_paths": [
            "string"
        ],
        "generative_models_id": null,
        "autogenerated": true,
        "shooting_look_id": null,
        "organization_id": null,
        "subject_image_media": null,
        "product_image_media": null,
        "product2_image_media": null,
        "garment_placement_base_image_media": null,
        "reference_images_media": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/GenerationPublic"
    },
    "type": "array",
    "title": "Response Get Generations By Ids"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/agentic

Create Agentic Generation

Description

Create a new agentic generation with intelligent retry logic.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "batch_size": 0,
    "negative_prompt": null,
    "subject_id": null,
    "subject_slug": null,
    "product_id": null,
    "product_slug": null,
    "product_image": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_slug": null,
    "product2_image": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_slug": null,
    "style_lora_weight": 10.12,
    "width": null,
    "height": null,
    "steps": 0,
    "seed": null,
    "refine": true,
    "scale_factor": null,
    "target_width": null,
    "target_height": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "extra_prompt": null,
    "generated_prompt": null,
    "auto_generate_prompt": true,
    "generation_type": "BASE",
    "generation_strategy": null,
    "tool": null,
    "shot_type_string": null,
    "shot_type": "string",
    "shot_type_id": null,
    "pose_preset_id": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "subject_lora_enabled": true,
    "product_lora_enabled": true,
    "product2_lora_enabled": true,
    "style_lora_enabled": true,
    "subject_lora_trigger": null,
    "product_lora_trigger": null,
    "product2_lora_trigger": null,
    "style_lora_trigger": null,
    "subject_gender": null,
    "product_gender": null,
    "status": null,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "autogenerated": true,
    "config": null,
    "reference_image_strength": null,
    "generative_models_id": null,
    "organization_id": null,
    "max_attempts": null,
    "min_confidence_score": null,
    "evaluation_provider": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "default": 4
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "subject_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Slug"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "product_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Slug"
        },
        "product_image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 0.9
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Slug"
        },
        "product2_image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 0.8
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Slug"
        },
        "style_lora_weight": {
            "type": "number",
            "title": "Style Lora Weight",
            "default": 0.7
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps",
            "default": 20
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "target_width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Width"
        },
        "target_height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Height"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "auto_generate_prompt": {
            "type": "boolean",
            "title": "Auto Generate Prompt",
            "default": true
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "AGENTIC"
        },
        "generation_strategy": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationStrategy"
                },
                {
                    "type": "null"
                }
            ],
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "shot_type": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Shot Type",
            "description": "Expected shot type (e.g., 'front_full_body', 'side_upper_body')",
            "default": "front_upper_body"
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "pose_preset_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose Preset Id"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "subject_lora_enabled": {
            "type": "boolean",
            "title": "Subject Lora Enabled",
            "default": true
        },
        "product_lora_enabled": {
            "type": "boolean",
            "title": "Product Lora Enabled",
            "default": false
        },
        "product2_lora_enabled": {
            "type": "boolean",
            "title": "Product2 Lora Enabled",
            "default": false
        },
        "style_lora_enabled": {
            "type": "boolean",
            "title": "Style Lora Enabled",
            "default": false
        },
        "subject_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Lora Trigger"
        },
        "product_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Lora Trigger"
        },
        "product2_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Lora Trigger"
        },
        "style_lora_trigger": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Lora Trigger"
        },
        "subject_gender": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Gender"
        },
        "product_gender": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Gender"
        },
        "status": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationStatus"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "config": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Config"
        },
        "reference_image_strength": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 100.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Image Strength",
            "description": "Influence of the reference image on generation (0-100)"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        },
        "max_attempts": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 20.0,
                    "minimum": 1.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Max Attempts",
            "description": "Maximum retry attempts (defaults to orchestrator config)"
        },
        "min_confidence_score": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Min Confidence Score",
            "description": "Minimum confidence score for acceptance (defaults to 0.7)"
        },
        "evaluation_provider": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Evaluation Provider",
            "description": "AI provider for evaluation (anthropic, gemini, openai, mock)"
        }
    },
    "type": "object",
    "title": "AgenticGenerationCreate",
    "description": "Request model for creating an agentic shot generation.\n\nThis extends GenerationCreate to include orchestrator-specific settings\nwhile maintaining compatibility with the standard generation flow."
}

Responses

{
    "id": "adc2eaf4-13bb-4b2e-9365-a9a52330f7bb",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "9cb3bc6e-a979-44d7-b150-319fb9120d14",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "5b1bcd9d-dbfa-40ed-9907-73ef95df835b",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "5e3a9a3c-c6c1-4d58-a27f-41eef4ddc87f",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "15bfa9cd-c703-413e-baf6-f792a2d3b1ac",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "89b4b1bc-9cd4-4e5c-98e0-ecaeabe05407",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null,
    "orchestration_shot_id": "string",
    "orchestration_status": "string",
    "message": "string",
    "estimated_completion_time": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        },
        "orchestration_shot_id": {
            "type": "string",
            "title": "Orchestration Shot Id",
            "description": "Unique identifier for the shot orchestration tracking"
        },
        "orchestration_status": {
            "type": "string",
            "title": "Orchestration Status",
            "description": "Orchestration status (processing, completed, failed)",
            "default": "processing"
        },
        "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message",
            "default": "Shot orchestration started"
        },
        "estimated_completion_time": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Estimated Completion Time",
            "description": "Estimated completion time in seconds"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id",
        "orchestration_shot_id"
    ],
    "title": "AgenticGenerationResponse",
    "description": "Response model for creating an agentic shot generation.\n\nThis extends GenerationPublic to provide 1-1 compatibility with the standard\ngeneration endpoint while adding orchestrator-specific fields."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generations/agentic/{shot_id}/status

Get Agentic Generation Status

Description

Get the current status and progress of an agentic shot orchestration.

This is a temporary endpoint that will be replaced with generation-based status. For now, it returns basic information from the OrchestratedShot table.

Input parameters

Parameter In Type Default Nullable Description
shot_id path string No

Responses

{
    "shot_id": "string",
    "status": "string",
    "total_attempts": 0,
    "max_attempts": 0,
    "current_attempt": null,
    "final_image_url": null,
    "best_confidence": null,
    "error_message": null,
    "started_at": null,
    "completed_at": null,
    "duration_seconds": null,
    "attempts": [
        {
            "attempt_number": 0,
            "image_url": null,
            "error_message": null,
            "started_at": null,
            "completed_at": null,
            "generation_metadata": {},
            "evaluation_status": null,
            "confidence_score": null,
            "detected_shot_type": null,
            "evaluation_feedback": null
        }
    ],
    "orchestration_metadata": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "shot_id": {
            "type": "string",
            "title": "Shot Id",
            "description": "Shot identifier"
        },
        "status": {
            "type": "string",
            "title": "Status",
            "description": "Current orchestration status"
        },
        "total_attempts": {
            "type": "integer",
            "title": "Total Attempts",
            "description": "Total number of attempts made",
            "default": 0
        },
        "max_attempts": {
            "type": "integer",
            "title": "Max Attempts",
            "description": "Maximum allowed attempts",
            "default": 3
        },
        "current_attempt": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Current Attempt",
            "description": "Current attempt number"
        },
        "final_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Final Image Url",
            "description": "Final selected image URL"
        },
        "best_confidence": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Best Confidence",
            "description": "Best confidence score achieved"
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message",
            "description": "Error message if failed"
        },
        "started_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Started At",
            "description": "When orchestration started"
        },
        "completed_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Completed At",
            "description": "When orchestration completed"
        },
        "duration_seconds": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration Seconds",
            "description": "Total duration in seconds"
        },
        "attempts": {
            "items": {
                "$ref": "#/components/schemas/AgenticShotAttempt"
            },
            "type": "array",
            "title": "Attempts",
            "description": "History of all generation attempts"
        },
        "orchestration_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Orchestration Metadata",
            "description": "Additional orchestration metadata"
        }
    },
    "type": "object",
    "required": [
        "shot_id",
        "status"
    ],
    "title": "AgenticShotStatus",
    "description": "Detailed status response for a shot orchestration."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/edits

Create Edit Generation

Description

Create generation for base editing or garment placement.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "batch_size": 0,
    "base_img_path": "string",
    "subject_id": null,
    "product_id": null,
    "prompt": null,
    "reference_images": [
        "string"
    ],
    "gender": null,
    "shot_type": null,
    "workflow": "BASE",
    "width": null,
    "height": null,
    "generative_models_id": null,
    "tool": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "description": "Batch size for the generation",
            "default": 1
        },
        "base_img_path": {
            "type": "string",
            "title": "Base Img Path",
            "description": "Path to the base image"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id",
            "description": "Subject ID for the edit"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id",
            "description": "Product ID for the edit"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Optional prompt for the operation"
        },
        "reference_images": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images",
            "description": "List of reference images for placement"
        },
        "gender": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Gender",
            "description": "Gender for AGENTIC generation"
        },
        "shot_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type",
            "description": "Shot type for AGENTIC generation"
        },
        "workflow": {
            "$ref": "#/components/schemas/GenerationType",
            "description": "Workflow type to use",
            "default": "BASE"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width",
            "description": "Image width (auto-determined if not provided)"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height",
            "description": "Image height (auto-determined if not provided)"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id",
            "description": "Optional generation model ID for the editing operation"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Tool type: EDIT (default), SUBJECT_SWAP, or PRODUCT_ENHANCEMENT"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "base_img_path"
    ],
    "title": "EditRequest",
    "description": "Schema for base editing and product placement operations."
}

Responses

{
    "id": "a8121c25-52a4-469f-a98f-5ac7f4b1b1cd",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "75653463-bf88-4416-8f2b-7f4b498f9bd8",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "a29091e8-b465-44ad-b9bb-49d3263ecd43",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "3d2ba053-92ac-4a0f-b8dc-94ef433367f1",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "36604c3c-dd3e-4a59-a480-a0cd4606d963",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "cc5baf53-81e5-4667-8fc2-c79ad5cb9bf5",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/videos

Create Video Generation

Description

Generate video from existing prediction or uploaded image.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "batch_size": 0,
    "prediction_id": null,
    "base_image_path": null,
    "prompt": "string",
    "negative_prompt": null,
    "cfg_scale": 10.12,
    "subject_id": null,
    "product_id": null,
    "product2_id": null,
    "style_id": null,
    "shot_type": null,
    "width": null,
    "height": null,
    "generative_models_id": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "description": "Batch size for the generation",
            "default": 1
        },
        "prediction_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prediction Id",
            "description": "Prediction ID containing the source image (inherits metadata)"
        },
        "base_image_path": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Base Image Path",
            "description": "Path to uploaded image (requires explicit metadata)"
        },
        "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Text prompt describing the desired video content"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Negative prompt for video generation"
        },
        "cfg_scale": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Cfg Scale",
            "description": "Classifier-free guidance scale (0.0-2.0)",
            "default": 0.5
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id",
            "description": "Optional subject ID"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id",
            "description": "Optional product ID"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id",
            "description": "Optional second product ID"
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id",
            "description": "Optional style ID"
        },
        "shot_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type",
            "description": "Optional shot type string"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width",
            "description": "Image width (auto-determined if not provided)"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height",
            "description": "Image height (auto-determined if not provided)"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id",
            "description": "Optional generation model ID for the video generation"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "VideoGenerationRequest",
    "description": "Schema for generating videos from images."
}

Responses

{
    "id": "906fec62-e795-4e01-8947-54f46e8522d8",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "0996dc24-ff3b-4b43-a7cb-14f4d799c2f1",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "cf8b0799-f451-45f8-b308-481014f83568",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "2cad3b8b-d2cc-489d-b4b0-0ed7c6661ed6",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "985a1f1d-9502-480d-9984-4de2a8383ca5",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "7caa85f4-b091-45a8-bd44-517809604b75",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/background-fix

Create Background Fix Generation

Description

Fix background colors in an image using a palette image or preset.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "batch_size": 0,
    "base_img_path": "string",
    "palette_image_path": null,
    "background_preset_id": null,
    "framing": null,
    "background_fixer_strategy": null,
    "subject_id": null,
    "product_id": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "description": "Batch size for the generation",
            "default": 1
        },
        "base_img_path": {
            "type": "string",
            "title": "Base Img Path",
            "description": "Path to the base image to fix"
        },
        "palette_image_path": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Palette Image Path",
            "description": "Path to palette/reference image for target background color"
        },
        "background_preset_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background Preset Id",
            "description": "Background preset ID containing the palette image"
        },
        "framing": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ShotTypeFraming"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Framing to select the appropriate background image from the preset (e.g. full_body, upper_body). Only used when background_preset_id is provided. Falls back to the preset's default image if not set or no match."
        },
        "background_fixer_strategy": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/BackgroundFixStrategy"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Strategy to use for background fixing. If background preset is passed and has a strategy, this field will override it."
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id",
            "description": "Subject ID for metadata"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id",
            "description": "Product ID for metadata"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "base_img_path"
    ],
    "title": "BackgroundFixRequest",
    "description": "Schema for background fix operations."
}

Responses

{
    "id": "f9f452d2-230f-490a-b50c-690f988e1a83",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "46c931ad-f2f7-46a2-a8f6-1ec18526ce68",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "0d54513c-147a-495a-af65-e51209e189ce",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "c65045ae-4864-4feb-b1a6-e8f425938141",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "bd19d909-49c1-482b-94b9-b0e78f52ca40",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "9a422df5-fd98-4931-9d24-f837f641257f",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/image-adjuster

Create Image Adjuster Generation

Description

Adjust image dimensions, aspect ratio, and apply cropping/padding operations.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "batch_size": 0,
    "base_img_path": "string",
    "target_width": null,
    "target_height": null,
    "aspect_ratio": null,
    "mode": "auto",
    "tolerance": null,
    "resampling": null,
    "scaling_proportions": null,
    "cropping_position": null,
    "reference_images": [
        "string"
    ],
    "margin_top": null,
    "margin_right": null,
    "margin_bottom": null,
    "margin_left": null,
    "subject_id": null,
    "product_id": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "batch_size": {
            "type": "integer",
            "title": "Batch Size",
            "description": "Batch size for the generation",
            "default": 1
        },
        "base_img_path": {
            "type": "string",
            "title": "Base Img Path",
            "description": "Path to the base image to adjust"
        },
        "target_width": {
            "anyOf": [
                {
                    "type": "integer",
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Width",
            "description": "Target width for the output image"
        },
        "target_height": {
            "anyOf": [
                {
                    "type": "integer",
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Target Height",
            "description": "Target height for the output image"
        },
        "aspect_ratio": {
            "anyOf": [
                {
                    "type": "number",
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Aspect Ratio",
            "description": "Target aspect ratio (width/height)"
        },
        "mode": {
            "$ref": "#/components/schemas/ImageAdjusterMode",
            "description": "Resize mode: 'auto' intelligently chooses based on AR difference, 'crop' removes pixels, 'pad' adds padding, 'scale' resizes",
            "default": "auto"
        },
        "tolerance": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tolerance",
            "description": "Tolerance for auto mode decision (0.0-1.0)"
        },
        "resampling": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ResamplingMethod"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Resampling method for scaling"
        },
        "scaling_proportions": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ScalingProportions"
                },
                {
                    "type": "null"
                }
            ],
            "description": "How to handle aspect ratio when scaling"
        },
        "cropping_position": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/CroppingPosition"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Position for cropping operations"
        },
        "reference_images": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images",
            "description": "List of reference images (only the first is used for image adjustment)"
        },
        "margin_top": {
            "anyOf": [
                {
                    "type": "number",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Margin Top",
            "description": "Top margin in pixels or percentage (depending on implementation)"
        },
        "margin_right": {
            "anyOf": [
                {
                    "type": "number",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Margin Right",
            "description": "Right margin in pixels or percentage (depending on implementation)"
        },
        "margin_bottom": {
            "anyOf": [
                {
                    "type": "number",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Margin Bottom",
            "description": "Bottom margin in pixels or percentage (depending on implementation)"
        },
        "margin_left": {
            "anyOf": [
                {
                    "type": "number",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Margin Left",
            "description": "Left margin in pixels or percentage (depending on implementation)"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id",
            "description": "Subject ID for metadata"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id",
            "description": "Product ID for metadata"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "base_img_path"
    ],
    "title": "ImageAdjusterRequest",
    "description": "Schema for image adjuster operations."
}

Responses

{
    "id": "3822dcbe-6d03-40ab-9939-6d8d1afce061",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "05711361-1775-4c70-8b34-85c714fed9d6",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "9985e33d-6d62-4229-b975-82347248ef7e",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "61bb9887-f420-4387-a31b-8ee54e860cf8",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "2cd41c73-3242-4797-bc70-db4ef33c4142",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "99298e14-7134-4e5e-8e89-6ca4952b6b6e",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/face-fixer

Create Face Fixer Generation

Description

Fix faces in an image using AI-powered face enhancement.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "base_img_path": "string",
    "subject_id": null,
    "generative_models_id": null,
    "organization_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "base_img_path": {
            "type": "string",
            "title": "Base Img Path",
            "description": "Path to the image to fix"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id",
            "description": "Optional subject ID for face reference"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id",
            "description": "Optional generation model ID for the face fixing operation"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "base_img_path"
    ],
    "title": "FaceFixRequest",
    "description": "Schema for fixing faces in images."
}

Responses

{
    "id": "70f8c4f3-9fcc-4b4f-90dc-445b629c155c",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "negative_prompt": null,
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product_lora_weight": 10.12,
    "subject_lora_weight": 10.12,
    "product2_id": null,
    "product2_image_url": null,
    "product2_lora_weight": 10.12,
    "style_id": null,
    "style_name": null,
    "width": 0,
    "height": 0,
    "steps": 0,
    "seed": 0,
    "refine": true,
    "revised": true,
    "scale_factor": null,
    "lighting": null,
    "framing": null,
    "perspective": null,
    "background": null,
    "tone": null,
    "pose": null,
    "generated_prompt": null,
    "extra_prompt": null,
    "predictions": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "76ff2530-5e70-41b2-8dea-7964c1d7221c",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "2dff82f7-4aa8-4978-92cb-d8762ca780ce",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "c9733968-bbd9-427a-9eac-e1d0e466b1c7",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "ef5e1e56-b6db-4f14-9835-9986ad253479",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "83e26e66-c139-4684-9bfc-756fc49d7948",
    "shot_id": null,
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "shot_type_id": null,
    "shot_type_string": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "style_description": null,
    "has_subject_lora": true,
    "has_product_lora": true,
    "has_product2_lora": true,
    "has_style_lora": true,
    "garment_placement_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "shooting_look_id": null,
    "organization_id": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "reference_images_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "batch_size": {
            "type": "integer",
            "title": "Batch Size"
        },
        "status": {
            "$ref": "#/components/schemas/GenerationStatus",
            "default": "PENDING"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "subject_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Id"
        },
        "product_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Id"
        },
        "subject_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Image Url"
        },
        "product_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Image Url"
        },
        "product_lora_weight": {
            "type": "number",
            "title": "Product Lora Weight",
            "default": 1.0
        },
        "subject_lora_weight": {
            "type": "number",
            "title": "Subject Lora Weight",
            "default": 1.0
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "product2_lora_weight": {
            "type": "number",
            "title": "Product2 Lora Weight",
            "default": 1.0
        },
        "style_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Id"
        },
        "style_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Name"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "steps": {
            "type": "integer",
            "title": "Steps"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "revised": {
            "type": "boolean",
            "title": "Revised",
            "default": false
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "lighting": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Lighting"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "perspective": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Perspective"
        },
        "background": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background"
        },
        "tone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tone"
        },
        "pose": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Predictions"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "shot_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Id"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "subject_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Subject Description"
        },
        "product_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product Description"
        },
        "product2_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Description"
        },
        "style_description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Style Description"
        },
        "has_subject_lora": {
            "type": "boolean",
            "title": "Has Subject Lora",
            "default": false
        },
        "has_product_lora": {
            "type": "boolean",
            "title": "Has Product Lora",
            "default": false
        },
        "has_product2_lora": {
            "type": "boolean",
            "title": "Has Product2 Lora",
            "default": false
        },
        "has_style_lora": {
            "type": "boolean",
            "title": "Has Style Lora",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "shooting_look_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shooting Look Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "subject_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "product2_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "reference_images_media": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaResourcePublic"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images Media"
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "batch_size",
        "width",
        "height",
        "steps",
        "seed",
        "refine",
        "predictions",
        "owner_id"
    ],
    "title": "GenerationPublic",
    "description": "Public schema for Generation."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/experimental-task

Create Experimental Task

Description

Create a new experimental FAL task on the compute server.

This endpoint allows submitting arbitrary FAL app tasks with custom payloads. The task will be executed asynchronously and results can be retrieved via polling.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

{
    "fal_app_id": "string",
    "payload": {},
    "image": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "fal_app_id": {
            "type": "string",
            "title": "Fal App Id",
            "description": "FAL app ID for task execution (e.g., 'fal-ai/flux/dev')"
        },
        "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload",
            "description": "Arbitrary JSON payload to pass to the FAL app"
        },
        "image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image",
            "description": "Base64 encoded image data (optional)"
        }
    },
    "type": "object",
    "required": [
        "fal_app_id",
        "payload"
    ],
    "title": "ExperimentalTaskCreate",
    "description": "Schema for creating experimental FAL tasks."
}

Responses

{
    "id": "string",
    "fal_app_id": "string",
    "payload": {},
    "image_url": null,
    "status": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "title": "Id",
            "description": "Task ID from compute server"
        },
        "fal_app_id": {
            "type": "string",
            "title": "Fal App Id",
            "description": "FAL app ID used for task execution"
        },
        "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload",
            "description": "The payload sent to FAL app"
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "Result image URL (None until task completes)"
        },
        "status": {
            "type": "string",
            "title": "Status",
            "description": "Current task status"
        }
    },
    "type": "object",
    "required": [
        "id",
        "fal_app_id",
        "payload",
        "status"
    ],
    "title": "ExperimentalTaskPublic",
    "description": "Schema for experimental FAL task responses."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generations/experimental-task/{task_id}

Get Experimental Task

Description

Get the status and result of an experimental FAL task.

Polls the compute server for task status. When the task is completed, the image_url field will contain the result image URL.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
task_id path string No

Responses

{
    "id": "string",
    "fal_app_id": "string",
    "payload": {},
    "image_url": null,
    "status": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "title": "Id",
            "description": "Task ID from compute server"
        },
        "fal_app_id": {
            "type": "string",
            "title": "Fal App Id",
            "description": "FAL app ID used for task execution"
        },
        "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload",
            "description": "The payload sent to FAL app"
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "Result image URL (None until task completes)"
        },
        "status": {
            "type": "string",
            "title": "Status",
            "description": "Current task status"
        }
    },
    "type": "object",
    "required": [
        "id",
        "fal_app_id",
        "payload",
        "status"
    ],
    "title": "ExperimentalTaskPublic",
    "description": "Schema for experimental FAL task responses."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generations/refines

Create Refine Generation

Description

Unified refine endpoint.

Batch Upload: - Provide base_image_urls list - Creates 1 Generation (batch_size=1) per uploaded image

Prediction Refines: - Provide prediction_ids list - Creates 1 Refine per prediction ID - Optionally provide refines_refine_ids mapping for refine chaining

Mixed Mode: - Combine base_image_urls and prediction_ids in one request

Backward Compatibility: - base_image_url (singular) still supported for legacy clients

Common Parameters: - Either (width + height) OR scale_factor (2.0, 4.0, or 8.0) required - prompt: Optional prompt for guided refinement - refine_model_id: Optional generative model to use

Refine Chaining: - Use refines_refine_ids dict to map prediction_id -> source_refine_id - Allows refining already-refined results

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "base_image_url": null,
    "base_image_urls": null,
    "prediction_ids": null,
    "refines_refine_ids": null,
    "width": null,
    "height": null,
    "scale_factor": null,
    "prompt": null,
    "refine_model_id": null,
    "organization_id": null,
    "refines_refine_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Base Image Url",
            "description": "Presigned temp URL from /uploads/presigned-url (DEPRECATED: use base_image_urls)"
        },
        "base_image_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Base Image Urls",
            "description": "List of presigned temp URLs from /uploads/presigned-url"
        },
        "prediction_ids": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prediction Ids",
            "description": "List of prediction IDs to refine"
        },
        "refines_refine_ids": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "propertyNames": {
                        "format": "uuid"
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refines Refine Ids",
            "description": "Map of prediction_id to refines_refine_id for chaining (optional)"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer",
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width",
            "description": "Target width for refined image"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer",
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height",
            "description": "Target height for refined image"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor",
            "description": "Scale factor (2.0, 4.0, or 8.0) - alternative to width/height"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Optional prompt for guided refinement"
        },
        "refine_model_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refine Model Id",
            "description": "ID of the generative model to use"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        },
        "refines_refine_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refines Refine Id",
            "description": "DEPRECATED: Use refines_refine_ids instead"
        }
    },
    "type": "object",
    "title": "RefineGenerationRequest",
    "description": "Unified refine request.\n\nSupports:\n- Batch uploads: Provide base_image_urls (creates 1 Generation per image, batch_size=1)\n- Prediction refines: Provide prediction_ids (creates 1 Refine per prediction)\n- Mixed: Combine both base_image_urls and prediction_ids\n- Refine chaining: Use refines_refine_ids to refine already-refined results\n\nNote: base_image_url (singular) is deprecated but still supported."
}

Responses

{
    "total_success": 0,
    "total_failed": 0,
    "generations": [
        {
            "id": "5e0472a1-3703-4e93-a753-c19483317fa2",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "batch_size": 0,
            "status": "PENDING",
            "negative_prompt": null,
            "subject_id": null,
            "product_id": null,
            "subject_image_url": null,
            "product_image_url": null,
            "product_lora_weight": 10.12,
            "subject_lora_weight": 10.12,
            "product2_id": null,
            "product2_image_url": null,
            "product2_lora_weight": 10.12,
            "style_id": null,
            "style_name": null,
            "width": 0,
            "height": 0,
            "steps": 0,
            "seed": 0,
            "refine": true,
            "revised": true,
            "scale_factor": null,
            "lighting": null,
            "framing": null,
            "perspective": null,
            "background": null,
            "tone": null,
            "pose": null,
            "generated_prompt": null,
            "extra_prompt": null,
            "predictions": [
                {
                    "seed": 0,
                    "status": "pending",
                    "result_image_url": null,
                    "result_video_url": null,
                    "duration_seconds": null,
                    "favourite": true,
                    "error_message": null,
                    "error_category": null,
                    "id": "2cfed3a2-7904-4df8-921f-3da90ddc528b",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "generation_id": "93207384-28b2-4ea7-86c3-efe4272e494d",
                    "shot_type": null,
                    "refines": [
                        {
                            "status": "pending",
                            "result_image_url": null,
                            "width": null,
                            "height": null,
                            "scale_factor": null,
                            "prompt": null,
                            "refine_model_id": null,
                            "error_message": null,
                            "error_category": null,
                            "refines_refine_id": null,
                            "id": "5e21b341-b9b5-44cd-8999-49fe88591e26",
                            "created_at": "2022-04-13T15:42:05.901Z",
                            "updated_at": "2022-04-13T15:42:05.901Z",
                            "prediction_id": "fac1afdf-8a6f-45dc-a074-3d66465fb200",
                            "task_id": null,
                            "result_image_media": null
                        }
                    ],
                    "result_image_media": null,
                    "result_video_media": null,
                    "refined_image_url": null
                }
            ],
            "owner_id": "5b3ee5b3-e6e9-41e4-ab59-3d103b14ea11",
            "shot_id": null,
            "generation_type": "BASE",
            "generation_strategy": "GENERATE",
            "tool": null,
            "shot_type_id": null,
            "shot_type_string": null,
            "subject_description": null,
            "product_description": null,
            "product2_description": null,
            "style_description": null,
            "has_subject_lora": true,
            "has_product_lora": true,
            "has_product2_lora": true,
            "has_style_lora": true,
            "garment_placement_base_image_url": null,
            "reference_images_paths": [
                "string"
            ],
            "generative_models_id": null,
            "autogenerated": true,
            "shooting_look_id": null,
            "organization_id": null,
            "subject_image_media": null,
            "product_image_media": null,
            "product2_image_media": null,
            "garment_placement_base_image_media": null,
            "reference_images_media": null
        }
    ],
    "refines": null,
    "failed_uploads": [
        {}
    ],
    "failed_refines": [
        {}
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "total_success": {
            "type": "integer",
            "title": "Total Success",
            "description": "Total successful operations"
        },
        "total_failed": {
            "type": "integer",
            "title": "Total Failed",
            "description": "Total failed operations"
        },
        "generations": {
            "items": {
                "$ref": "#/components/schemas/GenerationPublic"
            },
            "type": "array",
            "title": "Generations",
            "description": "Generations created from uploaded images"
        },
        "refines": {
            "items": {
                "$ref": "#/components/schemas/RefinePublic"
            },
            "type": "array",
            "title": "Refines",
            "description": "Refines created from prediction IDs"
        },
        "failed_uploads": {
            "items": {
                "additionalProperties": true,
                "type": "object"
            },
            "type": "array",
            "title": "Failed Uploads",
            "description": "Failed uploads: [{index, url, error}]"
        },
        "failed_refines": {
            "items": {
                "additionalProperties": true,
                "type": "object"
            },
            "type": "array",
            "title": "Failed Refines",
            "description": "Failed refines: [{prediction_id, error}]"
        }
    },
    "type": "object",
    "required": [
        "total_success",
        "total_failed"
    ],
    "title": "MixedRefineResponse",
    "description": "Unified response for all refine operations."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

training


POST /api/v1/training/webhook

Training Webhook

Request body

Schema of the request body
{
    "additionalProperties": true,
    "type": "object",
    "title": "Payload"
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/training/{task_id}/status

Get Training Status

Description

Endpoint to get the training task status by ID.

Input parameters

Parameter In Type Default Nullable Description
task_id path string No

Responses

Schema of the response body
{
    "type": "object",
    "additionalProperties": true,
    "title": "Response Get Training Status"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

predictions


GET /api/v1/predictions/{id}

Read Prediction

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No

Responses

{
    "seed": 0,
    "status": "pending",
    "result_image_url": null,
    "result_video_url": null,
    "duration_seconds": null,
    "favourite": true,
    "error_message": null,
    "error_category": null,
    "id": "e82d6434-e5e2-416e-9e47-280041e13371",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "generation_id": "b393363a-4f48-44c8-ba67-2cf75a5c45ba",
    "shot_type": null,
    "refines": [
        {
            "status": "pending",
            "result_image_url": null,
            "width": null,
            "height": null,
            "scale_factor": null,
            "prompt": null,
            "refine_model_id": null,
            "error_message": null,
            "error_category": null,
            "refines_refine_id": null,
            "id": "ea43532a-aec8-45e3-8649-2fc88961901c",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "ffc38c7b-d5a5-4541-a099-2c3b2e95812d",
            "task_id": null,
            "result_image_media": null
        }
    ],
    "result_image_media": null,
    "result_video_media": null,
    "refined_image_url": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "status": {
            "$ref": "#/components/schemas/PredictionStatus",
            "default": "pending"
        },
        "result_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result Image Url"
        },
        "result_video_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result Video Url"
        },
        "duration_seconds": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration Seconds"
        },
        "favourite": {
            "type": "boolean",
            "title": "Favourite",
            "default": false
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message"
        },
        "error_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ErrorCategory-Output"
                },
                {
                    "type": "null"
                }
            ]
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "generation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Generation Id"
        },
        "shot_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type"
        },
        "refines": {
            "items": {
                "$ref": "#/components/schemas/RefinePublic"
            },
            "type": "array",
            "title": "Refines",
            "default": []
        },
        "result_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "result_video_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "refined_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refined Image Url",
            "description": "Computed field for backward compatibility.\n\nReturns the most recent successful refine's result_image_url.",
            "readOnly": true
        }
    },
    "type": "object",
    "required": [
        "seed",
        "id",
        "created_at",
        "updated_at",
        "generation_id",
        "refined_image_url"
    ],
    "title": "PredictionPublic",
    "description": "Public schema for Prediction."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/predictions/{id}

Delete Prediction

Description

Delete a prediction and its associated images.

The CRUD layer handles both database deletion and file cleanup in the correct order: 1. Validates constraints (last prediction, shot revision usage) 2. Commits database transaction 3. Only then deletes files from storage

Args: session: Database session dependency current_user: Current authenticated user id: UUID of the prediction to delete

Raises: HTTPException: 404 if prediction not found, 403 if user not authorized, 409 if prediction is last in generation or used in revisions

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No

Responses

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/predictions/{id}/revisions

Read Prediction Revisions

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
id path string No

Responses

[
    {
        "id": "436197cd-9bb3-4d86-8bf9-02d7226e0673",
        "shot_id": "2eca8b77-943b-4347-ad08-0658b25b96b6",
        "version": 0,
        "notes": null,
        "shot_status": "PENDING",
        "shot_revision_status": null,
        "owner_id": null,
        "owner": null,
        "created_at": "2022-04-13T15:42:05.901Z",
        "updated_at": "2022-04-13T15:42:05.901Z",
        "previous_revision_id": null,
        "images": [
            {
                "id": "8a6b2a8b-42e8-4780-9d1c-9ca1913503a2",
                "shot_revision_id": "67392ed2-914b-4337-beea-ef291ca12618",
                "source_type": "PREDICTION",
                "prediction_id": null,
                "refine_id": null,
                "image_url": null,
                "sketch_image_url": null,
                "image_media": null,
                "sketch_image_media": null,
                "notes": null,
                "autogenerated": true,
                "created_at": "2022-04-13T15:42:05.901Z",
                "updated_at": "2022-04-13T15:42:05.901Z",
                "effective_image_url": null
            }
        ],
        "display_name": "string",
        "effective_image_url": null,
        "push_records": [
            {
                "id": "84b9e26d-8764-4c26-ba7f-de553e5d4150",
                "created_at": "2022-04-13T15:42:05.901Z",
                "updated_at": "2022-04-13T15:42:05.901Z",
                "integration_id": "d663b737-2a2a-455e-a743-7588a0eb3d1a",
                "push_status": "PENDING",
                "pushed_at": null,
                "completed_at": null,
                "error_message": null
            }
        ],
        "push_status": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/ShotRevisionPublic"
    },
    "title": "Response Read Prediction Revisions"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/predictions/

Read Predictions

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
favourite query No
limit query integer 100 No
skip query integer 0 No

Responses

{
    "data": [
        {
            "seed": 0,
            "status": "pending",
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "favourite": true,
            "error_message": null,
            "error_category": null,
            "id": "a390239e-6750-4652-a001-fee841c7656e",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "9237e006-a975-4595-9aa1-8d78b1351ca6",
            "shot_type": null,
            "refines": [
                {
                    "status": "pending",
                    "result_image_url": null,
                    "width": null,
                    "height": null,
                    "scale_factor": null,
                    "prompt": null,
                    "refine_model_id": null,
                    "error_message": null,
                    "error_category": null,
                    "refines_refine_id": null,
                    "id": "c34982aa-e6cb-4cdd-9459-5b0dec97b219",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "28751b46-768c-4321-a93b-1e01a788c1cd",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/PredictionPublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "PredictionsPublic",
    "description": "Schema for a list of predictions."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/predictions/bulk-delete

Bulk Delete Predictions

Description

Bulk delete predictions by ID with special handling for generation deletion.

If all predictions of a generation are requested to be deleted, the entire generation will be deleted instead (predictions will be deleted automatically via cascade).

Args: session: Database session dependency current_user: Current authenticated user request: Bulk delete request containing prediction IDs

Returns: BulkDeleteResponse with deletion results

Raises: HTTPException: 400 if no prediction IDs provided or too many IDs HTTPException: 500 if database error occurs

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

{
    "prediction_ids": [
        "5d53ca30-8d7d-4987-9892-13f790d33369"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prediction_ids": {
            "items": {
                "type": "string",
                "format": "uuid"
            },
            "type": "array",
            "title": "Prediction Ids"
        }
    },
    "type": "object",
    "required": [
        "prediction_ids"
    ],
    "title": "BulkDeleteRequest",
    "description": "Schema for bulk delete requests."
}

Responses

{
    "success_count": 0,
    "failed_count": 0,
    "failed_predictions": [
        {}
    ],
    "deleted_generations": [
        "3f83e403-c2e9-455e-a1dd-5eb519c27b79"
    ],
    "deleted_predictions": [
        "9d1f25b8-19b2-442f-95f5-666e050c754c"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "success_count": {
            "type": "integer",
            "title": "Success Count"
        },
        "failed_count": {
            "type": "integer",
            "title": "Failed Count"
        },
        "failed_predictions": {
            "items": {
                "additionalProperties": true,
                "type": "object"
            },
            "type": "array",
            "title": "Failed Predictions"
        },
        "deleted_generations": {
            "items": {
                "type": "string",
                "format": "uuid"
            },
            "type": "array",
            "title": "Deleted Generations"
        },
        "deleted_predictions": {
            "items": {
                "type": "string",
                "format": "uuid"
            },
            "type": "array",
            "title": "Deleted Predictions"
        }
    },
    "type": "object",
    "required": [
        "success_count",
        "failed_count",
        "failed_predictions",
        "deleted_generations",
        "deleted_predictions"
    ],
    "title": "BulkDeleteResponse",
    "description": "Schema for bulk delete responses."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PATCH /api/v1/predictions/{id}/favourite

Update Prediction Favourite Status

Description

Update the favourite status of a prediction.

Args: session: Database session dependency current_user: Current authenticated user id: UUID of the prediction to update favourite: New favourite status (true/false)

Returns: Updated Prediction object

Raises: HTTPException: 404 if prediction not found or 403 if user not authorized

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
favourite query boolean No
id path string No

Responses

{
    "seed": 0,
    "status": "pending",
    "result_image_url": null,
    "result_video_url": null,
    "duration_seconds": null,
    "favourite": true,
    "error_message": null,
    "error_category": null,
    "id": "ad4da6ed-bdb6-42da-ba83-d5f5da9a9b27",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "generation_id": "ea5271bf-5f3b-4b7b-b203-4f5b8affd82f",
    "shot_type": null,
    "refines": [
        {
            "status": "pending",
            "result_image_url": null,
            "width": null,
            "height": null,
            "scale_factor": null,
            "prompt": null,
            "refine_model_id": null,
            "error_message": null,
            "error_category": null,
            "refines_refine_id": null,
            "id": "679d52c8-67ac-4874-a627-a0a13dc8e495",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "771f7b50-15b9-4040-b642-ec7162ddd0ee",
            "task_id": null,
            "result_image_media": null
        }
    ],
    "result_image_media": null,
    "result_video_media": null,
    "refined_image_url": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "status": {
            "$ref": "#/components/schemas/PredictionStatus",
            "default": "pending"
        },
        "result_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result Image Url"
        },
        "result_video_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result Video Url"
        },
        "duration_seconds": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration Seconds"
        },
        "favourite": {
            "type": "boolean",
            "title": "Favourite",
            "default": false
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message"
        },
        "error_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ErrorCategory-Output"
                },
                {
                    "type": "null"
                }
            ]
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "generation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Generation Id"
        },
        "shot_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type"
        },
        "refines": {
            "items": {
                "$ref": "#/components/schemas/RefinePublic"
            },
            "type": "array",
            "title": "Refines",
            "default": []
        },
        "result_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "result_video_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "refined_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refined Image Url",
            "description": "Computed field for backward compatibility.\n\nReturns the most recent successful refine's result_image_url.",
            "readOnly": true
        }
    },
    "type": "object",
    "required": [
        "seed",
        "id",
        "created_at",
        "updated_at",
        "generation_id",
        "refined_image_url"
    ],
    "title": "PredictionPublic",
    "description": "Public schema for Prediction."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

refines


GET /api/v1/refines/predictions/{prediction_id}/refines

List Refines

Description

List all refines for a prediction.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
limit query integer 100 No
prediction_id path string No
skip query integer 0 No

Responses

{
    "data": [
        {
            "status": "pending",
            "result_image_url": null,
            "width": null,
            "height": null,
            "scale_factor": null,
            "prompt": null,
            "refine_model_id": null,
            "error_message": null,
            "error_category": null,
            "refines_refine_id": null,
            "id": "6c8df0b8-ed64-4b54-bc39-7e747542c3ac",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "215513fd-e10a-442f-a1e6-7fbc67bdb2db",
            "task_id": null,
            "result_image_media": null
        }
    ],
    "count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/RefinePublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "RefinesPublic",
    "description": "Schema for a list of refines."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/refines/refines/{refine_id}

Get Refine

Description

Get a specific refine by ID.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
refine_id path string No

Responses

{
    "status": "pending",
    "result_image_url": null,
    "width": null,
    "height": null,
    "scale_factor": null,
    "prompt": null,
    "refine_model_id": null,
    "error_message": null,
    "error_category": null,
    "refines_refine_id": null,
    "id": "8c7a7c32-8f96-4e72-b2b4-7a2cd083f54e",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "prediction_id": "54fb7054-9164-44ca-bc34-94483353a443",
    "task_id": null,
    "result_image_media": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "$ref": "#/components/schemas/RefineStatus",
            "default": "pending"
        },
        "result_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result Image Url"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt"
        },
        "refine_model_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refine Model Id"
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message"
        },
        "error_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ErrorCategory-Output"
                },
                {
                    "type": "null"
                }
            ]
        },
        "refines_refine_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refines Refine Id"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "prediction_id": {
            "type": "string",
            "format": "uuid",
            "title": "Prediction Id"
        },
        "task_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Task Id"
        },
        "result_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "id",
        "created_at",
        "updated_at",
        "prediction_id"
    ],
    "title": "RefinePublic",
    "description": "Public schema for Refine."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/refines/refines/{refine_id}

Delete Refine

Description

Delete a specific refine and its associated image.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
refine_id path string No

Responses

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/refines/predictions/bulk-refine

Bulk Refine Predictions

Description

[DEPRECATED] Create refine tasks for multiple predictions in a single request.

This endpoint is deprecated. Use POST /api/v1/generations/refines instead.

The new unified endpoint supports the same functionality plus batch uploads. For bulk prediction refines, pass prediction_ids in the request body.

The tasks will be processed asynchronously and the refine statuses will be updated via the event system when the tasks complete.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

{
    "prediction_ids": [
        "8847b760-960e-4589-b636-923b582379e4"
    ],
    "width": null,
    "height": null,
    "scale_factor": null,
    "prompt": null,
    "generative_models_id": null,
    "refines_refine_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prediction_ids": {
            "items": {
                "type": "string",
                "format": "uuid"
            },
            "type": "array",
            "title": "Prediction Ids"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "refines_refine_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Refines Refine Id"
        }
    },
    "type": "object",
    "required": [
        "prediction_ids"
    ],
    "title": "BulkRefineRequest",
    "description": "Schema for bulk refine requests.\n\nEither provide both width and height, or provide scale_factor to auto-calculate dimensions.\nNote: When using scale_factor, dimensions will be calculated per prediction based on each image's size."
}

Responses

{
    "success_count": 0,
    "failed_count": 0,
    "failed_predictions": [
        {}
    ],
    "created_refines": [
        {
            "status": "pending",
            "result_image_url": null,
            "width": null,
            "height": null,
            "scale_factor": null,
            "prompt": null,
            "refine_model_id": null,
            "error_message": null,
            "error_category": null,
            "refines_refine_id": null,
            "id": "492f7e80-d457-4a8d-8ace-da40cb6c1ec8",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "566e66be-7773-420a-9bcd-48bb6bb95c32",
            "task_id": null,
            "result_image_media": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "success_count": {
            "type": "integer",
            "title": "Success Count"
        },
        "failed_count": {
            "type": "integer",
            "title": "Failed Count"
        },
        "failed_predictions": {
            "items": {
                "additionalProperties": true,
                "type": "object"
            },
            "type": "array",
            "title": "Failed Predictions"
        },
        "created_refines": {
            "items": {
                "$ref": "#/components/schemas/RefinePublic"
            },
            "type": "array",
            "title": "Created Refines"
        }
    },
    "type": "object",
    "required": [
        "success_count",
        "failed_count",
        "failed_predictions",
        "created_refines"
    ],
    "title": "BulkRefineResponse",
    "description": "Schema for bulk refine responses."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

AgenticGenerationCreate

Name Type Description
auto_generate_prompt boolean
autogenerated boolean
background
batch_size integer
config
evaluation_provider AI provider for evaluation (anthropic, gemini, openai, mock)
extra_prompt
framing
garment_placement_base_image_url
generated_prompt
generation_strategy
generation_type GenerationType
generative_models_id
height
lighting
max_attempts Maximum retry attempts (defaults to orchestrator config)
min_confidence_score Minimum confidence score for acceptance (defaults to 0.7)
negative_prompt
organization_id Organization this generation belongs to
perspective
pose
pose_preset_id
product2_description
product2_id
product2_image
product2_lora_enabled boolean
product2_lora_trigger
product2_lora_weight number
product2_slug
product_description
product_gender
product_id
product_image
product_lora_enabled boolean
product_lora_trigger
product_lora_weight number
product_slug
reference_image_strength Influence of the reference image on generation (0-100)
reference_images_paths Array<string>
refine boolean
scale_factor
seed
shot_type string Expected shot type (e.g., 'front_full_body', 'side_upper_body')
shot_type_id
shot_type_string
status
steps integer
style_description
style_id
style_lora_enabled boolean
style_lora_trigger
style_lora_weight number
style_slug
subject_description
subject_gender
subject_id
subject_lora_enabled boolean
subject_lora_trigger
subject_lora_weight number
subject_slug
target_height
target_width
tone
tool
width

AgenticGenerationResponse

Name Type Description
autogenerated boolean
background
batch_size integer
created_at string(date-time)
estimated_completion_time Estimated completion time in seconds
extra_prompt
framing
garment_placement_base_image_media
garment_placement_base_image_url
generated_prompt
generation_strategy GenerationStrategy
generation_type GenerationType
generative_models_id
has_product2_lora boolean
has_product_lora boolean
has_style_lora boolean
has_subject_lora boolean
height integer
id string(uuid)
lighting
message string Status message
negative_prompt
orchestration_shot_id string Unique identifier for the shot orchestration tracking
orchestration_status string Orchestration status (processing, completed, failed)
organization_id
owner_id string(uuid)
perspective
pose
predictions Array<PredictionPublic>
product2_description
product2_id
product2_image_media
product2_image_url
product2_lora_weight number
product_description
product_id
product_image_media
product_image_url
product_lora_weight number
reference_images_media
reference_images_paths Array<string>
refine boolean
revised boolean
scale_factor
seed integer
shooting_look_id
shot_id
shot_type_id
shot_type_string
status GenerationStatus
steps integer
style_description
style_id
style_name
subject_description
subject_id
subject_image_media
subject_image_url
subject_lora_weight number
tone
tool
updated_at string(date-time)
width integer

AgenticShotAttempt

Name Type Description
attempt_number integer Attempt number (1-based)
completed_at When the attempt completed
confidence_score Evaluation confidence
detected_shot_type Detected shot type
error_message Error message if failed
evaluation_feedback Evaluation feedback
evaluation_status Evaluation status
generation_metadata Metadata from the generation process
image_url Generated image URL
started_at When the attempt started

AgenticShotStatus

Name Type Description
attempts Array<AgenticShotAttempt> History of all generation attempts
best_confidence Best confidence score achieved
completed_at When orchestration completed
current_attempt Current attempt number
duration_seconds Total duration in seconds
error_message Error message if failed
final_image_url Final selected image URL
max_attempts integer Maximum allowed attempts
orchestration_metadata Additional orchestration metadata
shot_id string Shot identifier
started_at When orchestration started
status string Current orchestration status
total_attempts integer Total number of attempts made

BackgroundFixRequest

Name Type Description
background_fixer_strategy Strategy to use for background fixing. If background preset is passed and has a strategy, this field will override it.
background_preset_id Background preset ID containing the palette image
base_img_path string Path to the base image to fix
batch_size integer Batch size for the generation
framing Framing to select the appropriate background image from the preset (e.g. full_body, upper_body). Only used when background_preset_id is provided. Falls back to the preset's default image if not set or no match.
organization_id Organization this generation belongs to
palette_image_path Path to palette/reference image for target background color
product_id Product ID for metadata
subject_id Subject ID for metadata

BackgroundFixStrategy

Type: string

BulkDeleteRequest

Name Type Description
prediction_ids Array<string(uuid)>

BulkDeleteResponse

Name Type Description
deleted_generations Array<string(uuid)>
deleted_predictions Array<string(uuid)>
failed_count integer
failed_predictions Array<>
success_count integer

BulkRefineRequest

Name Type Description
generative_models_id
height
prediction_ids Array<string(uuid)>
prompt
refines_refine_id
scale_factor
width

BulkRefineResponse

Name Type Description
created_refines Array<RefinePublic>
failed_count integer
failed_predictions Array<>
success_count integer

CroppingPosition

Type: string

EditRequest

Name Type Description
base_img_path string Path to the base image
batch_size integer Batch size for the generation
gender Gender for AGENTIC generation
generative_models_id Optional generation model ID for the editing operation
height Image height (auto-determined if not provided)
organization_id Organization this generation belongs to
product_id Product ID for the edit
prompt Optional prompt for the operation
reference_images Array<string> List of reference images for placement
shot_type Shot type for AGENTIC generation
subject_id Subject ID for the edit
tool Tool type: EDIT (default), SUBJECT_SWAP, or PRODUCT_ENHANCEMENT
width Image width (auto-determined if not provided)
workflow GenerationType Workflow type to use

ErrorCategory-Output

Type: string

ExperimentalTaskCreate

Name Type Description
fal_app_id string FAL app ID for task execution (e.g., 'fal-ai/flux/dev')
image Base64 encoded image data (optional)
payload Arbitrary JSON payload to pass to the FAL app

ExperimentalTaskPublic

Name Type Description
fal_app_id string FAL app ID used for task execution
id string Task ID from compute server
image_url Result image URL (None until task completes)
payload The payload sent to FAL app
status string Current task status

ExternalImagePushPublic

Name Type Description
completed_at
created_at string(date-time)
error_message
id string(uuid)
integration_id string(uuid)
push_status PushStatus
pushed_at
updated_at string(date-time)

FaceFixRequest

Name Type Description
base_img_path string Path to the image to fix
generative_models_id Optional generation model ID for the face fixing operation
organization_id Organization this generation belongs to
subject_id Optional subject ID for face reference

GenerationCreate

Name Type Description
auto_generate_prompt boolean
autogenerated boolean
background
batch_size integer
config
extra_prompt
framing
garment_placement_base_image_url
generated_prompt
generation_strategy
generation_type
generative_models_id
height
lighting
negative_prompt
organization_id Organization this generation belongs to
perspective
pose
pose_preset_id
product2_description
product2_id
product2_image
product2_lora_enabled boolean
product2_lora_trigger
product2_lora_weight number
product2_slug
product_description
product_gender
product_id
product_image
product_lora_enabled boolean
product_lora_trigger
product_lora_weight number
product_slug
reference_image_strength Influence of the reference image on generation (0-100)
reference_images_paths Array<string>
refine boolean
scale_factor
seed
shot_type
shot_type_id
shot_type_string
status
steps integer
style_description
style_id
style_lora_enabled boolean
style_lora_trigger
style_lora_weight number
style_slug
subject_description
subject_gender
subject_id
subject_lora_enabled boolean
subject_lora_trigger
subject_lora_weight number
subject_slug
target_height
target_width
tone
tool
width

GenerationPublic

Name Type Description
autogenerated boolean
background
batch_size integer
created_at string(date-time)
extra_prompt
framing
garment_placement_base_image_media
garment_placement_base_image_url
generated_prompt
generation_strategy GenerationStrategy
generation_type GenerationType
generative_models_id
has_product2_lora boolean
has_product_lora boolean
has_style_lora boolean
has_subject_lora boolean
height integer
id string(uuid)
lighting
negative_prompt
organization_id
owner_id string(uuid)
perspective
pose
predictions Array<PredictionPublic>
product2_description
product2_id
product2_image_media
product2_image_url
product2_lora_weight number
product_description
product_id
product_image_media
product_image_url
product_lora_weight number
reference_images_media
reference_images_paths Array<string>
refine boolean
revised boolean
scale_factor
seed integer
shooting_look_id
shot_id
shot_type_id
shot_type_string
status GenerationStatus
steps integer
style_description
style_id
style_name
subject_description
subject_id
subject_image_media
subject_image_url
subject_lora_weight number
tone
tool
updated_at string(date-time)
width integer

GenerationsPublic

Name Type Description
count integer
data Array<GenerationPublic>

GenerationStats

Name Type Description
completed integer
error integer
id string(uuid)
latest_prediction_status
status GenerationStatus
total integer

GenerationStatus

Type: string

GenerationStrategy

Type: string

GenerationTool

Type: string

GenerationType

Type: string

GenerationUpdate

Name Type Description
revised

HTTPValidationError

Name Type Description
detail Array<ValidationError>

ImageAdjusterMode

Type: string

ImageAdjusterRequest

Name Type Description
aspect_ratio Target aspect ratio (width/height)
base_img_path string Path to the base image to adjust
batch_size integer Batch size for the generation
cropping_position Position for cropping operations
margin_bottom Bottom margin in pixels or percentage (depending on implementation)
margin_left Left margin in pixels or percentage (depending on implementation)
margin_right Right margin in pixels or percentage (depending on implementation)
margin_top Top margin in pixels or percentage (depending on implementation)
mode ImageAdjusterMode Resize mode: 'auto' intelligently chooses based on AR difference, 'crop' removes pixels, 'pad' adds padding, 'scale' resizes
organization_id Organization this generation belongs to
product_id Product ID for metadata
reference_images Array<string> List of reference images (only the first is used for image adjustment)
resampling Resampling method for scaling
scaling_proportions How to handle aspect ratio when scaling
subject_id Subject ID for metadata
target_height Target height for the output image
target_width Target width for the output image
tolerance Tolerance for auto mode decision (0.0-1.0)

MediaResourcePublic

Name Type Description
alt_text
aspect_ratio
caption
color_profile
content_hash string
created_at string(date-time)
dominant_color
duration
extension string
file_size integer
height
id string(uuid)
orientation
protected boolean
resource_type MediaResourceType
url string
width

MediaResourceType

Type: string

Message

Name Type Description
message string

MixedRefineResponse

Name Type Description
failed_refines Array<> Failed refines: [{prediction_id, error}]
failed_uploads Array<> Failed uploads: [{index, url, error}]
generations Array<GenerationPublic> Generations created from uploaded images
refines Array<RefinePublic> Refines created from prediction IDs
total_failed integer Total failed operations
total_success integer Total successful operations

PredictionPublic

Name Type Description
created_at string(date-time)
duration_seconds
error_category
error_message
favourite boolean
generation_id string(uuid)
id string(uuid)
refined_image_url Computed field for backward compatibility. Returns the most recent successful refine's result_image_url.
refines Array<RefinePublic>
result_image_media
result_image_url
result_video_media
result_video_url
seed integer
shot_type
status PredictionStatus
updated_at string(date-time)

PredictionsPublic

Name Type Description
count integer
data Array<PredictionPublic>

PredictionStatus

Type: string

PushStatus

Type: string

RefineGenerationRequest

Name Type Description
base_image_url Presigned temp URL from /uploads/presigned-url (DEPRECATED: use base_image_urls)
base_image_urls List of presigned temp URLs from /uploads/presigned-url
height Target height for refined image
organization_id Organization this generation belongs to
prediction_ids List of prediction IDs to refine
prompt Optional prompt for guided refinement
refine_model_id ID of the generative model to use
refines_refine_id DEPRECATED: Use refines_refine_ids instead
refines_refine_ids Map of prediction_id to refines_refine_id for chaining (optional)
scale_factor Scale factor (2.0, 4.0, or 8.0) - alternative to width/height
width Target width for refined image

RefinePublic

Name Type Description
created_at string(date-time)
error_category
error_message
height
id string(uuid)
prediction_id string(uuid)
prompt
refine_model_id
refines_refine_id
result_image_media
result_image_url
scale_factor
status RefineStatus
task_id
updated_at string(date-time)
width

RefinesPublic

Name Type Description
count integer
data Array<RefinePublic>

RefineStatus

Type: string

ResamplingMethod

Type: string

RevisionSource

Type: string

ScalingProportions

Type: string

ShotRevisionImagePublic

Name Type Description
autogenerated boolean
created_at string(date-time)
effective_image_url
id string(uuid)
image_media
image_url
notes
prediction_id
refine_id
shot_revision_id string(uuid)
sketch_image_media
sketch_image_url
source_type RevisionSource
updated_at string(date-time)

ShotRevisionPublic

Name Type Description
created_at string(date-time)
display_name string
effective_image_url
id string(uuid)
images Array<ShotRevisionImagePublic>
notes
owner
owner_id
previous_revision_id
push_records Array<ExternalImagePushPublic>
push_status Aggregate push status across all integrations. Returns: None (no pushes), PENDING, IN_PROGRESS, AWAITING_CONFIRMATION, COMPLETED, or FAILED Priority: FAILED > IN_PROGRESS > AWAITING_CONFIRMATION > PENDING > COMPLETED
shot_id string(uuid)
shot_revision_status
shot_status ShotStatus
updated_at string(date-time)
version integer

ShotRevisionStatus

Type: string

ShotStatus

Type: string

ShotTypeFraming

Type: string

UserSummary

Name Type Description
email string()
full_name
id string(uuid)

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

VideoGenerationRequest

Name Type Description
base_image_path Path to uploaded image (requires explicit metadata)
batch_size integer Batch size for the generation
cfg_scale number Classifier-free guidance scale (0.0-2.0)
generative_models_id Optional generation model ID for the video generation
height Image height (auto-determined if not provided)
negative_prompt Negative prompt for video generation
organization_id Organization this generation belongs to
prediction_id Prediction ID containing the source image (inherits metadata)
product2_id Optional second product ID
product_id Optional product ID
prompt string Text prompt describing the desired video content
shot_type Optional shot type string
style_id Optional style ID
subject_id Optional subject ID
width Image width (auto-determined if not provided)

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2