What it does

  • Extracts all text from PDF documents
  • Returns page count and document metadata
  • Works with any public PDF URL

Pricing

**0.005perrequest(0.005 per request** (5 per 1,000 requests)

Authentication

Include your API key in the Authorization header:
Authorization: Bearer YOUR_LLMLAYER_API_KEY

Endpoint

POST /api/v1/get_pdf_content

SDK Usage

from llmlayer import LLMLayerClient

client = LLMLayerClient(api_key="your-api-key")

response = client.get_pdf_content(
url="https://example.com/document.pdf"
)

print(response.text)  # Extracted text
print(response.pages)  # Number of pages

Request

url
string
required
The URL of the PDF document. Must be a direct link to a PDF file.Example: "https://example.com/document.pdf"

Response

text
string
The extracted text content from the PDF
pages
integer
Total number of pages in the PDF document
url
string
The PDF URL (same as input)
status_code
integer
HTTP status code (200 for success)
cost
number
Cost in USD for this request ($0.005)

Limitations

  • PDF must be publicly accessible (no authentication)
  • 15-second timeout for extraction
  • Direct PDF URLs only (must end in .pdf or be a direct PDF link)

Error Codes

Need Help? Join our Discord or email support@llmlayer.ai