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/import

Import Completed Generation

Description

Import a generation that is already completed with result media attached.

Input parameters

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

Request body

{
    "predictions": [
        {
            "result_image_url": null,
            "result_video_url": null,
            "duration_seconds": null,
            "seed": null,
            "favourite": true,
            "status": "pending",
            "error_message": null,
            "error_category": null
        }
    ],
    "width": 0,
    "height": 0,
    "subject_id": null,
    "subject_slug": null,
    "product_id": null,
    "product_slug": null,
    "product2_id": null,
    "product2_slug": null,
    "seed": null,
    "refine": true,
    "scale_factor": null,
    "reference_image_strength": null,
    "extra_prompt": null,
    "generated_prompt": null,
    "framing": null,
    "subject_description": null,
    "product_description": null,
    "product2_description": null,
    "shot_type_string": null,
    "shot_type_id": null,
    "pose_preset_id": null,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generation_type": "BASE",
    "generation_strategy": "GENERATE",
    "tool": null,
    "video_duration": null,
    "source_prediction_id": null,
    "generative_models_id": null,
    "autogenerated": true,
    "config": 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": {
        "predictions": {
            "items": {
                "$ref": "#/components/schemas/CompletedPredictionInput"
            },
            "type": "array",
            "minItems": 1,
            "title": "Predictions"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_slug": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Slug"
        },
        "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"
        },
        "reference_image_strength": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 100.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Image Strength"
        },
        "extra_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Prompt"
        },
        "generated_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generated Prompt"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "shot_type_string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type String"
        },
        "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"
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin Base Image Url"
        },
        "reference_images_paths": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reference Images Paths"
        },
        "generation_type": {
            "$ref": "#/components/schemas/GenerationType",
            "default": "BASE"
        },
        "generation_strategy": {
            "$ref": "#/components/schemas/GenerationStrategy",
            "default": "GENERATE"
        },
        "tool": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationTool"
                },
                {
                    "type": "null"
                }
            ]
        },
        "video_duration": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Video Duration"
        },
        "source_prediction_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Source Prediction Id"
        },
        "generative_models_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Models Id"
        },
        "autogenerated": {
            "type": "boolean",
            "title": "Autogenerated",
            "default": false
        },
        "config": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Config"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "predictions",
        "width",
        "height"
    ],
    "title": "CompletedGenerationCreate",
    "description": "Import a generation as already completed with result media attached."
}

Responses

{
    "id": "f15761b6-7280-4a69-98b7-f39bad6ecb51",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "f7c18fd5-dda0-4590-b5f4-1c1bf7557b81",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "ab4e969a-1aba-4ac6-90f3-b5166a6af00b",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "12af7b2c-1482-44fc-841a-23f0135e5cac",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "19664a91-8598-40ff-8b66-108af18a1330",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "1a800b36-d7f4-4810-923a-e239514224cb",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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)
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
subject_id query No Filter by subject ID
tools query No Filter by one or more generation tool types (OR logic)

Responses

{
    "data": [
        {
            "id": "168158d1-83b9-4061-8e83-ddf8dd42962f",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "batch_size": 0,
            "status": "PENDING",
            "subject_id": null,
            "product_id": null,
            "subject_image_url": null,
            "product_image_url": null,
            "product2_id": null,
            "product2_image_url": null,
            "width": 0,
            "height": 0,
            "seed": 0,
            "refine": true,
            "scale_factor": null,
            "framing": 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": "f54f88a6-6c95-4cce-9f0c-e8e828a71b8a",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "generation_id": "8884094c-25f2-441b-9ba0-d1b9ac462ca9",
                    "shot_type": null,
                    "generative_workflow_execution_id": 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": "d4bf8d29-7802-4031-8838-8b5ddb6d618f",
                            "created_at": "2022-04-13T15:42:05.901Z",
                            "updated_at": "2022-04-13T15:42:05.901Z",
                            "prediction_id": "e525839f-0521-4b3a-b71e-7d90ddb5ab69",
                            "task_id": null,
                            "result_image_media": null
                        }
                    ],
                    "result_image_media": null,
                    "result_video_media": null,
                    "refined_image_url": null
                }
            ],
            "owner_id": "c61f9c99-a386-4767-a6fa-2996eba1bf30",
            "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,
            "has_subject": true,
            "has_product": true,
            "has_product2": true,
            "garment_placement_base_image_url": null,
            "mannequin_base_image_url": null,
            "reference_images_paths": [
                "string"
            ],
            "generative_models_id": null,
            "autogenerated": true,
            "is_agentic": true,
            "generative_workflow_template_id": null,
            "generative_workflow_revision": null,
            "generative_workflow_engine": null,
            "production_request_id": null,
            "organization_id": null,
            "deleted_at": null,
            "subject_image_media": null,
            "product_image_media": null,
            "product2_image_media": null,
            "garment_placement_base_image_media": null,
            "mannequin_base_image_media": null,
            "garment_placement_mask_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": "c8c7e44d-19ae-4549-81bc-611c62024084",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "45203a59-d0ad-4275-a340-007b41b4f8bd",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "3578dc28-034d-4264-a0e0-720cff5610d5",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "e6613b2c-42e8-4212-98da-72455fc431c0",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "4412b424-dcdb-4574-bb7e-f869f778f8b0",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "e4ce1a2f-804f-4254-9362-02d83ae5c8b8",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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"
}

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

[
    "deb86149-59ce-4f2a-a1ed-93f46522eefd"
]
⚠️ 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": "e0928b02-1056-464d-9db2-662deacf5486",
        "created_at": "2022-04-13T15:42:05.901Z",
        "updated_at": "2022-04-13T15:42:05.901Z",
        "batch_size": 0,
        "status": "PENDING",
        "subject_id": null,
        "product_id": null,
        "subject_image_url": null,
        "product_image_url": null,
        "product2_id": null,
        "product2_image_url": null,
        "width": 0,
        "height": 0,
        "seed": 0,
        "refine": true,
        "scale_factor": null,
        "framing": 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": "8d82efc8-85bb-4fc3-baa5-5ca1977a8671",
                "created_at": "2022-04-13T15:42:05.901Z",
                "updated_at": "2022-04-13T15:42:05.901Z",
                "generation_id": "e56f1bc1-1724-4e83-8e15-3a455de492aa",
                "shot_type": null,
                "generative_workflow_execution_id": 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": "177e9472-c2ed-4b78-b878-f0c2b35e95c8",
                        "created_at": "2022-04-13T15:42:05.901Z",
                        "updated_at": "2022-04-13T15:42:05.901Z",
                        "prediction_id": "5ff13b75-6425-45c7-84e4-e8fe55cf63cb",
                        "task_id": null,
                        "result_image_media": null
                    }
                ],
                "result_image_media": null,
                "result_video_media": null,
                "refined_image_url": null
            }
        ],
        "owner_id": "e766e2b9-b869-490d-a54f-6bccf682710d",
        "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,
        "has_subject": true,
        "has_product": true,
        "has_product2": true,
        "garment_placement_base_image_url": null,
        "mannequin_base_image_url": null,
        "reference_images_paths": [
            "string"
        ],
        "generative_models_id": null,
        "autogenerated": true,
        "is_agentic": true,
        "generative_workflow_template_id": null,
        "generative_workflow_revision": null,
        "generative_workflow_engine": null,
        "production_request_id": null,
        "organization_id": null,
        "deleted_at": null,
        "subject_image_media": null,
        "product_image_media": null,
        "product2_image_media": null,
        "garment_placement_base_image_media": null,
        "mannequin_base_image_media": null,
        "garment_placement_mask_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/{id}/restore

Restore Generation

Description

Restore a soft-deleted generation (admin only).

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"
}

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_image": null,
    "mask": null,
    "subject_id": null,
    "product_id": null,
    "prompt": null,
    "reference_images": null,
    "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_image": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "$ref": "#/components/schemas/MediaInput"
                }
            ],
            "title": "Base Image"
        },
        "mask": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "$ref": "#/components/schemas/MediaInput"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mask"
        },
        "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": {
            "anyOf": [
                {
                    "items": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/MediaInput"
                            }
                        ]
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images"
        },
        "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) or COLOR_CHANGE"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id",
            "description": "Organization this generation belongs to"
        }
    },
    "type": "object",
    "required": [
        "base_image"
    ],
    "title": "EditRequest",
    "description": "Schema for base editing and product placement operations.\n\nImage inputs follow the MediaResource paradigm: each accepts either a\nbare storage path/URL string (transitional) or a structured ``MediaInput``\n(the canonical form). The backend resolves both to a URL, relocates the\ntemp upload, and ingests a ``MediaResource`` attachment.\n\nThe ``mask`` field carries an optional inpainting mask (a black/white\nimage where white marks the region to regenerate) as a first-class\nmedia slot on the generation, replacing the previous client-side\n\"burn a red rectangle into the base image\" approach which destroyed the\nmask information and never reached the backend."
}

Responses

{
    "id": "97f25954-eeda-4308-b9f5-cac712f3a7f3",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "01836072-8d1b-42c9-bdb5-8afec79d22fa",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "8e258211-f1ab-4c49-9360-92e73761d141",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "ef2945f8-06cb-4d36-a940-97477f738f46",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "8e8b70b6-be83-48a0-b3e5-b71a47500b83",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "86a4fd45-2f95-4a46-8725-9fa8e6e6950e",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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": "bc509c2f-6417-4640-b31b-88f839d4ca81",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "7d967202-f452-4504-8014-af2e4d086082",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "884eea80-3582-4a16-8075-c2f238f940a6",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "81976393-634a-4bc1-8e7b-c273a236d26b",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "05389264-e723-4742-b9ad-8b4814f383fe",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "be5b258b-2c3d-4bd5-a00e-46b1bcfb10af",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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": "b8dff2a0-f885-4a59-8e1a-f306dd8d60a5",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "fcb6e054-875c-4cc6-84ba-3bd6ce14c816",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "9b96ee75-0db9-4033-9434-d27dd6ae68a7",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "5b56ee75-f127-4e3d-a2b5-caca640dcf72",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "c65582ce-3904-4c68-acf1-6448612efe30",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "6dd443ba-a477-4a7e-b0c1-427b6f83d0f9",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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/{id}/retry

Retry Generation

Description

Retry a generation by resetting all predictions and re-dispatching to compute server.

Input parameters

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

Responses

{
    "id": "f3cb90e8-666c-4d7e-88b2-f82ba5a7fbdd",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "batch_size": 0,
    "status": "PENDING",
    "subject_id": null,
    "product_id": null,
    "subject_image_url": null,
    "product_image_url": null,
    "product2_id": null,
    "product2_image_url": null,
    "width": 0,
    "height": 0,
    "seed": 0,
    "refine": true,
    "scale_factor": null,
    "framing": 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": "e87a907f-94df-47aa-a08f-1bcd4d68cfa9",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "acda1e8d-949e-4484-b576-2baeae92660c",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "4c570738-c4ee-43ee-82ef-c4f6abe5cd3e",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "85e8a103-0bef-4fa0-87f9-ea4c91c6105f",
                    "task_id": null,
                    "result_image_media": null
                }
            ],
            "result_image_media": null,
            "result_video_media": null,
            "refined_image_url": null
        }
    ],
    "owner_id": "9f1a6dbc-e9fe-4a8c-8f81-9740969ef11d",
    "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,
    "has_subject": true,
    "has_product": true,
    "has_product2": true,
    "garment_placement_base_image_url": null,
    "mannequin_base_image_url": null,
    "reference_images_paths": [
        "string"
    ],
    "generative_models_id": null,
    "autogenerated": true,
    "is_agentic": true,
    "generative_workflow_template_id": null,
    "generative_workflow_revision": null,
    "generative_workflow_engine": null,
    "production_request_id": null,
    "organization_id": null,
    "deleted_at": null,
    "subject_image_media": null,
    "product_image_media": null,
    "product2_image_media": null,
    "garment_placement_base_image_media": null,
    "mannequin_base_image_media": null,
    "garment_placement_mask_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"
        },
        "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"
        },
        "product2_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Id"
        },
        "product2_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Product2 Image Url"
        },
        "width": {
            "type": "integer",
            "title": "Width"
        },
        "height": {
            "type": "integer",
            "title": "Height"
        },
        "seed": {
            "type": "integer",
            "title": "Seed"
        },
        "refine": {
            "type": "boolean",
            "title": "Refine"
        },
        "scale_factor": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scale Factor"
        },
        "framing": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Framing"
        },
        "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"
        },
        "has_subject": {
            "type": "boolean",
            "title": "Has Subject",
            "default": false
        },
        "has_product": {
            "type": "boolean",
            "title": "Has Product",
            "default": false
        },
        "has_product2": {
            "type": "boolean",
            "title": "Has Product2",
            "default": false
        },
        "garment_placement_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Garment Placement Base Image Url"
        },
        "mannequin_base_image_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mannequin 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
        },
        "is_agentic": {
            "type": "boolean",
            "title": "Is Agentic",
            "default": false
        },
        "generative_workflow_template_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Template Id"
        },
        "generative_workflow_revision": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Revision"
        },
        "generative_workflow_engine": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Engine"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        },
        "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"
                }
            ]
        },
        "mannequin_base_image_media": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MediaResourcePublic"
                },
                {
                    "type": "null"
                }
            ]
        },
        "garment_placement_mask_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",
        "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": "7e861561-53da-47ed-af1b-7f82e39a2bab",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "batch_size": 0,
            "status": "PENDING",
            "subject_id": null,
            "product_id": null,
            "subject_image_url": null,
            "product_image_url": null,
            "product2_id": null,
            "product2_image_url": null,
            "width": 0,
            "height": 0,
            "seed": 0,
            "refine": true,
            "scale_factor": null,
            "framing": 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": "82aafa00-1d93-44d4-9a82-34306253c15d",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "generation_id": "9f4661e4-0c28-42e5-895a-4189c4efa94a",
                    "shot_type": null,
                    "generative_workflow_execution_id": 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": "61204026-0557-4aaa-a215-a2c8864f5ec5",
                            "created_at": "2022-04-13T15:42:05.901Z",
                            "updated_at": "2022-04-13T15:42:05.901Z",
                            "prediction_id": "4fee4ddc-99e3-4af7-b8ce-fd7e1e5010c5",
                            "task_id": null,
                            "result_image_media": null
                        }
                    ],
                    "result_image_media": null,
                    "result_video_media": null,
                    "refined_image_url": null
                }
            ],
            "owner_id": "5b918b51-f8c0-41c3-b8d3-c120d6c5ed56",
            "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,
            "has_subject": true,
            "has_product": true,
            "has_product2": true,
            "garment_placement_base_image_url": null,
            "mannequin_base_image_url": null,
            "reference_images_paths": [
                "string"
            ],
            "generative_models_id": null,
            "autogenerated": true,
            "is_agentic": true,
            "generative_workflow_template_id": null,
            "generative_workflow_revision": null,
            "generative_workflow_engine": null,
            "production_request_id": null,
            "organization_id": null,
            "deleted_at": null,
            "subject_image_media": null,
            "product_image_media": null,
            "product2_image_media": null,
            "garment_placement_base_image_media": null,
            "mannequin_base_image_media": null,
            "garment_placement_mask_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"
}

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": "4241ab99-01bf-441a-8631-11abcd351bee",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "generation_id": "1ac2150a-a751-4f25-9750-b23a6fa8a369",
    "shot_type": null,
    "generative_workflow_execution_id": 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": "0da24373-e4a3-432d-949e-7fbd90dbc550",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "052bd3a8-596a-473b-87a8-fc43a80a426c",
            "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"
        },
        "generative_workflow_execution_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Execution Id"
        },
        "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": "b5ad9d7a-8b94-4bd5-8b61-3a15fd875057",
        "shot_id": "447324c5-7ccb-4dc8-897d-4dc43c9dd197",
        "version": 0,
        "notes": null,
        "shot_status": "PENDING",
        "shot_revision_status": null,
        "automatic_quality_assessment_status": null,
        "post_prod_source": null,
        "post_prod_fallback_reason": 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": "e919c739-2af8-45f5-b85a-0418c77e8e50",
                "shot_revision_id": "2081fb7b-0a7d-4242-9292-6339d9d90289",
                "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": "2a3060cc-a68d-49a0-8fff-a32a4241ea0f",
                "created_at": "2022-04-13T15:42:05.901Z",
                "updated_at": "2022-04-13T15:42:05.901Z",
                "integration_id": "e4e8080c-402f-426b-a663-0fe595c14be0",
                "push_status": "PENDING",
                "pushed_at": null,
                "completed_at": null,
                "error_message": null,
                "failure_reason": null,
                "integration_name": 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": "88596923-05ef-4ec0-a4f4-c796c6843318",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "generation_id": "dc8424b2-30a6-48b8-ab48-c58290dc0ee4",
            "shot_type": null,
            "generative_workflow_execution_id": 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": "77dd6ede-6f8a-4430-abdd-642f67b8e1ae",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "prediction_id": "3145aa4a-94dc-4b64-b1e9-fc2568fbe8eb",
                    "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": [
        "41b614a3-c827-4349-a4e1-444f67f0d7ff"
    ]
}
⚠️ 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": [
        "248485c5-cdc6-4252-aa7e-39b707693bec"
    ],
    "deleted_predictions": [
        "0f1f70a4-e1e9-4c18-bc4d-ef82499f216c"
    ]
}
⚠️ 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": "3ce96bb6-67de-4484-a541-72db7fa40410",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "generation_id": "0cbcc35d-ab20-48d2-b930-4028ad383319",
    "shot_type": null,
    "generative_workflow_execution_id": 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": "16aa3cd5-a51e-4f08-8de1-bfdc2ac443e4",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "cc324540-826c-441f-ba95-95fbcab0d43d",
            "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"
        },
        "generative_workflow_execution_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Generative Workflow Execution Id"
        },
        "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": "479568ee-e43a-4948-815b-6f7bc268a2d6",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "217fdb94-d5a4-4552-b38a-6bc72e5d5f81",
            "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": "ea76c798-a02d-4455-9b7a-20f16eb0f486",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "prediction_id": "e2103ded-9c20-443c-abe6-6b091b0d98b6",
    "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": [
        "3e56f1b7-5ce4-47ab-ae1e-e0c8950788a6"
    ],
    "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": "8c2dc149-5f10-4e86-950d-aefd8a5da81d",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "prediction_id": "f97c8b1f-7629-4f90-89b6-f81e4632ddcf",
            "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

app__models__generation__ErrorCategory

Type: string

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

CompletedGenerationCreate

Name Type Description
autogenerated boolean
config
extra_prompt
framing
garment_placement_base_image_url
generated_prompt
generation_strategy GenerationStrategy
generation_type GenerationType
generative_models_id
height integer
mannequin_base_image_url
organization_id Organization this generation belongs to
pose_preset_id
predictions Array<CompletedPredictionInput>
product2_description
product2_id
product2_slug
product_description
product_id
product_slug
reference_image_strength
reference_images_paths Array<string>
refine boolean
scale_factor
seed
shot_type_id
shot_type_string
source_prediction_id
subject_description
subject_id
subject_slug
tool
video_duration
width integer

CompletedPredictionInput

Name Type Description
duration_seconds
error_category
error_message
favourite boolean
result_image_url
result_video_url
seed
status PredictionStatus

CroppingPosition

Type: string

EditRequest

Name Type Description
base_image
batch_size integer Batch size for the generation
generative_models_id Optional generation model ID for the editing operation
height Image height (auto-determined if not provided)
mask
organization_id Organization this generation belongs to
product_id Product ID for the edit
prompt Optional prompt for the operation
reference_images
subject_id Subject ID for the edit
tool Tool type: EDIT (default) or COLOR_CHANGE
width Image width (auto-determined if not provided)

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
failure_reason
id string(uuid)
integration_id string(uuid)
integration_name
push_status PushStatus
pushed_at
updated_at string(date-time)

GenerationPublic

Name Type Description
autogenerated boolean
batch_size integer
created_at string(date-time)
deleted_at
extra_prompt
framing
garment_placement_base_image_media
garment_placement_base_image_url
garment_placement_mask_media
generated_prompt
generation_strategy GenerationStrategy
generation_type GenerationType
generative_models_id
generative_workflow_engine
generative_workflow_revision
generative_workflow_template_id
has_product boolean
has_product2 boolean
has_subject boolean
height integer
id string(uuid)
is_agentic boolean
mannequin_base_image_media
mannequin_base_image_url
organization_id
owner_id string(uuid)
predictions Array<PredictionPublic>
product2_description
product2_id
product2_image_media
product2_image_url
product_description
product_id
product_image_media
product_image_url
production_request_id
reference_images_media
reference_images_paths Array<string>
refine boolean
scale_factor
seed integer
shot_id
shot_type_id
shot_type_string
status GenerationStatus
subject_description
subject_id
subject_image_media
subject_image_url
tool
updated_at string(date-time)
width integer

GenerationsPublic

Name Type Description
count integer
data Array<GenerationPublic>

GenerationStatus

Type: string

GenerationStrategy

Type: string

GenerationTool

Type: string

GenerationType

Type: string

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)

MediaInput

Name Type Description
alt_text
caption
color_profile
dominant_color
duration
height
media_resource_id
protected boolean
url
width

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)
generative_workflow_execution_id
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

ProductionRequestStatusKey

Type: string

PushFailureReason

Type: string

PushStatus

Type: string

QualityAssessmentStatus

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

RoleName

Type: string

RolePublic

Name Type Description
description
id string(uuid)
name RoleName

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
automatic_quality_assessment_status
created_at string(date-time)
display_name string
effective_image_url
id string(uuid)
images Array<ShotRevisionImagePublic>
notes
owner
owner_id
post_prod_fallback_reason
post_prod_source
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 ProductionRequestStatusKey
updated_at string(date-time)
version integer

ShotRevisionStatus

Type: string

ShotTypeFraming

Type: string

UserSummary

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

ValidationError

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

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2