{
  "openapi": "3.1.0",
  "info": {
    "title": "ImagePipeline",
    "description": "**ImagePipeline** is an identity generation API for developers and product teams.\n\nGenerate, preserve, swap, and animate real people using open-source models.\nAll endpoints are independent primitives that compose freely into full content workflows.\n\n---\n\n### Authentication\n\nEvery request requires an `X-API-Key` header:\n\n```\nX-API-Key: <your_api_key>\n```\n\nGet your key from the [dashboard](https://imagepipeline.io/dashboard).\n\n---\n\n### How jobs work\n\nAll compute endpoints are **asynchronous** — they return immediately with a `job_id`\nand `status: queued`. Retrieve the result in one of two ways:\n\n| Method | How |\n|---|---|\n| **Poll** | `GET /{endpoint}/status/{job_id}` until `status` is `completed` or `failed` |\n| **Webhook** | Pass `callback_url` in the request body — we POST a `WebhookEvent` on completion |\n\nRecommended: use webhooks for production, polling for development.\n\n---\n\n### Result URL lifecycle\n\n> ⚠️ **Result URLs expire within 24 hours.**\n>\n> `result_url` is a temporary pre-signed download link.\n> Download and store the file in your own storage immediately after the job completes.\n> Do not persist the URL itself — it will stop working.\n\n---\n\n### Composable workflows\n\nEvery endpoint is an independent primitive. Chain them in any order:\n\n| Workflow | Steps |\n|---|---|\n| **Identity** | Generate → Lock → Try-on → Animate |\n| **Content** | Generate → Faceswap → Background → Upscale |\n| **Brand** | Generate → Background → Branding → Upscale |\n\n---\n\n### Request format\n\nAll request bodies are **flat JSON** — no nested `payload` wrapper:\n\n```json\n{\n  \"prompt\": \"a person in a red jacket on a rooftop\",\n  \"height\": 1024,\n  \"width\": 1024,\n  \"output_format\": \"webp\",\n  \"callback_url\": \"https://yourserver.com/webhook\"\n}\n```\n\n---\n\n### Compliance\n\nAll outputs include embedded **C2PA provenance metadata** satisfying\nEU AI Act Article 50 (AI-generated content disclosure).\nImagePipeline processes media ephemerally — we are a data processor,\nnot a data controller. Your inputs and outputs are never stored long-term.\n",
    "version": "v1",
    "x-result-url-notice": "Result URLs returned by this API are temporary pre-signed download links. They expire shortly after the job completes. Download and persist the file in your own storage before the TTL elapses."
  },
  "paths": {
    "/profiles/v1": {
      "post": {
        "tags": [
          "Profiles"
        ],
        "summary": "Create identity profile",
        "description": "Create a named identity profile that stores an adapter config snapshot and an optional pointer to your own S3 bucket.\n\n**Zero data retention:** ImagePipeline never stores face images. The S3 config is a pointer to *your* bucket — we never access it. Your encryption key is never sent to or stored by this API.\n\nOnce created, pass `profile_id` in any identity endpoint request (`/identity/lock`, `/identity/faceswap`, `/creator/tryon`, etc.) to apply this profile's config automatically.",
        "operationId": "create_profile_profiles_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityProfileCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "List identity profiles",
        "description": "Return all identity profiles for the authenticated user, newest first.",
        "operationId": "list_profiles_profiles_v1_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfileListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/v1/{profile_id}": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Get identity profile",
        "description": "Fetch a single identity profile by ID.",
        "operationId": "get_profile_profiles_v1__profile_id__get",
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Profile Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Profiles"
        ],
        "summary": "Update identity profile",
        "description": "Partially update a profile. Only fields included in the request body are changed. Adapter config fields (prompt_template, steps, cfg_scale, etc.) are merged — omitted fields keep their existing values.",
        "operationId": "update_profile_profiles_v1__profile_id__patch",
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Profile Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityProfileUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Profiles"
        ],
        "summary": "Delete identity profile",
        "description": "Delete an identity profile. This removes the profile record and its adapter config snapshot. It does NOT delete anything from your S3 bucket — your reference images remain under your control.",
        "operationId": "delete_profile_profiles_v1__profile_id__delete",
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Profile Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/faceswap/image/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Faceswap Image",
        "description": "Swap faces in images with photorealistic results\n\nHigh-quality face replacement using InSwapper + GFPGAN technology.\nPreserves facial expressions, lighting conditions, and natural skin tones\nfor seamless blending.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- High-quality face swapping with InSwapper 128\n- GFPGAN face restoration\n- Configurable upscaling and restoration strength\n- Natural blending and seamless results",
        "operationId": "faceswap_image_identity_faceswap_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceswapRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/faceswap/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Faceswap Status",
        "description": "Check status of face swap job\n\nReturns the current status and progress of a face swap job.\nOnly the user who created the job can check its status.",
        "operationId": "get_faceswap_status_identity_faceswap_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/lock/image/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Lock Identity",
        "description": "Lock facial identity in image generation\n\nPreserve and lock a specific facial identity across image variations and edits.\nEnsures consistent face representation in generated content.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Facial identity preservation\n- Consistent face generation\n- Identity-aware image editing\n- Cross-variation face consistency",
        "operationId": "lock_identity_identity_lock_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityLockRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/lock/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Lock Status",
        "description": "Check status of identity lock job\n\nReturns the current status and progress of an identity lock job.\nOnly the user who created the job can check its status.",
        "operationId": "get_lock_status_identity_lock_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/replace/image/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Replace Identity",
        "description": "Replace facial identity in images\n\nSeamlessly replace one facial identity with another in existing images.\nPerfect for creative content, product demonstrations, and privacy protection.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Facial identity replacement\n- Natural face blending\n- Expression preservation\n- High-quality face swapping",
        "operationId": "replace_identity_identity_replace_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityReplaceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/replace/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Replace Status",
        "description": "Check status of identity replace job\n\nReturns the current status and progress of an identity replace job.\nOnly the user who created the job can check its status.",
        "operationId": "get_replace_status_identity_replace_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/creator/instamodel/image/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Create Instamodel",
        "description": "Generate consistent AI models for creator content\n\nCreate photorealistic AI models with consistent facial features for use in\ninfluencer content, ads, and product demonstrations. Perfect for building\na consistent brand identity with AI-generated models.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Consistent face generation across multiple images\n- Photorealistic AI models\n- Face identity preservation\n- Professional quality outputs",
        "operationId": "create_instamodel_creator_instamodel_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstaModelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/creator/instamodel/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Instamodel Status",
        "description": "Check status of instamodel generation job\n\nReturns the current status and progress of an instamodel generation job.\nOnly the user who created the job can check its status.",
        "operationId": "get_instamodel_status_creator_instamodel_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/creator/tryon/image/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Virtual Tryon",
        "description": "Create realistic virtual try-on experiences\n\nPlace clothing, accessories, and fashion items naturally on models or real people.\nAI ensures natural fitting, realistic textures, and proper draping for lifelike results.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Virtual clothing try-on\n- Natural fitting and draping\n- Realistic texture rendering\n- Lifelike results",
        "operationId": "virtual_tryon_creator_tryon_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VirtualTryonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/creator/tryon/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Job Status",
        "description": "Get virtual try-on job status",
        "operationId": "get_job_status_creator_tryon_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/voice/clone/v1": {
      "post": {
        "tags": [
          "Identity"
        ],
        "summary": "Clone Voice",
        "description": "Clone a voice and generate speech in that voice.",
        "operationId": "clone_voice_identity_voice_clone_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceCloneRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/identity/voice/clone/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get Job Status",
        "description": "Get voice clone job status",
        "operationId": "get_job_status_identity_voice_clone_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/image/v1": {
      "post": {
        "tags": [
          "Generate"
        ],
        "summary": "Generate Image",
        "description": "Generate high-quality images from text descriptions\n\nCreate stunning images using advanced AI. Supports detailed prompts,\nnegative prompts, and customizable dimensions for professional results.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Text-to-image generation\n- Customizable dimensions and quality\n- Advanced prompt engineering support\n- Negative prompt support",
        "operationId": "generate_image_generate_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Generate"
        ],
        "summary": "Get Generation Status",
        "description": "Check the current status of an image generation job. Poll this endpoint or use callback_url for webhook delivery.",
        "operationId": "get_generation_status_generate_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/video/v1": {
      "post": {
        "tags": [
          "Generate"
        ],
        "summary": "Generate Video",
        "description": "Generate animated videos from images or text\n\nTransform static images into dynamic video content or create videos directly from\ntext descriptions. Perfect for social media, ads, and product demonstrations.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Image-to-video generation\n- Text-to-video generation  \n- Customizable video dimensions and duration\n- Motion control and guidance",
        "operationId": "generate_video_generate_video_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateVideoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/video/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Generate"
        ],
        "summary": "Get Video Status",
        "description": "Check status of video generation job (Redis final state)\n\nReturns the persistent job state from Redis. For real-time updates,\nuse WebSocket connection: ws://api/ws/job/{job_id}\n\nThis endpoint is optimized for simple status checks, not real-time monitoring.",
        "operationId": "get_video_status_generate_video_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/speech/v1": {
      "post": {
        "tags": [
          "Generate"
        ],
        "summary": "Generate Speech",
        "description": "Generate natural-sounding speech from text\n\nConvert text into high-quality audio speech with support for multiple languages\nand customizable voice parameters.\n\n**Plan-based routing:**\n- All plans supported → Dedicated processing queues\n\n**Features:**\n- High-quality text-to-speech synthesis\n- Multiple language support\n- Voice cloning capabilities\n- Customizable speech parameters",
        "operationId": "generate_speech_generate_speech_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextToSpeechRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/speech/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Generate"
        ],
        "summary": "Get Speech Status",
        "description": "Check status of speech generation job (Redis final state)\n\nReturns the persistent job state from Redis. For real-time updates,\nuse WebSocket connection: ws://api/ws/job/{job_id}\n\nThis endpoint is optimized for simple status checks, not real-time monitoring.",
        "operationId": "get_speech_status_generate_speech_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/3d/v1": {
      "post": {
        "tags": [
          "Generate"
        ],
        "summary": "Generate 3D",
        "description": "Generate 3D models from images\n\nTransform 2D images into high-quality 3D meshes with optional texture painting.\nPerfect for creating 3D assets and product visualization.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Image-to-3D mesh generation\n- Automatic texture painting\n- Multiple export formats\n- High-quality geometry",
        "operationId": "generate_3d_generate_3d_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Generate3DRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/generate/3d/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Generate"
        ],
        "summary": "Get 3D Status",
        "description": "Check status of 3D generation job\n\nReturns the current status and progress of a 3D model generation job.\nOnly the user who created the job can check its status.",
        "operationId": "get_3d_status_generate_3d_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/edit/image/v1": {
      "post": {
        "tags": [
          "Edit"
        ],
        "summary": "Edit Image",
        "description": "Edit and enhance images with AI\n\nComprehensive image editing capabilities including enhancement, object manipulation,\nstyle transfer, background replacement, and image restoration.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- AI-powered image enhancement\n- Object removal and addition\n- Style transfer and artistic effects\n- Background replacement\n- Image upscaling and restoration",
        "operationId": "edit_image_edit_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageEditingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/edit/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Edit"
        ],
        "summary": "Get Edit Status",
        "description": "Check status of image editing job\n\nReturns the current status and progress of an image editing job.\nOnly the user who created the job can check its status.",
        "operationId": "get_edit_status_edit_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/background/change/image/v1": {
      "post": {
        "tags": [
          "Background"
        ],
        "summary": "Change Background",
        "description": "Replace image backgrounds intelligently\n\nSeamlessly replaces backgrounds while perfectly preserving your main subject.\nMaintains natural lighting, shadows, and edge details for professional-quality results.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Intelligent background replacement\n- Subject preservation\n- Natural lighting and shadows\n- Edge detail retention",
        "operationId": "change_background_background_change_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackgroundChangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/background/change/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Background"
        ],
        "summary": "Get Job Status",
        "description": "Get background change job status",
        "operationId": "get_job_status_background_change_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/background/remove/image/v1": {
      "post": {
        "tags": [
          "Background",
          "Background"
        ],
        "summary": "Remove image background",
        "description": "Removes the background from an image using BiRefNet (best-in-class for hair and fine edges).\n\nAlways returns a transparent PNG cutout (`cutout_url`). When `recolor` is provided, also returns a flat-background composite (`result_url`). Set `drop_shadow: true` to add a soft drop shadow before compositing.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues",
        "operationId": "remove_background_background_remove_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackgroundRemoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/background/remove/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Background"
        ],
        "summary": "Get Remove Status",
        "description": "Get background removal job status",
        "operationId": "get_remove_status_background_remove_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/branding/logo/image/v1": {
      "post": {
        "tags": [
          "Branding"
        ],
        "summary": "Generate Logo",
        "description": "Generate a branded image and optionally stamp your company logo\n\nProduces a branded image from a text prompt using AI generation (QwenImage).\nIf `payload.logo_url` is provided, your company logo is automatically stamped\nin the bottom-right corner at 50% opacity using Pillow — no GPU required.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues",
        "operationId": "generate_logo_branding_logo_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingLogoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/branding/logo/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Branding"
        ],
        "summary": "Get Job Status",
        "description": "Get branding logo generation job status",
        "operationId": "get_job_status_branding_logo_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/branding/template/image/v1": {
      "post": {
        "tags": [
          "Branding"
        ],
        "summary": "Generate Branding Template",
        "description": "Generate branded templates and designs\n\nCreate professional branding templates, social media graphics, and marketing materials\nwith AI-powered design generation.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- Branded template generation\n- Social media graphics\n- Marketing material creation\n- Brand color palette support\n- Consistent brand styling",
        "operationId": "generate_branding_template_branding_template_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingTemplateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/branding/template/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Branding"
        ],
        "summary": "Get Template Status",
        "description": "Check status of branding template generation job\n\nReturns the current status and progress of a template generation job.\nOnly the user who created the job can check its status.",
        "operationId": "get_template_status_branding_template_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/upscale/image/v1": {
      "post": {
        "tags": [
          "Upscale"
        ],
        "summary": "Upscale Image",
        "description": "Upscale and enhance image quality\n\nIncreases image resolution while enhancing quality and preserving fine details.\nAdvanced AI ensures sharp, professional results suitable for print and high-resolution displays.\n\n**Plan-based routing:**\n- PRO plan → Standard processing queue\n- STUDIO plan → Priority processing queue\n- Enterprise plans → Dedicated high-performance queues\n\n**Features:**\n- AI-powered upscaling\n- Quality enhancement\n- Detail preservation\n- Multiple resolution options",
        "operationId": "upscale_image_upscale_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpscaleImageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/upscale/image/v1/status/{job_id}": {
      "get": {
        "tags": [
          "Upscale"
        ],
        "summary": "Get Job Status",
        "description": "Get image upscale job status",
        "operationId": "get_job_status_upscale_image_v1_status__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/upload/image/v1": {
      "post": {
        "tags": [
          "Upload"
        ],
        "summary": "Upload Image",
        "description": "Upload an image to storage and receive a URL you can pass to any edit, try-on, or identity endpoint.",
        "operationId": "upload_image_upload_image_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_image_upload_image_v1_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/event-schema": {
      "get": {
        "tags": [
          "Webhooks",
          "Webhooks"
        ],
        "summary": "WebhookEvent payload schema",
        "description": "Returns an example `WebhookEvent` payload — the exact JSON object we POST to your `callback_url` when a job completes or fails.\n\nUse this endpoint to inspect the schema interactively. Refer to the `WebhookEvent` model in the Schemas section below for full field descriptions.",
        "operationId": "webhook_event_schema_webhooks_event_schema_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEvent"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdapterConfigSnapshot": {
        "properties": {
          "intent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intent Id",
            "description": "Intent this profile is optimised for."
          },
          "prompt_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Template",
            "description": "Jinja2 prompt template. {{user_prompt}} is always available."
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt"
          },
          "steps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "cfg_scale": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cfg Scale"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Fixed seed for reproducible outputs. Omit or set to None for a random seed each job."
          },
          "seed_strategy": {
            "type": "string",
            "title": "Seed Strategy",
            "description": "'random' — new seed each job; 'fixed' — always use fixed_seed; 'user' — honour per-request seed if provided.",
            "default": "random"
          },
          "fixed_seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Seed",
            "description": "Seed to use when seed_strategy='fixed'."
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand color palette as hex codes. Applied to every job using this profile."
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "Default output image height in pixels."
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "Default output image width in pixels."
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format",
            "description": "Default output format: 'webp', 'jpeg', or 'png'. Use 'png' for editing chains; 'webp' for app delivery."
          },
          "prompt_template_mode": {
            "type": "string",
            "title": "Prompt Template Mode",
            "description": "How to combine the profile's prompt_template with the caller's prompt. 'suffix' (default) appends the template after; 'prefix' prepends it before.",
            "default": "suffix"
          },
          "extra_params": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Params"
          }
        },
        "type": "object",
        "title": "AdapterConfigSnapshot",
        "description": "Frozen copy of the adapter config active when the profile was created or\nlast updated. Stored alongside the profile so jobs are reproducible even\nif the system default adapter config changes."
      },
      "BackgroundChangeRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the image whose background will be replaced."
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the new background — e.g. `beach at sunset`, `white studio background`, `forest path in autumn`."
          },
          "use_segmentation": {
            "type": "boolean",
            "title": "Use Segmentation",
            "description": "When `true` (default), the subject is isolated and composited back over the generated background — preserves subject edges cleanly. When `false`, the full image edit is used with colour correction.",
            "default": true
          },
          "tone_correction": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tone Correction",
            "description": "Colour correction strength (0.0–1.0). Blends the edited background's colour profile toward the original to reduce drift. Default: `0.6`."
          },
          "subject_description": {
            "type": "string",
            "title": "Subject Description",
            "description": "Short description of the main subject to preserve — e.g. `protein powder tub`, `glass bottle`, `sneakers`, `person`. Helps the segmentation model identify exactly what to keep."
          },
          "has_text": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has Text",
            "description": "Whether the image contains visible text or labels. Set to `false` to skip text detection and save ~2–3 s. Omit to auto-detect."
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand colour palette as hex codes. Blended into the output."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Webhook URL. When the job completes or fails we POST a `WebhookEvent` to this URL. `result_url` is temporary (~24 h) — download the file promptly."
          }
        },
        "type": "object",
        "required": [
          "input_image",
          "prompt",
          "subject_description"
        ],
        "title": "BackgroundChangeRequest",
        "description": "Replace the background of an image using a text description."
      },
      "BackgroundRemoveRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the image to process."
          },
          "recolor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recolor",
            "description": "Hex color to use as the new background, e.g. `#FFFFFF` or `F0F0F0`. When omitted, only the transparent cutout is returned."
          },
          "drop_shadow": {
            "type": "boolean",
            "title": "Drop Shadow",
            "description": "Add a soft drop shadow beneath the subject before compositing.",
            "default": false
          },
          "shadow_opacity": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Shadow Opacity",
            "description": "Shadow darkness 0–1.",
            "default": 0.38
          },
          "shadow_blur": {
            "type": "number",
            "maximum": 0.5,
            "minimum": 0.0,
            "title": "Shadow Blur",
            "description": "Blur radius as fraction of image width.",
            "default": 0.018
          },
          "shadow_dy": {
            "type": "number",
            "maximum": 0.5,
            "minimum": -0.5,
            "title": "Shadow Dy",
            "description": "Vertical shadow offset as fraction of height.",
            "default": 0.022
          },
          "shadow_dx": {
            "type": "number",
            "maximum": 0.5,
            "minimum": -0.5,
            "title": "Shadow Dx",
            "description": "Horizontal shadow offset as fraction of width.",
            "default": 0.004
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format for the composited result.",
            "default": "png"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. A `WebhookEvent` is POSTed when the job completes or fails. `result_url` in the payload is temporary (∼24 h) — download immediately."
          }
        },
        "type": "object",
        "required": [
          "input_image"
        ],
        "title": "BackgroundRemoveRequest"
      },
      "Body_upload_image_upload_image_v1_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "Image file to upload (PNG, JPEG, WebP, GIF — max 20 MB)."
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_image_upload_image_v1_post"
      },
      "BrandingLogoRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Text description of the branded image to generate."
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url",
            "description": "Public URL of your company logo (PNG or WebP with transparency recommended). Stamped at bottom-right corner at 50% opacity."
          },
          "height": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "description": "Output height in pixels (max 1024).",
            "default": 1024
          },
          "width": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "description": "Output width in pixels (max 1024).",
            "default": 1024
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "BrandingLogoRequest",
        "description": "Generate a branded image and optionally stamp your company logo."
      },
      "BrandingTemplateRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the branded asset to generate. You can include hex colour codes directly (e.g. 'use #FF5733 for the background')."
          },
          "height": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "description": "Output height in pixels (max 1024).",
            "default": 1024
          },
          "width": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "description": "Output width in pixels (max 1024).",
            "default": 1024
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "BrandingTemplateRequest",
        "description": "Generate a branded image template with your colour palette and style."
      },
      "FaceswapRequest": {
        "properties": {
          "target": {
            "type": "string",
            "title": "Target",
            "description": "Public URL of the target image (the body/scene where the face will appear)."
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Public URL of the source face image (the face to swap in)."
          },
          "upscale": {
            "type": "number",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Upscale",
            "description": "Output upscale factor (1.0–4.0).",
            "default": 1.5
          },
          "restore_weight": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Restore Weight",
            "description": "Face restoration strength (0.0–1.0). Higher = sharper face detail.",
            "default": 0.5
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/identity/profiles/v1`. When provided, the profile's settings are applied automatically."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "target",
          "source"
        ],
        "title": "FaceswapRequest",
        "description": "Swap a face from one image onto another."
      },
      "FailureReasonCode": {
        "type": "string",
        "enum": [
          "RATE_LIMIT_EXCEEDED",
          "CONCURRENT_JOBS_EXCEEDED",
          "INSUFFICIENT_BALANCE",
          "BILLING_FAILED",
          "INPUT_INVALID",
          "MODEL_ERROR",
          "STORAGE_ERROR",
          "TIMEOUT",
          "MODEL_UNAVAILABLE",
          "INTERNAL_ERROR",
          "CANCELLED"
        ],
        "title": "FailureReasonCode",
        "description": "Stable machine-readable failure codes returned in ``failure_reason_code``."
      },
      "Generate3DRequest": {
        "properties": {
          "image_path": {
            "type": "string",
            "title": "Image Path",
            "description": "Public URL or path of the input image to convert to 3D."
          },
          "mode": {
            "type": "string",
            "title": "Mode",
            "description": "Generation mode: `generate` (mesh only), `paint` (texture an existing mesh), or `generate_and_paint` (mesh + textures in one pass).",
            "default": "generate"
          },
          "mesh_save_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mesh Save Name",
            "description": "Optional filename for the output mesh (e.g. `model.obj`)."
          },
          "painted_save_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Painted Save Name",
            "description": "Optional filename for the textured/painted mesh."
          },
          "auto_unload": {
            "type": "boolean",
            "title": "Auto Unload",
            "description": "Unload the generation pipeline from GPU after completion to free memory.",
            "default": true
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "image_path"
        ],
        "title": "Generate3DRequest",
        "description": "Convert a 2D image into a 3D mesh (with optional texturing)."
      },
      "GenerateRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Text prompt describing the image to generate."
          },
          "height": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "description": "Output height in pixels (max 1024).",
            "default": 1024
          },
          "width": {
            "type": "integer",
            "maximum": 1024.0,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "description": "Output width in pixels (max 1024).",
            "default": 1024
          },
          "num_inference_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 50.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Inference Steps",
            "description": "Number of denoising steps. Default 8"
          },
          "guidance_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 20.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance Scale",
            "description": "Guidance scale. Omit to use the model default (0.0 for Z-Image Turbo)."
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "enhance_prompt": {
            "type": "boolean",
            "title": "Enhance Prompt",
            "description": "Run the prompt through a lightweight AI enhancer before generation. Expands terse prompts into detailed visual descriptions — useful for short or abstract inputs. Adds ~1–2 s. Default `false`.",
            "default": false
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url",
            "description": "Public URL of your company logo (PNG or WebP with transparency recommended). Stamped at bottom-right at 50% opacity."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/profiles/v1`. When provided, the profile's prompt_template and quality settings are applied automatically — keeping theme and brand context consistent across a generation chain."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "GenerateRequest",
        "description": "Generate a high-quality image from a text prompt."
      },
      "GenerateVideoRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the image to animate."
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the animation style or motion. Defaults to cinematic motion.",
            "default": "make this image come alive, cinematic motion, smooth animation"
          },
          "height": {
            "type": "integer",
            "maximum": 1536.0,
            "minimum": 32.0,
            "title": "Height",
            "description": "Output height in pixels (max 1536, must be divisible by 32).",
            "default": 512
          },
          "width": {
            "type": "integer",
            "maximum": 1536.0,
            "minimum": 32.0,
            "title": "Width",
            "description": "Output width in pixels (max 1536, must be divisible by 32).",
            "default": 896
          },
          "duration_seconds": {
            "type": "number",
            "maximum": 10.0,
            "minimum": 0.1,
            "title": "Duration Seconds",
            "description": "Video duration in seconds (0.1–10.0).",
            "default": 2.0
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility.",
            "default": 42
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input_image"
        ],
        "title": "GenerateVideoRequest",
        "description": "Animate a still image into a short video clip."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IdentityLockRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the source image whose identity will be locked and preserved."
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the desired scene or appearance changes. The person's identity is automatically preserved throughout."
          },
          "height": {
            "type": "integer",
            "maximum": 2048.0,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "description": "Output height in pixels (max 2048).",
            "default": 1024
          },
          "width": {
            "type": "integer",
            "maximum": 2048.0,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "description": "Output width in pixels (max 2048).",
            "default": 1024
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand colour palette as hex codes. Blended into the output."
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt",
            "description": "Negative prompt. Activates classifier-free guidance when set."
          },
          "num_inference_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Inference Steps",
            "description": "Number of diffusion steps (1–100). Higher = better quality but slower. Default: 8."
          },
          "guidance_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 20.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance Scale",
            "description": "Classifier-free guidance scale (1.0–20.0). Higher = follows prompt more strictly. Default: 1.5."
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/identity/profiles/v1`. When provided, the profile's settings override manual generation params."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "input_image",
          "prompt"
        ],
        "title": "IdentityLockRequest",
        "description": "Preserve and lock a person's identity while editing their scene or appearance."
      },
      "IdentityProfileCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "description": "Human-readable name for this profile, e.g. 'Anna — summer campaign'."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional notes about this identity profile."
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags",
            "description": "Optional tags for filtering, e.g. ['influencer', 'campaign-2026']."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Default webhook URL for job completion events from this profile. Overridable per-request."
          },
          "intent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intent Id",
            "description": "Optimise this profile for a specific intent, e.g. 'identity_lock'."
          },
          "prompt_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Template",
            "description": "Custom Jinja2 prompt template for this profile. Use {{user_prompt}} to inject the caller's prompt. Example: 'Portrait of Anna, {{user_prompt}}, consistent lighting'."
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt",
            "description": "Negative prompt applied to every job using this profile."
          },
          "steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 150.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "cfg_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 30.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cfg Scale"
          },
          "seed_strategy": {
            "type": "string",
            "title": "Seed Strategy",
            "description": "'random' — new seed per job; 'fixed' — always use fixed_seed; 'user' — honour per-request seed if provided.",
            "default": "random"
          },
          "fixed_seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Seed",
            "description": "Seed to use when seed_strategy='fixed'. Ignored for other strategies."
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand color palette as hex codes applied to all jobs from this profile (e.g. ['#FF5733', '#3498DB'])."
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "Default output image height."
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "Default output image width."
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format",
            "description": "Default output format: 'webp', 'jpeg', or 'png'. Use 'png' for editing chains; 'webp' for final app delivery."
          },
          "prompt_template_mode": {
            "type": "string",
            "title": "Prompt Template Mode",
            "description": "How to combine the profile's prompt_template with the caller's prompt. 'suffix' (default) appends the template after the user prompt; 'prefix' prepends it before.",
            "default": "suffix"
          },
          "extra_params": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Params",
            "description": "Additional model-specific parameters passed through to the worker."
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "IdentityProfileCreate",
        "description": "Request body for POST /identity/profiles/v1"
      },
      "IdentityProfileListResponse": {
        "properties": {
          "profiles": {
            "items": {
              "$ref": "#/components/schemas/IdentityProfileResponse"
            },
            "type": "array",
            "title": "Profiles"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "profiles",
          "total"
        ],
        "title": "IdentityProfileListResponse"
      },
      "IdentityProfileResponse": {
        "properties": {
          "profile_id": {
            "type": "string",
            "title": "Profile Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url"
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format"
          },
          "adapter_snapshot": {
            "$ref": "#/components/schemas/AdapterConfigSnapshot"
          },
          "job_count": {
            "type": "integer",
            "title": "Job Count",
            "description": "Total jobs run using this profile.",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          }
        },
        "type": "object",
        "required": [
          "profile_id",
          "name",
          "adapter_snapshot",
          "created_at",
          "updated_at"
        ],
        "title": "IdentityProfileResponse",
        "description": "Returned by all profile endpoints."
      },
      "IdentityProfileUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url"
          },
          "prompt_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Template"
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt"
          },
          "steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 150.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "cfg_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 30.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cfg Scale"
          },
          "seed_strategy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed Strategy",
            "description": "'random' | 'fixed' | 'user'"
          },
          "fixed_seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Seed"
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 64.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format"
          },
          "prompt_template_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Template Mode",
            "description": "'suffix' | 'prefix'"
          },
          "extra_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Params"
          }
        },
        "type": "object",
        "title": "IdentityProfileUpdate",
        "description": "Request body for PATCH /profiles/v1/{profile_id} — all fields optional."
      },
      "IdentityReplaceRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the image whose identity will be replaced."
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the new person — e.g. `caucasian woman with green eyes`, `30-year-old man with short dark hair and a beard`. The server constructs the full edit instruction from this description."
          },
          "use_segmentation": {
            "type": "boolean",
            "title": "Use Segmentation",
            "description": "When `true` (default), only skin and hair are edited; clothing, background, and text are preserved from the original via masking and compositing. When `false`, the edit applies to the full image with colour correction scoped to the non-skin/hair region.",
            "default": true
          },
          "tone_correction": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tone Correction",
            "description": "Colour correction strength after editing (0.0–1.0). Corrects colour drift in the edited region toward the original image. Default: `0.6`. Set to `0.0` to disable."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand colour palette as hex codes. Blended into the output."
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/profiles/v1`. Applies stored settings automatically."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Webhook URL. When the job completes or fails we POST a `WebhookEvent` to this URL. `result_url` is temporary (~24 h) — download the file promptly."
          }
        },
        "type": "object",
        "required": [
          "input_image",
          "prompt"
        ],
        "title": "IdentityReplaceRequest",
        "description": "Replace the identity in an image with a new described person."
      },
      "ImageEditingRequest": {
        "properties": {
          "input_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Image",
            "description": "Image(s) to edit. Pass a single URL string, or an array of URL strings to provide multiple reference images (e.g. two subjects to combine)."
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Instruction describing the edits to apply."
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode",
            "description": "Processing mode. Use `anime` to convert a photo to an illustrated/anime style."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette",
            "description": "Brand colour palette as hex codes (e.g. `['#FF5733']`). Blended into the output."
          },
          "num_inference_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Inference Steps",
            "description": "Number of diffusion steps (1–100). Higher = better quality but slower. Default: 8."
          },
          "guidance_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 20.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance Scale",
            "description": "Classifier-free guidance scale (0.0–20.0). Set to 0 to disable CFG (distilled/Lightning models). Default: 1.5."
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/profiles/v1`. When provided, the profile's prompt_template, quality settings, and brand palette are applied automatically — keeping theme and brand context consistent across an editing chain."
          },
          "refine_strength": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Refine Strength",
            "description": "Z-Image Turbo refinement pass after editing (0.0–1.0). At 0.25–0.40, preserves composition from the edit step while improving skin photorealism and texture detail. Omit or set to 0 to skip the refinement pass."
          },
          "faster_inference": {
            "type": "boolean",
            "title": "Faster Inference",
            "description": "When `true` (default), uses the Lightning LoRA distillation for fast 8-step inference. Set to `false` for higher-quality 20-step inference without distillation — slower but preserves finer product and skin details.",
            "default": true
          },
          "cfg_norm_strength": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cfg Norm Strength",
            "description": "CFG normalization strength (0.0–1.0). Rescales the guided prediction to match the magnitude of the conditioned-only prediction, preventing colour saturation and tone shifts caused by high `true_cfg_scale`. Try 0.5–0.8 when colours look oversaturated. 0 (default) disables it."
          },
          "product_saturation": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Saturation",
            "description": "Saturation multiplier applied to the product image (image 2) before editing. 0.0 = greyscale, 1.0 = unchanged, <1.0 desaturates (e.g. 0.85 reduces colour shift). Omit to use the server default (0.85)."
          },
          "tone_correction": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tone Correction",
            "description": "Post-edit tonal correction strength (0.0–1.0). Corrects colour drift that diffusion models introduce in edited regions — blends the colour profile of the edited area toward the original image. `0.0` disables it, `1.0` is full correction. Default: `0.6`. Lower values (`0.3–0.5`) preserve more of the model's generated colour."
          },
          "has_text": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has Text",
            "description": "Whether the image contains visible text, logos, or labels. When `false`, text detection (EasyOCR) is skipped — saves ~2–3 s if your image has no text. When `true` or omitted, text regions are auto-detected and preserved during background changes. Only applies to `bg_change` edits."
          },
          "has_product": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has Product",
            "description": "Whether the image contains a physical product as the main subject. Passed to the worker for routing and analytics. Does not affect mask logic."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "ImageEditingRequest",
        "description": "Edit or generate images using natural-language instructions."
      },
      "ImageFormat": {
        "type": "string",
        "enum": [
          "webp",
          "jpeg",
          "png"
        ],
        "title": "ImageFormat",
        "description": "Output image format.  Applies to all image-producing endpoints."
      },
      "InstaModelRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "Describe the scene, outfit, or style for the generated image."
          },
          "input_face": {
            "type": "string",
            "title": "Input Face",
            "description": "Public URL of the input face image."
          },
          "height": {
            "type": "integer",
            "maximum": 2048.0,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "description": "Output height in pixels (max 2048).",
            "default": 1024
          },
          "width": {
            "type": "integer",
            "maximum": 2048.0,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "description": "Output width in pixels (max 2048).",
            "default": 768
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Seed for reproducibility (omit for random)."
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt",
            "description": "Negative prompt applied to the generation."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/profiles/v1`. When provided, the profile's settings are applied automatically."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (~24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "input_face"
        ],
        "title": "InstaModelRequest",
        "description": "Generate a person image from a face photo and a text prompt."
      },
      "JobQueuedResponse": {
        "properties": {
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Unique job identifier."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "enum": [
              "queued",
              "pending",
              "processing",
              "completed",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "description": "Current job status — typically `queued` immediately after submission."
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint",
            "description": "Endpoint that created this job."
          },
          "estimated_time_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Time Seconds",
            "description": "Estimated processing time in seconds. Indicative only."
          },
          "queued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued At",
            "description": "ISO 8601 timestamp when the job was queued."
          },
          "estimated_cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Cost Usd",
            "description": "Estimated cost based on typical processing time for this endpoint and image size. Actual cost may vary. Queue wait time is not billed."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "JobQueuedResponse",
        "description": "Standard response returned by submit endpoints."
      },
      "JobStatusResponse": {
        "properties": {
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Unique job identifier."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "enum": [
              "queued",
              "pending",
              "processing",
              "completed",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "description": "Current job status."
          },
          "progress": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress",
            "description": "Processing progress as a percentage (0–100)."
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint",
            "description": "API endpoint that created this job."
          },
          "result_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Url",
            "description": "**Temporary URL** to the generated output file. Pre-signed link that expires within 24 hours — download and store the file in your own storage before the TTL elapses. All outputs include embedded C2PA provenance metadata (EU AI Act Art. 50 disclosure)."
          },
          "result_mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Mime Type",
            "description": "MIME type of the output, e.g. `image/webp`, `video/mp4`, `audio/wav`."
          },
          "queued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued At",
            "description": "ISO 8601 — job entered the queue."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "ISO 8601 — worker picked up the job."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "ISO 8601 — job finished."
          },
          "queue_wait_seconds": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Wait Seconds",
            "description": "Time spent waiting in queue (seconds)."
          },
          "inference_time_seconds": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Inference Time Seconds",
            "description": "Model inference time (seconds)."
          },
          "total_elapsed_seconds": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Elapsed Seconds",
            "description": "Total time from queue entry to completion (seconds)."
          },
          "queue_position": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Position",
            "description": "Estimated position in queue at submit time."
          },
          "error": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if the job failed."
          },
          "failure_reason_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FailureReasonCode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stable machine-readable failure code. Use for programmatic error handling.\n\n| Code | Meaning |\n|---|---|\n| `RATE_LIMIT_EXCEEDED` | Too many requests — back off and retry |\n| `CONCURRENT_JOBS_EXCEEDED` | Too many parallel jobs for your plan |\n| `INSUFFICIENT_BALANCE` | Account balance is $0 and no overage method on file |\n| `BILLING_FAILED` | Balance could not be deducted — contact support |\n| `INPUT_INVALID` | Malformed URL, unreachable image, or invalid parameters |\n| `MODEL_ERROR` | Inference pipeline error — retry or contact support |\n| `STORAGE_ERROR` | Output could not be stored — retry |\n| `TIMEOUT` | Job exceeded max processing time — retry |\n| `MODEL_UNAVAILABLE` | Model temporarily offline — retry in a few minutes |\n| `INTERNAL_ERROR` | Unexpected server error — contact support if persistent |\n| `CANCELLED` | Job was cancelled |\n"
          },
          "retryable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retryable",
            "description": "`true` if submitting the same request again may succeed."
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings",
            "description": "Non-fatal warnings or fallback notices generated during processing."
          },
          "prompt_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Hash",
            "description": "SHA-256 of the prompt. Use for deduplication or reproducing a result."
          },
          "processing_time_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Time Seconds",
            "description": "Total processing time in seconds. Queue wait time is excluded. Zero for failed jobs."
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd",
            "description": "Cost of this job in USD. Zero for failed jobs. Queue time is never charged."
          },
          "balance_remaining_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance Remaining Usd",
            "description": "Remaining balance in USD after this job."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "JobStatusResponse",
        "description": "Standard response returned by /status endpoints."
      },
      "PodRequest": {
        "properties": {
          "gpu_type_id": {
            "type": "string",
            "title": "Gpu Type Id",
            "description": "RunPod GPU type id",
            "default": "NVIDIA RTX A5000"
          },
          "cloud_type": {
            "type": "string",
            "title": "Cloud Type",
            "description": "SECURE or COMMUNITY",
            "default": "SECURE"
          },
          "docker_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Image",
            "description": "Override docker image"
          }
        },
        "type": "object",
        "title": "PodRequest"
      },
      "TextToSpeechRequest": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 1,
            "title": "Text",
            "description": "Text to convert to speech."
          },
          "language_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Id",
            "description": "Language code (e.g. `en`, `zh`, `ja`, `ko`, `he`).",
            "default": "en"
          },
          "target_voice_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Voice Path",
            "description": "Public URL of a reference voice audio file for voice cloning (WAV/MP3, 5–30 s recommended). Required for `/identity/voice/clone`. If omitted on `/generate/speech`, a default voice is used."
          },
          "max_new_tokens": {
            "type": "integer",
            "maximum": 1024.0,
            "minimum": 1.0,
            "title": "Max New Tokens",
            "description": "Maximum tokens to generate.",
            "default": 256
          },
          "exaggeration": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Exaggeration",
            "description": "Expressiveness level (0.0 = neutral, 1.0 = maximum).",
            "default": 0.5
          },
          "apply_watermark": {
            "type": "boolean",
            "title": "Apply Watermark",
            "description": "Embed an inaudible audio watermark in the output (recommended for compliance).",
            "default": true
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextToSpeechRequest",
        "description": "Convert text to speech, optionally with voice cloning from a reference sample."
      },
      "UploadResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes"
          }
        },
        "type": "object",
        "required": [
          "url",
          "filename",
          "content_type",
          "size_bytes"
        ],
        "title": "UploadResponse"
      },
      "UpscaleImageRequest": {
        "properties": {
          "input_image": {
            "type": "string",
            "title": "Input Image",
            "description": "Public URL of the image to upscale and enhance."
          },
          "scale": {
            "type": "integer",
            "title": "Scale",
            "description": "Upscale factor: `1` (enhance only), `2`, `3`, or `4`. Default: `4`.",
            "default": 4
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output format: `webp` (default), `jpeg`, or `png`.",
            "default": "webp"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "type": "object",
        "required": [
          "input_image"
        ],
        "title": "UpscaleImageRequest",
        "description": "Enhance and upscale an image to higher resolution."
      },
      "UserDetails": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "balance_remaining_usd": {
            "type": "number",
            "title": "Balance Remaining Usd",
            "description": "Remaining balance in USD",
            "default": 0.0
          },
          "model_trainings_remaining": {
            "type": "integer",
            "title": "Model Trainings Remaining",
            "description": "Model training slots remaining",
            "default": 0
          },
          "private_model_loads_remaining": {
            "type": "integer",
            "title": "Private Model Loads Remaining",
            "description": "Private model loads remaining",
            "default": 0
          },
          "plan_expiry_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Expiry Date"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "API Key for the user"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "plan"
        ],
        "title": "UserDetails"
      },
      "UserImage": {
        "properties": {
          "download_url": {
            "type": "string",
            "title": "Download Url"
          },
          "creation_timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Creation Timestamp"
          },
          "model_id": {
            "type": "string",
            "title": "Model Id"
          },
          "image_id": {
            "type": "string",
            "title": "Image Id"
          }
        },
        "type": "object",
        "required": [
          "download_url",
          "creation_timestamp",
          "model_id",
          "image_id"
        ],
        "title": "UserImage"
      },
      "UserModel": {
        "properties": {
          "model_id": {
            "type": "string",
            "title": "Model Id"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "unknown"
          },
          "trigger_word": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Word"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "training_steps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Steps"
          },
          "model_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Url"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url"
          },
          "training_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Config"
          }
        },
        "type": "object",
        "required": [
          "model_id",
          "user_id"
        ],
        "title": "UserModel"
      },
      "UserModelInfo": {
        "properties": {
          "model_id": {
            "type": "string",
            "title": "Model Id"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "unknown"
          },
          "trigger_word": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Word"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "model_id",
          "user_id"
        ],
        "title": "UserModelInfo"
      },
      "UserSubscription": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "pod_id": {
            "type": "string",
            "title": "Pod Id",
            "description": "Allotted pod id if enterprise plan",
            "default": ""
          },
          "pod_status": {
            "type": "string",
            "title": "Pod Status",
            "description": "Status of the user server",
            "default": "unknown"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "subscription_status": {
            "type": "string",
            "title": "Subscription Status"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "subscription_id",
          "plan",
          "period_start",
          "period_end",
          "subscription_status"
        ],
        "title": "UserSubscription"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VirtualTryonRequest": {
        "properties": {
          "person_image": {
            "type": "string",
            "title": "Person Image",
            "description": "Public URL of the person/model image (the body to dress)."
          },
          "clothing_image": {
            "type": "string",
            "title": "Clothing Image",
            "description": "Public URL of the clothing item to place on the person."
          },
          "gender": {
            "type": "string",
            "enum": [
              "man",
              "woman"
            ],
            "title": "Gender",
            "description": "Gender of the person (`man` or `woman`)."
          },
          "clothing_type": {
            "type": "string",
            "title": "Clothing Type",
            "description": "Type of clothing shown in `clothing_image`. Be specific for best results — e.g. `jacket`, `dress`, `blazer`, `jeans`, `shirt`, `skirt`."
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 256.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "Output width in pixels (256–2048). Defaults to the person image's native width (capped at 2048 and rounded to 16). For clothing try-on, portrait dimensions (e.g. `832 × 1248`) give the best results."
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2048.0,
                "minimum": 256.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "Output height in pixels (256–2048). Defaults to the person image's native height (capped at 2048 and rounded to 16). For clothing try-on, portrait dimensions (e.g. `832 × 1248`) give the best results."
          },
          "output_format": {
            "$ref": "#/components/schemas/ImageFormat",
            "description": "Output image format: `png` (default), `webp`, or `jpeg`.",
            "default": "png"
          },
          "seed": {
            "type": "integer",
            "title": "Seed",
            "description": "Seed for reproducibility. `-1` = random.",
            "default": -1
          },
          "garment_region": {
            "type": "string",
            "enum": [
              "upper",
              "lower",
              "full"
            ],
            "title": "Garment Region",
            "description": "Which part of the body the garment covers. Controls the region where colour correction is applied so other clothing isn't affected. `upper` (default) — jacket, shirt, blazer, top. `lower` — pants, jeans, skirt, shorts. `full` — dress, jumpsuit, suit (whole body).",
            "default": "upper"
          },
          "tone_correction": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tone Correction",
            "description": "Colour correction strength (0.0–1.0). Controls how closely the generated garment's colour is matched to the reference image. Default: `0.4`. Lower values (`0.2`) preserve the AI's interpretation; higher values (`0.6`) pull the colour tighter to the clothing reference."
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "Identity profile ID from `/profiles/v1`. Applies stored settings automatically."
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Webhook URL. When the job completes or fails we POST a `WebhookEvent` to this URL. `result_url` in the payload is temporary (~24 h) — download the file promptly."
          }
        },
        "type": "object",
        "required": [
          "person_image",
          "clothing_image",
          "gender",
          "clothing_type"
        ],
        "title": "VirtualTryonRequest",
        "description": "Dress a person in a new outfit using two reference images."
      },
      "VoiceCloneRequest": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 1,
            "title": "Text",
            "description": "Text to synthesise with the cloned voice."
          },
          "reference_voice_url": {
            "type": "string",
            "title": "Reference Voice Url",
            "description": "Public URL of the reference voice audio file for cloning (WAV or MP3, 5–30 s recommended)."
          },
          "language_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Id",
            "description": "Language code (e.g. `en`, `zh`, `ja`, `ko`, `he`).",
            "default": "en"
          },
          "max_new_tokens": {
            "type": "integer",
            "maximum": 1024.0,
            "minimum": 1.0,
            "title": "Max New Tokens",
            "description": "Maximum tokens to generate.",
            "default": 256
          },
          "exaggeration": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Exaggeration",
            "description": "Expressiveness level (0.0 = neutral, 1.0 = maximum).",
            "default": 0.5
          },
          "apply_watermark": {
            "type": "boolean",
            "title": "Apply Watermark",
            "description": "Embed an inaudible audio watermark in the output (recommended for compliance).",
            "default": true
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url",
            "description": "Optional webhook URL. When the job completes or fails we POST a `WebhookEvent` object to this URL. See the **WebhookEvent** schema (Webhooks section) for the exact payload shape. `result_url` in the payload is temporary (∼24 h) — download the file immediately."
          },
          "server_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server Id",
            "description": "Enterprise: pod ID to pin this request to a specific dedicated pod."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text",
          "reference_voice_url"
        ],
        "title": "VoiceCloneRequest",
        "description": "Clone a voice from a reference audio sample and synthesise new speech."
      },
      "WebhookEvent": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id",
            "description": "Unique job identifier returned when the request was submitted."
          },
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "The user ID that submitted the job."
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed"
            ],
            "title": "Status",
            "description": "Job outcome: `completed` if output was produced, `failed` if processing errored."
          },
          "result_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Url",
            "description": "URL to the generated output file. **Expires within 24 hours** — download and store the file immediately. Present when `status` is `completed`; omitted on failure."
          },
          "result_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Base64",
            "description": "Base64-encoded result file. Present only when base64 output was explicitly requested."
          },
          "result_mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Mime Type",
            "description": "MIME type of the output file, e.g. `image/webp`, `video/mp4`, `audio/wav`."
          },
          "result_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Size Bytes",
            "description": "Size of the output file in bytes."
          },
          "time_taken_s": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Taken S",
            "description": "Total inference time in seconds."
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input",
            "description": "Key input parameters from the original request — `prompt`, `width`, `height`, `steps`, `seed`, `output_format`, `mode`, and quality knobs. Internal fields are stripped."
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings",
            "description": "Non-fatal warnings generated during processing, if any."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error description. Only present when `status` is `failed`; omitted on success."
          },
          "timestamp": {
            "type": "number",
            "title": "Timestamp",
            "description": "Unix timestamp (seconds since epoch) at which this event was emitted."
          },
          "processing_time_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Time Seconds",
            "description": "Total processing time in seconds. Queue wait time is excluded. Zero for failed jobs."
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd",
            "description": "Cost of this job in USD. Zero for failed jobs. Queue time is never charged."
          },
          "balance_remaining_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance Remaining Usd",
            "description": "Remaining balance in USD after this job."
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "user_id",
          "status",
          "timestamp"
        ],
        "title": "WebhookEvent",
        "description": "JSON object POSTed to your ``callback_url`` when a job completes or fails.\n\nDelivery behaviour\n------------------\n* We attempt delivery up to **3 times** with exponential back-off (1 s, 2 s).\n* Your endpoint must return **HTTP 2xx within 10 seconds** to be considered\n  successful; any other response (or a timeout) triggers a retry.\n* No delivery guarantee after all retries are exhausted.\n\n.. warning::\n   ``result_url`` is a **temporary URL** that expires within **24 hours**\n   of generation.  Download and persist the file immediately upon receiving\n   this event — do not store the URL itself.",
        "example": {
          "balance_remaining_usd": 186.54,
          "cost_usd": 0.005125,
          "input": {
            "height": 1024,
            "output_format": "png",
            "prompt": "Beautiful woman in dynamic pose, studio lighting",
            "seed": 42,
            "steps": 9,
            "width": 1024
          },
          "job_id": "e44fe1da-43d9-4b25-9eb9-d41f57c02e29",
          "processing_time_seconds": 4.271,
          "result_mime_type": "image/png",
          "result_size_bytes": 892341,
          "result_url": "https://f005.backblazeb2.com/b2api/v3/b2_download_file_by_id?fileId=4_z5de0d...",
          "status": "completed",
          "time_taken_s": 4.27,
          "timestamp": 1748620420.0,
          "user_id": "user_2ZYdYTFr4LKcIzUlgtSS3tVe3qa"
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "tags": [
    {
      "name": "Identity",
      "description": "Core identity primitives: face swap, identity lock, identity replace, virtual try-on, voice cloning, and AI model generation.\n\nAll outputs embed C2PA provenance metadata (EU AI Act Art. 50 disclosure).\n\n**Typical flows:**\n- `Generate → Lock → Try-on → Animate`\n- `Faceswap → Background → Upscale`"
    },
    {
      "name": "Generate",
      "description": "Text-to-image, image-to-video, text-to-speech, and image-to-3D generation.\n\nUse standalone or as the first step in an identity or branding workflow.\n\n**Typical flow:** `Generate → Identity Lock → Background → Upscale`"
    },
    {
      "name": "Edit",
      "description": "Instruction-based image editing via natural language prompts.\n\nChange scenes, swap objects, adjust lighting, or recompose an image without writing a single line of image processing code.\n\nSupports a `mode` parameter for specialised editing — `anime` converts a photo to an illustrated style.\n\nPairs well with Identity endpoints: generate or lock an identity, then use Edit to place them in a new scene."
    },
    {
      "name": "Background",
      "description": "Background replacement and relighting. Works on any image — generated or uploaded.\n\nPreserves the subject with natural lighting, shadows, and edge detail.\n\n**Typical use:** Clean up an identity-generated image before adding branding or publishing."
    },
    {
      "name": "Branding",
      "description": "Logo generation and branded template creation.\n\nInject brand colours, style rules, and logo overlays into generated assets.\n\nDesigned to sit at the **end** of content workflows: `Identity → Background → Branding → Upscale`."
    },
    {
      "name": "Upscale",
      "description": "Resolution upscaling and detail enhancement.\n\nUse as the **final step** in any workflow before delivery. Outputs are suitable for print and high-resolution display."
    },
    {
      "name": "Webhooks",
      "description": "Webhook delivery reference.\n\nPass `callback_url` in any request body to receive a `WebhookEvent` POST when the job completes or fails.\n\n**Delivery behaviour:**\n- Up to **3 attempts** with exponential back-off (1 s, 2 s)\n- Your endpoint must return **HTTP 2xx within 10 seconds**\n- No delivery guarantee after all retries are exhausted\n\n> ⚠️ **`result_url` is temporary.** Pre-signed links expire within 24 hours. Download and store the output immediately upon receiving the webhook."
    },
    {
      "name": "User Management",
      "description": "API key management, plan information, account balance, and enterprise pod assignment.\n\nBalance is denominated in USD. Pro and Studio plans include a monthly allowance ($200 and $500 respectively). Enterprise plans have unlimited usage with no balance deduction."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}