Skip to main content
POST
/
api
/
v2
/
get_pdf_content
PDF Content API - Extract text from PDFs
curl --request POST \
  --url https://api.llmlayer.dev/api/v2/get_pdf_content \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/document.pdf"
}
'
{
"text": "<string>",
"pages": 123,
"url": "<string>",
"statusCode": 123,
"cost": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your LLMLayer API key. Include in Authorization header as: Bearer YOUR_LLMLAYER_API_KEY

Body

application/json
url
string<uri>
required

Direct URL to PDF document

Example:

"https://example.com/document.pdf"

Response

Extracted PDF content with page count

text
string
required

Extracted text content from all pages

pages
integer
required

Number of pages in the PDF

url
string
required

The PDF URL

statusCode
integer
required

HTTP status code (200 for success)

cost
number

Cost in USD ($0.002 per PDF extraction)