{
  "info": {
    "name": "Corlen API",
    "description": "AI virtual try-on API. Send a customer photo and a garment image, get back an image of that person wearing the garment. Full docs: https://corlen.io/developers/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      { "key": "token", "value": "{{api_key}}", "type": "string" }
    ]
  },
  "variable": [
    { "key": "base_url", "value": "https://corlen.io", "type": "string" },
    { "key": "api_key", "value": "corlen_live_...", "type": "string" },
    { "key": "job_id", "value": "", "type": "string" }
  ],
  "item": [
    {
      "name": "Create Try-On",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"customerPhotoBase64\": \"data:image/jpeg;base64,...\",\n  \"garmentImageUrl\": \"https://your-catalog.example.com/garment.jpg\",\n  \"category\": \"upper_body\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/tryon",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "tryon"]
        },
        "description": "Generates a single garment try-on. Returns a jobId immediately (202), poll Get Try-On Status until it finishes.\n\nBody fields:\n- customerPhotoBase64 (required): a data: URI, never a remote URL.\n- productId (optional): id of a garment registered under Products, replaces garmentImageUrl/category/garmentCategory.\n- garmentImageUrl (required unless productId given): https:// URL or a data: URI.\n- garmentBackImageUrl (optional): back-view reference, used with viewAngle=back.\n- category (required unless productId given): upper_body, lower_body, or full_body.\n- garmentCategory, size, customerSize (optional): improve fit rendering.\n- garmentState (optional): open or closed, for jackets/shirts/waistcoats.\n- tuckState (optional): tucked or untucked.\n- viewAngle (optional): front (default), left, right, or back."
      },
      "response": [
        {
          "name": "202 Accepted",
          "originalRequest": {
            "method": "POST",
            "url": { "raw": "{{base_url}}/api/v1/tryon" }
          },
          "status": "Accepted",
          "code": 202,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"jobId\": \"b1e4...\",\n  \"status\": \"processing\"\n}"
        },
        {
          "name": "401 Unauthorized",
          "originalRequest": {
            "method": "POST",
            "url": { "raw": "{{base_url}}/api/v1/tryon" }
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"error\": \"Missing or invalid API key\"\n}"
        }
      ]
    },
    {
      "name": "Create Combo Try-On",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"customerPhotoBase64\": \"data:image/jpeg;base64,...\",\n  \"garments\": [\n    { \"garmentImageUrl\": \"https://.../top.jpg\", \"category\": \"upper_body\", \"garmentCategory\": \"t_shirt\" },\n    { \"garmentImageUrl\": \"https://.../jeans.jpg\", \"category\": \"lower_body\", \"garmentCategory\": \"jeans\" }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/tryon/combo",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "tryon", "combo"]
        },
        "description": "Generates a combined look from 2 to 4 garments (e.g. a top, a jacket, and jeans) in one request. Same fields as Create Try-On, applied per garment inside the garments array. Use this only for 2+ garments; a single item should use Create Try-On instead."
      },
      "response": [
        {
          "name": "202 Accepted",
          "originalRequest": {
            "method": "POST",
            "url": { "raw": "{{base_url}}/api/v1/tryon/combo" }
          },
          "status": "Accepted",
          "code": 202,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"jobId\": \"b1e4...\",\n  \"status\": \"processing\"\n}"
        }
      ]
    },
    {
      "name": "Get Try-On Status",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/tryon/{{job_id}}",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "tryon", "{{job_id}}"]
        },
        "description": "Poll this every 2-3 seconds until the job finishes. Stop as soon as status is completed or failed. A failed generation is never billed."
      },
      "response": [
        {
          "name": "Processing",
          "originalRequest": {
            "method": "GET",
            "url": { "raw": "{{base_url}}/api/v1/tryon/{{job_id}}" }
          },
          "status": "OK",
          "code": 200,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"status\": \"processing\"\n}"
        },
        {
          "name": "Completed",
          "originalRequest": {
            "method": "GET",
            "url": { "raw": "{{base_url}}/api/v1/tryon/{{job_id}}" }
          },
          "status": "OK",
          "code": 200,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"status\": \"completed\",\n  \"resultImageBase64\": \"data:image/jpeg;base64,...\",\n  \"generationTimeMs\": 24310\n}"
        },
        {
          "name": "Failed",
          "originalRequest": {
            "method": "GET",
            "url": { "raw": "{{base_url}}/api/v1/tryon/{{job_id}}" }
          },
          "status": "OK",
          "code": 200,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"status\": \"failed\",\n  \"error\": \"...\"\n}"
        }
      ]
    }
  ]
}
