{
  "openapi": "3.1.0",
  "info": {
    "title": "Reimply API",
    "version": "1.0.0",
    "description": "Convert, compress, ingest, optimize, merge, split and OCR files over HTTP. Also: prompt-injection test generation, PII pseudonymisation and Inspect checks. 1 file or tool call = 1 conversion (video and audio jobs count as 3). No credit maths. Files are deleted 60 minutes after a job finishes (inputs as soon as the job ends). Tool request payloads are not stored. Ingest and optimize run in memory and are not written to disk during processing.\n\nConversions: 1 file = 1 conversion. Sync tools (prompt-injection, PII, inspect) cost 1 conversion each. Video and audio jobs count as 3. File size and processing time do not add conversions. Failed jobs cost nothing.\nFree: 250 conversions a month, 25 MB, no card. Plans: Starter £12/mo for 3,000 conversions, 100 MB, 3 concurrent jobs; Growth £39/mo for 15,000 conversions, 250 MB, 10 concurrent jobs; Scale £99/mo for 50,000 conversions, 500 MB, 25 concurrent jobs.\n\nAuthenticated responses include Reimply-Quota-Limit (monthly allowance), Reimply-Quota-Remaining (conversions left in this period) and Reimply-Quota-Reset (Unix time of the next monthly reset).\n\nLive keys start with rmk_ and use your monthly conversions. Test keys start with rmt_, never use conversions, return livemode: false, accept files up to 2 MB, and are limited to 20 requests a minute and 100 an hour. Image, PDF and ingest results in test mode are watermarked or labelled. See https://reimply.com/api/docs#test and https://reimply.com/llms.txt.",
    "contact": {
      "name": "Reimply",
      "url": "https://reimply.com/contact"
    },
    "termsOfService": "https://reimply.com/legal/terms"
  },
  "servers": [
    {
      "url": "https://app.reimply.com"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Jobs"
    },
    {
      "name": "Tools"
    },
    {
      "name": "Files"
    },
    {
      "name": "Account"
    }
  ],
  "paths": {
    "/v1/convert": {
      "post": {
        "operationId": "convert",
        "summary": "Convert a file",
        "description": "Images, audio, video, PDF pages, data files and Markdown/DOCX. GET /v1/conversions lists every pair.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "to": {
                    "type": "string",
                    "example": "jpg",
                    "description": "Target format."
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "quality": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "dpi": {
                        "type": "integer",
                        "minimum": 36,
                        "maximum": 300,
                        "description": "PDF to image."
                      },
                      "height": {
                        "type": "integer",
                        "description": "Video: scale to this height."
                      },
                      "crf": {
                        "type": "integer",
                        "minimum": 16,
                        "maximum": 40
                      },
                      "audio_bitrate": {
                        "type": "string",
                        "enum": [
                          "64k",
                          "96k",
                          "128k",
                          "160k",
                          "192k",
                          "256k",
                          "320k"
                        ]
                      },
                      "fps": {
                        "type": "integer",
                        "description": "GIF frame rate."
                      },
                      "color_mode": {
                        "type": "string",
                        "enum": [
                          "color",
                          "binary"
                        ],
                        "description": "SVG trace. color keeps the palette. binary thresholds to black and white."
                      },
                      "clustering": {
                        "type": "string",
                        "enum": [
                          "stacked",
                          "cutout"
                        ],
                        "description": "SVG trace. stacked paints layers on top of each other. cutout punches holes."
                      },
                      "color_precision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 8,
                        "default": 6,
                        "description": "SVG trace. Each step doubles the palette. 6 is 64 colours."
                      },
                      "gradient_step": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 128,
                        "default": 16,
                        "description": "SVG trace. How different two colour layers must be before they split."
                      },
                      "filter_speckle": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 16,
                        "default": 4,
                        "description": "SVG trace. Drops paths shorter than this."
                      },
                      "curve_fitting": {
                        "type": "string",
                        "enum": [
                          "spline",
                          "polygon",
                          "pixel"
                        ],
                        "default": "spline",
                        "description": "SVG trace. spline uses curves, polygon uses straight lines, pixel follows the bitmap."
                      },
                      "corner_threshold": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 180,
                        "default": 60,
                        "description": "SVG trace. Higher keeps sharper corners."
                      },
                      "segment_length": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 10,
                        "default": 4,
                        "description": "SVG trace. Higher prefers longer straight pieces."
                      },
                      "splice_threshold": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 180,
                        "default": 45,
                        "description": "SVG trace. Higher joins neighbouring curves more readily."
                      },
                      "blur": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 5,
                        "default": 0,
                        "description": "SVG trace. Smooths the bitmap before tracing."
                      },
                      "scale": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 4,
                        "default": 1,
                        "description": "SVG trace. Multiplies path coordinates."
                      },
                      "stroke": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 8,
                        "default": 0,
                        "description": "SVG trace. 0 draws filled shapes. Above 0 draws outlines of this width."
                      },
                      "decimals": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 3,
                        "default": 1,
                        "description": "SVG trace. Decimal places kept on path coordinates."
                      },
                      "background": {
                        "type": "string",
                        "enum": [
                          "none",
                          "white",
                          "black"
                        ],
                        "default": "none",
                        "description": "SVG trace. Flattens transparency onto white or black before tracing."
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "to": {
                    "type": "string"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/compress": {
      "post": {
        "operationId": "compress",
        "summary": "Compress an image, PDF, video or audio file",
        "description": "Set options.target_size to get an image or PDF at or under an exact size (for example \"200kb\"). If the size cannot be reached, the smallest result is returned and listed in target_missed.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "target_size": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "description": "bytes"
                          },
                          {
                            "type": "string",
                            "example": "200kb"
                          }
                        ]
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "jpg",
                          "webp",
                          "png",
                          "avif",
                          "keep"
                        ]
                      },
                      "quality": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "max_side": {
                        "type": "integer"
                      },
                      "pdf_level": {
                        "type": "string",
                        "enum": [
                          "light",
                          "strong"
                        ]
                      },
                      "crf": {
                        "type": "integer"
                      },
                      "height": {
                        "type": "integer"
                      },
                      "bitrate": {
                        "type": "string"
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/merge": {
      "post": {
        "operationId": "merge",
        "summary": "Merge PDFs (and images) into one PDF",
        "description": "Inputs are joined in order. Images become pages.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inputs": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "description": "A public http(s) URL to download the file from."
                        },
                        {
                          "type": "object",
                          "properties": {
                            "upload_id": {
                              "type": "string",
                              "description": "From POST /v1/uploads, after you PUT the bytes."
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "filename": {
                              "type": "string",
                              "description": "Overrides the file name (the extension decides the input type)."
                            }
                          }
                        }
                      ]
                    },
                    "minItems": 2,
                    "maxItems": 20
                  },
                  "options": {
                    "type": "object",
                    "properties": {}
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/split": {
      "post": {
        "operationId": "split",
        "summary": "Split a PDF",
        "description": "One PDF per page, or per range.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "each",
                          "ranges"
                        ]
                      },
                      "ranges": {
                        "type": "string",
                        "example": "1-3,5,8-"
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organize": {
      "post": {
        "operationId": "organize",
        "summary": "Reorder, remove and rotate PDF pages",
        "description": "options.pages is the new order (1-based); pages left out are removed.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "pages": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "example": [
                          3,
                          1,
                          2
                        ]
                      },
                      "rotate": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer",
                          "enum": [
                            90,
                            180,
                            270
                          ]
                        },
                        "example": {
                          "1": 90
                        }
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images-to-pdf": {
      "post": {
        "operationId": "images_to_pdf",
        "summary": "Turn images into a PDF",
        "description": "One page per image.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inputs": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "description": "A public http(s) URL to download the file from."
                        },
                        {
                          "type": "object",
                          "properties": {
                            "upload_id": {
                              "type": "string",
                              "description": "From POST /v1/uploads, after you PUT the bytes."
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "filename": {
                              "type": "string",
                              "description": "Overrides the file name (the extension decides the input type)."
                            }
                          }
                        }
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 20
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "page_size": {
                        "type": "string",
                        "enum": [
                          "a4",
                          "fit"
                        ]
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pdf-to-images": {
      "post": {
        "operationId": "pdf_to_images",
        "summary": "Render PDF pages as images",
        "description": "One image per page.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "format": {
                        "type": "string",
                        "enum": [
                          "png",
                          "jpg",
                          "webp"
                        ]
                      },
                      "dpi": {
                        "type": "integer",
                        "minimum": 36,
                        "maximum": 300
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ocr": {
      "post": {
        "operationId": "ocr",
        "summary": "Extract text from an image or scanned PDF",
        "description": "Returns a .txt file, or with options.output \"pdf\" a searchable PDF: the original pages with an invisible text layer you can search, select and copy. PDFs: up to 30 pages.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "lang": {
                        "type": "string",
                        "enum": [
                          "eng",
                          "deu",
                          "fra",
                          "spa",
                          "ita",
                          "por",
                          "nld",
                          "pol"
                        ]
                      },
                      "output": {
                        "type": "string",
                        "enum": [
                          "txt",
                          "pdf"
                        ],
                        "default": "txt"
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingest": {
      "post": {
        "operationId": "ingest",
        "summary": "Turn a digital PDF, Word document or data file into Markdown, tables and chunks",
        "description": "Starter, Growth and Scale. Accepts a digital PDF, DOCX, CSV, TSV or JSON file. The job object includes an ingest field with markdown, tables (when they can be found), chunks of about 512 tokens (options.chunk_size, 64 to 4096) and per-page metadata for PDFs. Token counts are approximate (about 4 characters per token). Files are processed in memory, not written to disk. Scanned or image-only PDFs (no extractable text, or under about 20 characters per page on average) return 422 ocr_required_unsupported and are not charged. Costs 1 conversion. Free plans get 403 plan_upgrade_required.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "chunk_size": {
                        "type": "integer",
                        "minimum": 64,
                        "maximum": 4096,
                        "default": 512,
                        "description": "Target tokens per chunk. Counts are approximate (about 4 characters per token)."
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/optimize": {
      "post": {
        "operationId": "optimize",
        "summary": "Shrink an image or PDF to an exact byte cap",
        "description": "Set options.max_bytes (bytes, or a size like \"100kb\"). For images, options.format may be jpg, webp or png. If the file already fits, it is returned as is. If the cap cannot be reached, the job returns 422 target_unreachable with bytes_achieved and max_bytes, and nothing is charged. Costs 1 conversion.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "max_bytes": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "description": "Maximum output size in bytes."
                          },
                          {
                            "type": "string",
                            "example": "100kb"
                          }
                        ],
                        "description": "Required. Between 1 KB and 500 MB."
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "jpg",
                          "webp",
                          "png"
                        ],
                        "description": "Image output format. Defaults to the source format, or jpg."
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/protect": {
      "post": {
        "operationId": "protect",
        "summary": "Add a password to a PDF",
        "description": "options.password is required. Already protected PDFs must be unlocked first. Costs 1 conversion.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "description": "User password required to open the PDF."
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/unlock": {
      "post": {
        "operationId": "unlock",
        "summary": "Remove a known PDF password",
        "description": "options.password must open the file. Wrong passwords return 422. Unknown passwords are not cracked. Owner and permission restrictions are cleared when unlock succeeds. Costs 1 conversion.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "description": "Password that opens the PDF."
                      }
                    }
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Force an async job. Inputs over 4 MB, and any request with webhook_url, are always async."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "https URL that receives job.succeeded or job.failed, signed with your webhook secret."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "options": {
                    "type": "string",
                    "description": "JSON-encoded options."
                  },
                  "async": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync job finished. Send Accept: application/octet-stream to get a single result file (up to 4 MB) as the body instead. Authenticated responses include Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Async job accepted. Poll GET /v1/jobs/{id} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "plan_upgrade_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type or file_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unsupported_conversion, conversion_failed, source_blocked, source_fetch_failed, idempotency_key_reused, ocr_required_unsupported or target_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited or concurrency_limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/prompt-injection/generate": {
      "post": {
        "operationId": "prompt_injection_generate",
        "summary": "Generate prompt-injection test variants",
        "description": "Same engine as the on-site Prompt Injection Test Generator. Returns text and file carriers (carriers as base64) with PIT taxonomy codes. Request text is not stored. Costs 1 conversion. Failed calls are free.",
        "tags": [
          "Tools"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "Attack or test prompt."
                  },
                  "canary": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Detection marker embedded in variants."
                  },
                  "families": {
                    "type": "object",
                    "properties": {
                      "invisible": {
                        "type": "boolean"
                      },
                      "encoding": {
                        "type": "boolean"
                      },
                      "document": {
                        "type": "boolean"
                      },
                      "image": {
                        "type": "boolean"
                      }
                    }
                  },
                  "repeat": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 1
                  },
                  "decode_wrapper": {
                    "type": "boolean",
                    "default": false
                  },
                  "byo_map": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Bring-your-own char to symbol map."
                  },
                  "cover_emoji": {
                    "type": "string",
                    "maxLength": 8
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Variants with optional base64 carriers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pii/pseudonymise": {
      "post": {
        "operationId": "pii_pseudonymise",
        "summary": "Pseudonymise PII in text",
        "description": "Same engine as the on-site PII Pseudonymiser. Returns redacted text, hits and a reversible map. The map is returned to you and never stored. Costs 1 conversion. Set restore: true with text and map to restore for free.",
        "tags": [
          "Tools"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 500000,
                    "description": "Text to pseudonymise (or restore when restore is true)."
                  },
                  "input": {
                    "type": "string",
                    "description": "Alias for text."
                  },
                  "names": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string",
                        "description": "Comma-separated extra names."
                      }
                    ]
                  },
                  "restore": {
                    "type": "boolean",
                    "description": "When true, apply map to restore originals. Free."
                  },
                  "map": {
                    "type": "object",
                    "description": "Restore map from a previous call (required when restore is true)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pseudonymised text and map, or restored text.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspect": {
      "post": {
        "operationId": "inspect",
        "summary": "Run Inspect checks on text or a file",
        "description": "Same checks as /inspect on the site (hidden characters, EXIF parse, PDF security, tracking, carriers, and more). Send text, a multipart file under 4 MB, a URL, or an upload_id from POST /v1/uploads. Optional check scopes to one module slug. Request payloads are not stored. Image metadata stripping and share-card export need a browser and are not available here. Costs 1 conversion.",
        "tags": [
          "Tools"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 500000
                  },
                  "check": {
                    "type": "string",
                    "description": "Optional module slug, for example hidden-characters or exif."
                  },
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "description": "A public http(s) URL to download the file from."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "upload_id": {
                            "type": "string",
                            "description": "From POST /v1/uploads, after you PUT the bytes."
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Overrides the file name (the extension decides the input type)."
                          }
                        }
                      }
                    ]
                  },
                  "filename": {
                    "type": "string"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "text": {
                    "type": "string"
                  },
                  "check": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inspect report.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized or invalid_api_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "source_fetch_failed or conversion_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "create_upload",
        "summary": "Get a presigned upload URL",
        "tags": [
          "Files"
        ],
        "description": "For files over 4 MB (up to your plan and per-type limits). PUT the bytes to url with the given headers within 15 minutes, then use {\"upload_id\": id} as a job input.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filename",
                  "size"
                ],
                "properties": {
                  "filename": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  },
                  "content_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "413": {
            "description": "file_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_file_type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs": {
      "get": {
        "operationId": "list_jobs",
        "summary": "List recent jobs",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Jobs, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Job"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "get_job",
        "summary": "Get a job",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{id}/outputs/{index}": {
      "get": {
        "operationId": "download_output",
        "summary": "Download a result",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to a 60-second download link"
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "get_account",
        "summary": "Conversions, plan and limits",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Account. Also returns Reimply-Quota-Limit, Reimply-Quota-Remaining and Reimply-Quota-Reset.",
            "headers": {
              "Reimply-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "Reimply-Quota-Remaining": {
                "$ref": "#/components/headers/QuotaRemaining"
              },
              "Reimply-Quota-Reset": {
                "$ref": "#/components/headers/QuotaReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversions": {
      "get": {
        "operationId": "list_conversions",
        "summary": "Every supported conversion pair",
        "tags": [
          "Jobs"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Pairs"
          }
        }
      }
    },
    "/v1/webhooks/test": {
      "post": {
        "operationId": "test_webhook",
        "summary": "Send a signed test event to a URL",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Delivery result"
          }
        }
      }
    }
  },
  "webhooks": {
    "jobFinished": {
      "post": {
        "summary": "job.succeeded / job.failed",
        "description": "Header Reimply-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>. Reject events older than 5 minutes. Delivered up to 5 times (now, +10 s, +1 m, +5 m, +30 m) until you answer 2xx.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "job.succeeded",
                      "job.failed",
                      "webhook.test"
                    ]
                  },
                  "created": {
                    "type": "integer"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge."
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "QuotaLimit": {
        "description": "Monthly conversion allowance on the current plan.",
        "schema": {
          "type": "integer"
        },
        "example": 3000
      },
      "QuotaRemaining": {
        "description": "Conversions still available in this period.",
        "schema": {
          "type": "integer"
        },
        "example": 2840
      },
      "QuotaReset": {
        "description": "Unix time (seconds) when the monthly allowance resets.",
        "schema": {
          "type": "integer"
        },
        "example": 1735689600
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your API key from https://reimply.com/account/api. Live keys start with rmk_, test keys with rmt_."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "description": "Retry safely: the same key and body within 24 hours returns the first response (Idempotent-Replayed: true)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "status"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "job"
          },
          "operation": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "sync",
              "async"
            ]
          },
          "livemode": {
            "type": "boolean",
            "description": "false when the request used a test key (rmt_...). Test jobs are never charged."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "processing_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "input_bytes": {
            "type": "integer"
          },
          "conversions": {
            "type": "object",
            "properties": {
              "reserved": {
                "type": "integer"
              },
              "charged": {
                "type": "integer"
              }
            }
          },
          "credits": {
            "type": "object",
            "description": "Same as conversions (compatibility).",
            "properties": {
              "reserved": {
                "type": "integer"
              },
              "charged": {
                "type": "integer"
              }
            }
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "content_type": {
                  "type": "string"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Signed link, valid until expires_at."
                }
              }
            }
          },
          "target_missed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ingest": {
            "type": "object",
            "description": "Present on succeeded /v1/ingest jobs: markdown, tables, chunks and optional PDF page metadata."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "bytes_achieved": {
                "type": "integer"
              },
              "max_bytes": {
                "type": "integer"
              },
              "upgrade_url": {
                "type": "string"
              }
            }
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "attempts": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Upload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "method": {
            "const": "PUT"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object"
          },
          "max_bytes": {
            "type": "integer"
          },
          "expires_at": {
            "type": "string"
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "livemode": {
            "type": "boolean"
          },
          "conversions": {
            "type": "object",
            "properties": {
              "allowance": {
                "type": "integer"
              },
              "purchased": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            }
          },
          "credits": {
            "type": "object",
            "description": "Same as conversions (compatibility).",
            "properties": {
              "allowance": {
                "type": "integer"
              },
              "purchased": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            }
          },
          "allowance": {
            "type": "object"
          },
          "limits": {
            "type": "object"
          }
        }
      }
    }
  }
}