{
  "openapi": "3.0.3",
  "info": {
    "title": "FatBaby PDF API",
    "version": "1.0.0",
    "description": "PDF convert, manipulate, OCR, extract, generate. Async jobs poll via /v1/jobs."
  },
  "servers": [
    {
      "url": "https://thefatbaby.com/api"
    }
  ],
  "paths": {
    "/v1/pdf/metadata": {
      "post": {
        "summary": "Metadata",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/validate": {
      "post": {
        "summary": "Validate",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/merge": {
      "post": {
        "summary": "Merge",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/split": {
      "post": {
        "summary": "Split",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/extract-pages": {
      "post": {
        "summary": "Extract pages",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/remove-pages": {
      "post": {
        "summary": "Remove pages",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/reorder-pages": {
      "post": {
        "summary": "Reorder pages",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/rotate": {
      "post": {
        "summary": "Rotate",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/crop": {
      "post": {
        "summary": "Crop",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/resize": {
      "post": {
        "summary": "Resize",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/flatten": {
      "post": {
        "summary": "Flatten",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/repair": {
      "post": {
        "summary": "Repair",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/compress": {
      "post": {
        "summary": "Compress",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/optimize": {
      "post": {
        "summary": "Optimize",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/encrypt": {
      "post": {
        "summary": "Encrypt",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/decrypt": {
      "post": {
        "summary": "Decrypt",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/watermark": {
      "post": {
        "summary": "Watermark",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/stamp": {
      "post": {
        "summary": "Stamp",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/remove-metadata": {
      "post": {
        "summary": "Remove metadata",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/from-html": {
      "post": {
        "summary": "From HTML",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/from-url": {
      "post": {
        "summary": "From URL",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/from-markdown": {
      "post": {
        "summary": "From Markdown",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/from-office": {
      "post": {
        "summary": "From Office",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/from-images": {
      "post": {
        "summary": "From images",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/to-images": {
      "post": {
        "summary": "To images",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/ocr": {
      "post": {
        "summary": "OCR",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/make-searchable": {
      "post": {
        "summary": "Make searchable",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/deskew": {
      "post": {
        "summary": "Deskew",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/clean-scan": {
      "post": {
        "summary": "Clean scan",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/to-pdfa": {
      "post": {
        "summary": "To PDF/A",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/extract-text": {
      "post": {
        "summary": "Extract text",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/extract-tables": {
      "post": {
        "summary": "Extract tables",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/extract-images": {
      "post": {
        "summary": "Extract images",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/to-markdown": {
      "post": {
        "summary": "To Markdown",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/to-html": {
      "post": {
        "summary": "To HTML",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/to-json": {
      "post": {
        "summary": "To JSON",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/pdf/generate": {
      "post": {
        "summary": "Generate",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "402": {
            "description": "Insufficient credits"
          }
        }
      }
    },
    "/v1/jobs/{jobId}": {
      "get": {
        "summary": "Get job status",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Job"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "fb_live_"
      }
    }
  }
}