pdfreader API

Vand ID: vand-c1f5764a-c6f6-419c-afb9-eae91adf77ee

Learn how to easily use the pdfreader API tool with the OpenAI API.

This API extracts text from a PDF using a provided URL.

OpenAI function calls:

{
  "name": "pdfreader",
  "description": "This endpoint takes a PDF URL as input and returns the extracted text from the PDF.\n",
  "parameters": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "The URL of the PDF file can be a public Google Drive link, a Dropbox link, or any other PDF URL"
      },
      "section_number": {
        "type": "string",
        "description": "The section of the PDF to extract, with each section containing approximately 2k words",
        "default": 1
      }
    }
  }
}

Auth Type

none

Servers

https://pdfreader.maila.ai

OpenAPI:

{
  "openapi": "3.1.3",
  "info": {
    "title": "pdfreader API",
    "description": "This API extracts text from a PDF using a provided URL.",
    "version": "1.0.0",
    "contact": {
      "email": "kevin@maila.ai"
    }
  },
  "servers": [
    {
      "url": "https://pdfreader.maila.ai"
    }
  ],
  "paths": {
    "/extract": {
      "post": {
        "tags": [
          "PDF Extraction"
        ],
        "operationId": "pdfreader",
        "summary": "Extract text from a PDF",
        "description": "This endpoint takes a PDF URL as input and returns the extracted text from the PDF.\n",
        "requestBody": {
          "description": "The URL of the PDF from which the text is to be extracted",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL of the PDF file can be a public Google Drive link, a Dropbox link, or any other PDF URL"
                  },
                  "section_number": {
                    "type": "string",
                    "description": "The section of the PDF to extract, with each section containing approximately 2k words",
                    "default": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation was successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PdfChunk"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    }
                  }
                },
                "example": {
                  "error": "Server error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PdfChunk": {
        "type": "object",
        "properties": {
          "currentSection": {
            "type": "integer",
            "description": "The current section of the PDF"
          },
          "totalSections": {
            "type": "integer",
            "description": "The total number of sections in the PDF"
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "description": "The source URL of the PDF"
          },
          "text": {
            "type": "string",
            "description": "The text content of the PDF chunk"
          }
        }
      }
    }
  }
}