{
  "openapi": "3.1.0",
  "info": {
    "title": "Resize Baba",
    "version": "1.0.0",
    "description": "Resize Baba tools for AI assistants. Use these actions when a user asks to resize, compress, convert or rotate an image, to a specific file size in KB or pixel size (for example for an exam form, visa or marketplace upload), to combine images or PDFs into one PDF, or to make a printable passport photo sheet.\n\nHow to use: for a named exam or website, call list_size_presets first, then resize_image with the preset_id. Every file result contains a download_url: always show that link to the user. Links expire after 15 minutes. Images are processed on the server and deleted afterwards (unlike the website, which works entirely in the browser).\n\nFree use is rate limited (about 20 operations a day per person, 5 MB per file, exam presets only). A Pro API key (create one at https://resizebaba.com, account, Integrations) removes the daily cap, allows 15 MB files, marketplace presets and passport photo sheets.",
    "contact": {
      "email": "hello@resizebaba.com",
      "url": "https://resizebaba.com/agents"
    }
  },
  "servers": [
    {
      "url": "https://resizebaba.com"
    }
  ],
  "paths": {
    "/api/agent/v1/list_size_presets": {
      "post": {
        "operationId": "list_size_presets",
        "summary": "Find a size preset",
        "description": "Search the built-in list of exact photo and signature sizes used by Indian exam forms and online marketplaces (SSC, UPSC, IBPS, NEET, JEE, SBI, GATE, Amazon, Flipkart and more). Call this first when the user names an exam or website, then pass the returned id as preset_id to resize_image.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Words to look for, for example 'ssc signature' or 'amazon'. Leave empty to list everything."
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "exam",
                      "marketplace",
                      "general"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/resize_image": {
      "post": {
        "operationId": "resize_image",
        "summary": "Resize an image to an exact size",
        "description": "Resize or compress one image to an exact file size (KB) and/or exact pixels, for example a photo between 20 and 50 KB at 350x450 pixels for a form upload. Use preset_id for a known exam or marketplace, or give min_kb, max_kb, width and height yourself. The result is verified against the target and returned as a download link. The image is processed on our server and deleted after 15 minutes.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public https link to the image. Use this when the user gave a link."
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "The image file as base64 (a data: prefix is fine). Use this when you have the file contents but no public link."
                  },
                  "preset_id": {
                    "type": "string",
                    "description": "A preset id from list_size_presets, for example 'sscp' for the SSC photo. Other fields override it."
                  },
                  "min_kb": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 5000,
                    "description": "Smallest allowed file size in KB (forms often reject files that are too small)."
                  },
                  "max_kb": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 5000,
                    "description": "Largest allowed file size in KB."
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 8000,
                    "description": "Output width in pixels."
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 8000,
                    "description": "Output height in pixels."
                  },
                  "fit": {
                    "type": "string",
                    "enum": [
                      "cover",
                      "contain",
                      "inside",
                      "fill"
                    ],
                    "description": "How to fit the picture into width x height. 'cover' crops to fill, 'contain' pads, 'inside' keeps the whole picture."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "jpeg",
                      "webp",
                      "png"
                    ],
                    "default": "jpeg",
                    "description": "Output format. PNG cannot be reduced to a KB target; use jpeg for that."
                  },
                  "background": {
                    "type": "string",
                    "description": "Hex colour used for padding and transparent areas, default #ffffff."
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional name for the result, without extension."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/convert_image": {
      "post": {
        "operationId": "convert_image",
        "summary": "Convert, rotate or clean an image",
        "description": "Convert an image between JPG, PNG and WebP, optionally rotate or flip it. Camera and location data (EXIF) is always removed from the result. Use this for requests like 'make this a JPG', 'turn this WebP into PNG' or 'rotate this photo'. For a file-size limit use resize_image instead.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public https link to the image. Use this when the user gave a link."
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "The image file as base64 (a data: prefix is fine). Use this when you have the file contents but no public link."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "jpeg",
                      "png",
                      "webp"
                    ]
                  },
                  "quality": {
                    "type": "integer",
                    "minimum": 40,
                    "maximum": 100,
                    "default": 90
                  },
                  "rotate": {
                    "type": "integer",
                    "enum": [
                      0,
                      90,
                      180,
                      270
                    ],
                    "description": "Clockwise degrees."
                  },
                  "flip_horizontal": {
                    "type": "boolean"
                  },
                  "flip_vertical": {
                    "type": "boolean"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional name for the result, without extension."
                  }
                },
                "required": [
                  "format"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/images_to_pdf": {
      "post": {
        "operationId": "images_to_pdf",
        "summary": "Combine images into one PDF",
        "description": "Turn one or more images (photos, scans) into a single PDF, one image per page, in the order given. Use for 'make a PDF from these photos'. Up to 10 images.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "maxItems": 10,
                    "description": "Public links, in page order."
                  },
                  "images_base64": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "description": "Images as base64, in page order."
                  },
                  "page_size": {
                    "type": "string",
                    "enum": [
                      "a4",
                      "letter",
                      "fit"
                    ],
                    "default": "a4",
                    "description": "'fit' makes each page the size of its image."
                  },
                  "margin_mm": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 40,
                    "default": 10
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional name for the result, without extension."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/merge_pdfs": {
      "post": {
        "operationId": "merge_pdfs",
        "summary": "Merge PDF files",
        "description": "Join two or more PDF files into one, in the order given. Use for 'combine these PDFs'. Up to 5 files and 300 pages. Password-protected PDFs are not supported.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pdf_urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "minItems": 1,
                    "maxItems": 5
                  },
                  "pdfs_base64": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 5
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional name for the result, without extension."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/passport_photo_sheet": {
      "post": {
        "operationId": "passport_photo_sheet",
        "summary": "Make a printable passport photo sheet",
        "description": "Crop a portrait to a passport or ID photo size and lay out as many copies as fit on a print sheet (4x6 inch photo paper, A4 and more), with thin cut lines, ready to print at 100% scale. Sizes: 35x45 (India, UK, Schengen), 51x51 (US 2x2 inch), 33x48, 30x40, 50x70, 25x35 (stamp size), 45x45, 35x50, 38x51 millimetres. The head is placed from the top-centre automatically; background change and exact head framing are in the web studio at https://resizebaba.com/passport-photo. Needs a Pro API key.",
        "x-openai-isConsequential": false,
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public https link to the image. Use this when the user gave a link."
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "The image file as base64 (a data: prefix is fine). Use this when you have the file contents but no public link."
                  },
                  "size": {
                    "type": "string",
                    "default": "35x45",
                    "description": "Photo size in millimetres as 'WxH', for example 35x45."
                  },
                  "paper": {
                    "type": "string",
                    "enum": [
                      "4x6",
                      "5x7",
                      "a6",
                      "a5",
                      "a4",
                      "letter"
                    ],
                    "default": "4x6"
                  },
                  "copies": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 60,
                    "default": 0,
                    "description": "0 means as many as fit."
                  },
                  "background": {
                    "type": "string",
                    "description": "Sheet colour as hex, default #ffffff."
                  },
                  "cut_lines": {
                    "type": "boolean",
                    "default": true
                  },
                  "output": {
                    "type": "string",
                    "enum": [
                      "jpeg",
                      "pdf"
                    ],
                    "default": "jpeg"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional name for the result, without extension."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Show this link to the user. Expires in 15 minutes."
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer"
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "met_target": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request: the message explains what to fix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Needs a Pro API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Optional Pro API key (starts with rsz_)."
      }
    }
  }
}