{
  "openapi": "3.1.0",
  "info": {
    "title": "Flashlook API",
    "version": "1.0.0",
    "summary": "On-model product photography and video, from your code.",
    "description": "Create products, cast AI models, run shoots, and poll for results.\n\n**Authentication.** Every endpoint except the discovery ones takes\n`Authorization: Bearer fl_live_…`. Create a key at https://flashlook.ai/docs\n(Account -> API keys). A key acts as its owner: your products, your models,\nyour credits. Every plan works over the API, including the free tier and its\nsignup credit grant.\n\n**Everything is async.** Generation endpoints return `202` with task ids.\nPoll `GET /tasks/{id}` every 1-2 seconds until `status` is `succeeded` or\n`failed`. There are no outbound webhooks yet.\n\n**Discover before you guess.** `GET /options` returns every valid model,\naspect ratio, limit and taxonomy enum key, plus per-field notes. Unknown\nfields on a shoot body are ignored rather than rejected, so a typo produces\na wrong photo instead of an error - the response echoes `ignoredFields` so\nyou can catch it.",
    "contact": {
      "name": "Flashlook",
      "url": "https://flashlook.ai/contact"
    }
  },
  "servers": [
    {
      "url": "https://flashlook.ai/api/json/v1",
      "description": "Production"
    },
    {
      "url": "https://flashlook.ai/api/v1",
      "description": "Legacy alias - identical behaviour, kept for existing integrations."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key of the form `fl_live_…`."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message."
          },
          "code": {
            "type": "string",
            "description": "Machine-readable code. Absent on some generic 400/404 responses."
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Zod issues, on schema validation failures."
          }
        },
        "required": [
          "error"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "preview",
              "shoot",
              "link2shoot",
              "edit",
              "modelFromImages",
              "atelierVideo",
              "atelierVideoFrames",
              "adStudio"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "progress": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "stage": {
            "type": "string"
          },
          "etaSeconds": {
            "type": "integer"
          },
          "startedAt": {
            "type": "integer",
            "description": "Epoch milliseconds."
          },
          "result": {
            "type": "object",
            "description": "Present only when status is succeeded.",
            "properties": {
              "image": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "error": {
            "type": "string",
            "description": "Present only when status is failed."
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "primaryIndex": {
            "type": "integer"
          },
          "primaryImage": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "hex": {
                  "type": "string"
                }
              }
            }
          },
          "shootCount": {
            "type": "integer"
          },
          "archived": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "images"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Discovery",
      "description": "Models, limits, enums, prices. No key required."
    },
    {
      "name": "Products",
      "description": "Your garment/product library."
    },
    {
      "name": "Models",
      "description": "AI fashion models (characters)."
    },
    {
      "name": "Shoots",
      "description": "On-model stills."
    },
    {
      "name": "Video",
      "description": "Short clips from a still."
    },
    {
      "name": "Collections",
      "description": "Collection Autopilot: a whole drop of product photos -> products + colorways -> styled looks -> one priced run (5-6 images per product, 2 products at a time)."
    },
    {
      "name": "Library",
      "description": "Templates, style refs, gallery."
    },
    {
      "name": "Tasks",
      "description": "Async job status."
    },
    {
      "name": "Account",
      "description": "Credits, plan, entitlements."
    }
  ],
  "paths": {
    "/options": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Every model, limit, enum and per-field note",
        "description": "The one call an agent should make before constructing a shoot. No key required.",
        "security": [],
        "parameters": [
          {
            "name": "fresh",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Bypass the 5-minute server cache."
          }
        ],
        "responses": {
          "200": {
            "description": "Full option catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "getOptions"
      }
    },
    "/taxonomies": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Raw taxonomy groups and options",
        "security": [],
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "simple",
                "advanced"
              ]
            }
          },
          {
            "name": "section",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Taxonomy groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "listTaxonomies"
      }
    },
    "/price-quote": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Exact credit cost of a shoot, without spending",
        "description": "The only authoritative price source. Never hardcode credit costs.",
        "security": [],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "studioShoot",
                "outdoorShoot",
                "groupShot",
                "modelPreview",
                "edit",
                "tryOn",
                "link2Shoot"
              ]
            }
          },
          {
            "name": "modelKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "extraProducts",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "referenceImages",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "unitCost": {
                      "type": "integer"
                    },
                    "surcharge": {
                      "type": "integer"
                    },
                    "units": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "quoteShoot"
      }
    },
    "/video/price-quote": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Exact credit cost of a video clip",
        "description": "Duration is clamped to the chosen model's real bounds.",
        "security": [],
        "parameters": [
          {
            "name": "videoModelKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "spark",
                "reel",
                "flow",
                "reelMax",
                "echo",
                "flicker",
                "drift",
                "muse"
              ]
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 2,
              "maximum": 30
            }
          },
          {
            "name": "generateAudio",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "quoteVideo"
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "This document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document."
          }
        },
        "operationId": "getOpenapi"
      }
    },
    "/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Credits, plan and entitlements for the key's owner",
        "responses": {
          "200": {
            "description": "Account summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "getAccount"
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "List your products",
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ids"
              ]
            },
            "description": "Compact response without image arrays."
          },
          {
            "name": "includeArchived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Products, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uri"
                            }
                          },
                          "primaryIndex": {
                            "type": "integer"
                          },
                          "primaryImage": {
                            "type": "string",
                            "format": "uri"
                          },
                          "description": {
                            "type": "string"
                          },
                          "sku": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "colors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "hex": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "shootCount": {
                            "type": "integer"
                          },
                          "archived": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "images"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listProducts"
      },
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Create a product",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "images": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    },
                    "description": "`data:image/…;base64,…` or an https URL. NOTE: an https URL is stored by reference - the bytes are not copied, so the image must stay reachable."
                  },
                  "primaryIndex": {
                    "type": "integer",
                    "default": 0
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 600
                  },
                  "sku": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "category": {
                    "type": "string"
                  },
                  "colors": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "object"
                    }
                  }
                },
                "required": [
                  "name",
                  "images"
                ]
              },
              "example": {
                "name": "Linen midi dress",
                "images": [
                  "https://cdn.example.com/products/linen-midi-front.jpg"
                ],
                "sku": "LMD-001",
                "category": "dresses"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "primaryIndex": {
                          "type": "integer"
                        },
                        "primaryImage": {
                          "type": "string",
                          "format": "uri"
                        },
                        "description": {
                          "type": "string"
                        },
                        "sku": {
                          "type": "string"
                        },
                        "category": {
                          "type": "string"
                        },
                        "colors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "hex": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "shootCount": {
                          "type": "integer"
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "images"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Active product cap reached (PRODUCT_LIMIT). Or: The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createProduct"
      }
    },
    "/products/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Get one product",
        "responses": {
          "200": {
            "description": "Product.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "primaryIndex": {
                          "type": "integer"
                        },
                        "primaryImage": {
                          "type": "string",
                          "format": "uri"
                        },
                        "description": {
                          "type": "string"
                        },
                        "sku": {
                          "type": "string"
                        },
                        "category": {
                          "type": "string"
                        },
                        "colors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "hex": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "shootCount": {
                          "type": "integer"
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "images"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "getProduct",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      },
      "patch": {
        "tags": [
          "Products"
        ],
        "summary": "Update a product",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "Linen midi dress - sand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "primaryIndex": {
                          "type": "integer"
                        },
                        "primaryImage": {
                          "type": "string",
                          "format": "uri"
                        },
                        "description": {
                          "type": "string"
                        },
                        "sku": {
                          "type": "string"
                        },
                        "category": {
                          "type": "string"
                        },
                        "colors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "hex": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "shootCount": {
                          "type": "integer"
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "images"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "updateProduct",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "summary": "Archive (or purge) a product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          },
          {
            "name": "purge",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Hard-delete instead of archiving."
          }
        ],
        "responses": {
          "200": {
            "description": "Archived or purged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "archiveProduct"
      }
    },
    "/products/{id}/shoots": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Every generated image for one product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shoots.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listProductShoots"
      }
    },
    "/products/by-external/{platform}/{productId}": {
      "parameters": [
        {
          "name": "platform",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "shopify"
            ]
          }
        },
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Products"
        ],
        "summary": "Archive the product imported from a store product",
        "description": "Used by the Shopify app when a store product is deleted. `found` is false when nothing matched.",
        "responses": {
          "200": {
            "description": "`{ ok, found }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported platform.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "archiveExternalProduct",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/products/export": {
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Bulk-export products with all their shoot image URLs",
        "description": "Returns URLs; it does not stream image bytes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "exportProducts"
      }
    },
    "/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List your models",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 300,
              "default": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Models.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listModels"
      },
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Save a model from a completed preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createModel"
      }
    },
    "/models/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Get one model",
        "responses": {
          "200": {
            "description": "Model.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "getModel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/smart-pick": {
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Cast a model with the LLM casting director",
        "description": "Returns trait keys and labels. Generates no image, spends no credits.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gender": {
                    "type": "string",
                    "enum": [
                      "female",
                      "male"
                    ]
                  },
                  "avoidSelections": {
                    "type": "object"
                  }
                },
                "required": [
                  "gender"
                ]
              },
              "example": {
                "gender": "female"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Selections and labels.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include Smart Pick (SMART_PICK_DENIED). Or: The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "smartPickModel"
      }
    },
    "/previews": {
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Render a model preview",
        "description": "Spends modelPreview credits. Pass LABELS in `selections`, not raw keys.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Task queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createPreview",
        "x-spends-credits": true
      }
    },
    "/models/smart-preview": {
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Smart Pick then preview, in one call",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Pick plus queued task.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "smartPreviewModel",
        "x-spends-credits": true
      }
    },
    "/models/from-images": {
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Build a model from uploaded photos of a real person",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Task queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createModelFromImages",
        "x-spends-credits": true
      }
    },
    "/shoots": {
      "post": {
        "tags": [
          "Shoots"
        ],
        "summary": "Start a shoot",
        "description": "Accepts the same body as the Atelier composer. Call `GET /options` for the\nvalid values of every enum field and the enforced limits.\n\nRequires a subject (either `modelIds` OR `subjectImage`, never both) and at\nleast one product. `count` images become `count` independent tasks, so one\nfailure refunds one image.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "See `fields` in GET /options for per-field notes.",
                "properties": {
                  "productId": {
                    "type": "string"
                  },
                  "productIds": {
                    "type": "array",
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    }
                  },
                  "productByModel": {
                    "type": "object"
                  },
                  "modelIds": {
                    "type": "array",
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    },
                    "description": "Parsed up to 4, but more than 2 is rejected with TOO_MANY_MODELS (400)."
                  },
                  "subjectImage": {
                    "type": "string"
                  },
                  "subjectImages": {
                    "type": "array",
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    }
                  },
                  "subjectGender": {
                    "type": "string",
                    "enum": [
                      "female",
                      "male"
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "default": 1
                  },
                  "modelKey": {
                    "type": "string"
                  },
                  "aspectRatio": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "tags": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "object"
                    }
                  },
                  "referenceImages": {
                    "type": "array",
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    }
                  },
                  "scenePreset": {
                    "type": "string",
                    "enum": [
                      "studio",
                      "location",
                      "interior"
                    ]
                  },
                  "coherentSet": {
                    "type": "boolean"
                  },
                  "autoGen": {
                    "type": "boolean"
                  },
                  "bgMode": {
                    "type": "string",
                    "enum": [
                      "indoor",
                      "outdoor"
                    ]
                  },
                  "indoorCategory": {
                    "type": "string"
                  },
                  "outdoorCategory": {
                    "type": "string"
                  },
                  "indoorSubKey": {
                    "type": "string"
                  },
                  "outdoorSubKey": {
                    "type": "string"
                  },
                  "customSceneText": {
                    "type": "string",
                    "maxLength": 600
                  },
                  "pose": {
                    "type": "string"
                  },
                  "expression": {
                    "type": "string"
                  },
                  "framing": {
                    "type": "string"
                  },
                  "angle": {
                    "type": "string"
                  },
                  "gaze": {
                    "type": "string"
                  },
                  "concept": {
                    "type": "string"
                  },
                  "colorFilter": {
                    "type": "string"
                  },
                  "weatherLighting": {
                    "type": "string"
                  },
                  "props": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "string"
                    }
                  },
                  "jewelryPieces": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "string"
                    }
                  },
                  "jewelryMetal": {
                    "type": "string"
                  },
                  "templateId": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "productId": "665f1c2e8b3a4d0012a9b7c1",
                "modelIds": [
                  "665f1c2e8b3a4d0012a9b7d4"
                ],
                "count": 2,
                "aspectRatio": "4_5",
                "scenePreset": "studio"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Tasks queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "characterIds": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "startedAt": {
                      "type": "integer"
                    },
                    "ignoredFields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Body keys the schema does not know. Usually a typo - the value had no effect."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Generation not configured on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createShoot",
        "x-spends-credits": true
      }
    },
    "/edits": {
      "post": {
        "tags": [
          "Shoots"
        ],
        "summary": "Edit an existing image",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Task queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createEdit",
        "x-spends-credits": true
      }
    },
    "/videos": {
      "post": {
        "tags": [
          "Video"
        ],
        "summary": "Animate a still into a short clip",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startImageUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "endImageUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 30
                  },
                  "videoModelKey": {
                    "type": "string",
                    "enum": [
                      "spark",
                      "reel",
                      "flow",
                      "reelMax",
                      "echo",
                      "flicker",
                      "drift",
                      "muse"
                    ]
                  },
                  "generateAudio": {
                    "type": "boolean",
                    "description": "Native sound for motion agents. For the talking agent (muse) this is the voiceover switch and needs voiceoverScript."
                  },
                  "voiceoverScript": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "muse with generateAudio: the words the model speaks. The clip runs as long as the read; credits are reserved on an estimate and the difference refunded."
                  },
                  "voiceId": {
                    "type": "string",
                    "enum": [
                      "Sarah",
                      "Jessica",
                      "Laura",
                      "Alice",
                      "Brian",
                      "Liam",
                      "Chris",
                      "George"
                    ],
                    "description": "muse voiceover voice. Omitted = matched to the model."
                  },
                  "referenceImageUrls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": "Reference mode (agents with supportsReferences, e.g. echo): model portrait first, then product photos. Replaces startImageUrl - the clip is composed from these with no start frame."
                  },
                  "aspectRatio": {
                    "type": "string"
                  },
                  "characterId": {
                    "type": "string"
                  }
                },
                "description": "Pass startImageUrl, or referenceImageUrls on an agent that supports references."
              },
              "example": {
                "startImageUrl": "https://cdn.example.com/shoots/linen-midi-look-1.png",
                "prompt": "Slow turn to camera, light breeze in the fabric",
                "videoModelKey": "spark"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Task queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createVideo",
        "x-spends-credits": true
      }
    },
    "/videos/frames": {
      "post": {
        "tags": [
          "Video"
        ],
        "summary": "Generate matched start/end frames for a clip",
        "description": "Synchronous - returns 200 with the frames, unlike the other generation endpoints.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Frames.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createVideoFrames",
        "x-spends-credits": true
      }
    },
    "/collections": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List your collections",
        "responses": {
          "200": {
            "description": "Collections.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listCollections"
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Create a collection from product photos",
        "description": "Photos are copied into Flashlook storage (https URLs are fetched), grouped into\nproducts and colorways by AI. Analysis starts immediately unless `analyze: false`.\nUp to 60 photos per call; add more with `POST /collections/{id}/photos`.\nEvery response carries `collection.next` - the next call to make.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "photos": {
                    "type": "array",
                    "maxItems": 60,
                    "items": {
                      "type": "string"
                    },
                    "description": "https or image data URLs."
                  },
                  "analyze": {
                    "type": "boolean",
                    "default": true
                  }
                }
              },
              "example": {
                "name": "Spring drop",
                "photos": [
                  "https://cdn.example.com/drop/look-1.jpg",
                  "https://cdn.example.com/drop/look-2.jpg"
                ],
                "analyze": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. `{ added, failed, collection }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createCollection",
        "x-spends-credits": true
      }
    },
    "/collections/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Collection state, looks, run progress and `next`",
        "description": "Poll every 30-60s while `status` is analyzing, styling or running.",
        "responses": {
          "200": {
            "description": "`{ collection }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "getCollection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      },
      "patch": {
        "tags": [
          "Collections"
        ],
        "summary": "Edit groups, create products, set looks, models and preset",
        "description": "Applied in order: settings (name, modelPool, assignments, templateId, customPrompt)\n-> groups -> analyze -> createProducts (also starts styling) -> looks -> completeLooks\n-> restyle. `templateId: null` shoots the Studio Product Page set.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "analyze": {
                    "type": "boolean"
                  },
                  "groups": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Replaces all draft products."
                  },
                  "createProducts": {
                    "type": "boolean"
                  },
                  "looks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "type": "string"
                        },
                        "pieceId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "completeLooks": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "match",
                          "random"
                        ]
                      },
                      "productIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "restyle": {
                    "type": "boolean"
                  },
                  "modelPool": {
                    "type": "array",
                    "maxItems": 12,
                    "items": {
                      "type": "string"
                    }
                  },
                  "assignments": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "templateId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customPrompt": {
                    "type": "string",
                    "maxLength": 600
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`{ collection }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The collection is busy, or run settings are locked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "updateCollection",
        "x-spends-credits": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/collections/{id}/photos": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Add photos (before products are created)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photos": {
                    "type": "array",
                    "maxItems": 60,
                    "items": {
                      "type": "string"
                    }
                  },
                  "analyze": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "photos"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`{ added, failed, collection }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Products are already created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "addCollectionPhotos",
        "x-spends-credits": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/collections/{id}/pieces": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Pieces that can complete a look",
        "description": "This collection, then your other products, then the 500+ flat-lay wardrobe.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          },
          {
            "name": "forProductId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slot",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "top",
                "bottom"
              ]
            }
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "female",
                "male"
              ]
            }
          },
          {
            "name": "colorFamily",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "collection",
                "library",
                "wardrobe"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`{ slot, total, pieces, colorFamilies }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listCollectionPieces"
      }
    },
    "/collections/{id}/quote": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Price the whole run",
        "responses": {
          "200": {
            "description": "`{ credits, images, products, balance, enough, perProduct }`. balance null = unlimited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "quoteCollection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/collections/{id}/run": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Start, pause, resume, cancel or retry the run",
        "description": "`start` spends credits and requires `confirmCredits` equal to the quote (CONFIRM_CREDITS otherwise). Re-running adds images; earlier ones are kept.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "start",
                      "pause",
                      "resume",
                      "cancel",
                      "retry"
                    ]
                  },
                  "confirmCredits": {
                    "type": "integer"
                  },
                  "productId": {
                    "type": "string",
                    "description": "Required for retry."
                  }
                },
                "required": [
                  "action"
                ]
              },
              "example": {
                "action": "start",
                "confirmCredits": 1200
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`{ collection }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (INSUFFICIENT_CREDITS).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Wrong state for that action.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "runCollection",
        "x-spends-credits": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "Library"
        ],
        "summary": "List saved presets",
        "responses": {
          "200": {
            "description": "Templates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listTemplates"
      },
      "post": {
        "tags": [
          "Library"
        ],
        "summary": "Save a preset",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "A preset with that name exists (DUPLICATE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createTemplate"
      }
    },
    "/templates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "Library"
        ],
        "summary": "Update a preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Name already taken (DUPLICATE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "updateTemplate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      },
      "delete": {
        "tags": [
          "Library"
        ],
        "summary": "Delete a preset",
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "deleteTemplate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/style-refs": {
      "get": {
        "tags": [
          "Library"
        ],
        "summary": "List saved inspiration images",
        "responses": {
          "200": {
            "description": "Refs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listStyleRefs"
      },
      "post": {
        "tags": [
          "Library"
        ],
        "summary": "Save inspiration images",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "createStyleRefs"
      }
    },
    "/style-refs/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Library"
        ],
        "summary": "Delete an inspiration image",
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "deleteStyleRef",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    },
    "/gallery": {
      "get": {
        "tags": [
          "Library"
        ],
        "summary": "Your generated stills and clips, newest first",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 80
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gallery page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listGallery"
      }
    },
    "/tasks": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Your in-flight tasks",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tasks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "preview",
                              "shoot",
                              "link2shoot",
                              "edit",
                              "modelFromImages",
                              "atelierVideo",
                              "atelierVideoFrames",
                              "adStudio"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "running",
                              "succeeded",
                              "failed"
                            ]
                          },
                          "progress": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "stage": {
                            "type": "string"
                          },
                          "etaSeconds": {
                            "type": "integer"
                          },
                          "startedAt": {
                            "type": "integer",
                            "description": "Epoch milliseconds."
                          },
                          "result": {
                            "type": "object",
                            "description": "Present only when status is succeeded.",
                            "properties": {
                              "image": {
                                "type": "string",
                                "format": "uri"
                              }
                            }
                          },
                          "error": {
                            "type": "string",
                            "description": "Present only when status is failed."
                          }
                        },
                        "required": [
                          "id",
                          "status"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "listTasks"
      }
    },
    "/tasks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Poll one task",
        "description": "Poll every 1-2s until `status` is `succeeded` or `failed`.",
        "responses": {
          "200": {
            "description": "Task status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "preview",
                        "shoot",
                        "link2shoot",
                        "edit",
                        "modelFromImages",
                        "atelierVideo",
                        "atelierVideoFrames",
                        "adStudio"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "succeeded",
                        "failed"
                      ]
                    },
                    "progress": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "stage": {
                      "type": "string"
                    },
                    "etaSeconds": {
                      "type": "integer"
                    },
                    "startedAt": {
                      "type": "integer",
                      "description": "Epoch milliseconds."
                    },
                    "result": {
                      "type": "object",
                      "description": "Present only when status is succeeded.",
                      "properties": {
                        "image": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    },
                    "error": {
                      "type": "string",
                      "description": "Present only when status is failed."
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key (INVALID_API_KEY).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The REST API needs a paid plan (PLAN_REQUIRED); upgrade at https://flashlook.ai/pricing. MCP works on every plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not owned by the key's user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Human-readable message."
                    },
                    "code": {
                      "type": "string",
                      "description": "Machine-readable code. Absent on some generic 400/404 responses."
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Zod issues, on schema validation failures."
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "operationId": "getTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource id."
          }
        ]
      }
    }
  }
}