PDF Support

Upload and Analyze Documents Seamlessly in GTWY

PDFs don’t need to slow you down. GTWY’s PDF Support lets you upload, read, and analyze PDF files instantly using AI — whether it’s research papers, contracts, reports, proposals, or manuals.
Instead of manually scanning long documents, GTWY extracts insights, summarizes content, and answers questions automatically.

This turns static PDFs into dynamic, intelligent knowledge sources.

image.png

How PDF Support Works

GTWY gives you two ways to upload and use PDFs with your AI agents:

Option 1: Upload via External Link

If your PDF is already hosted online, simply include its URL in your API request.

curl --location 'https://api.gtwy.ai/api/v2/model/chat/completion' \
--header 'pauthkey: YOUR_GENERATED_PAUTHKEY' \
--header 'Content-Type: application/json' \
--data '{
  "user": "Summarize the key takeaways from the attached PDF.",
  "agent_id": "YOUR_AGENT_ID",
  "thread_id": "YOUR_THREAD_ID",
  "response_type": "text",
  "variables": {},
  "files": [
    "https://example.com/document.pdf"
  ]
}'

If both thread_id and agent_id are provided, the PDF will automatically be linked to that session — so you won’t need to send the URL again in later requests.

Option 2: Upload PDF via GTWY API

Don’t have a hosted URL? You can directly upload your file to GTWY.

curl --location 'https://api.gtwy.ai/files/upload' \
--header 'pauthkey: YOUR_GENERATED_PAUTHKEY' \
--form 'file=@"path/to/your/document.pdf"' \
--form 'agent_id="YOUR_AGENT_ID"' \
--form 'thread_id="YOUR_THREAD_ID"'

Example Response:

{
  "success": true,
  "file_url": "https://resources.gtwy.ai/uploads/example.pdf"
}

Once uploaded, just use the returned file_url in your main API request:

"files": ["https://resources.gtwy.ai/uploads/example.pdf"]

Handling Long PDFs and Timeouts

If processing takes longer than one minute, you can use Webhook Support to receive complete, asynchronous responses at your custom endpoint — ensuring reliable, error-free execution.

Common Use Cases

GTWY’s PDF Support is perfect for automating tasks that rely on document analysis, such as:

  • Summarizing academic research papers

  • Extracting key clauses from legal documents

  • Pulling insights from business or financial reports

  • Analyzing invoices, receipts, and structured data

  • Reviewing and rewriting proposals or documentation

  • Answering questions from HR or training manuals

  • Summarizing meeting minutes and extracting decisions

Key Benefits

  • Faster document understanding: No need to manually read long PDFs.

  • Accurate data extraction: Ask specific questions and get context-aware answers.

  • Multimodal context: Combine PDFs with text or variables for richer responses.

Usage Considerations

File Size Limitations

  • Maximum of 100 pages or 32MB total content per request (across multiple files).

Supported LLM Models
GTWY integrates with advanced vision-capable LLMs, including:

  • OpenAI Models: GPT-4o family, GPT 4.1 family, GPT 5 family, o1, o3-mini, o4-mini

  • Anthropic Models: Claude 3 family, Claude 4 family

  • Groq : Llama 4 Scout

  • Gemini : Gemini 2.5 and 2.0 family

  • AI ML : Llama 4 Maverick 17b 128e Instruct

  • Grok : Grok 4 fast, Grok 4 0709

These models enable accurate text and visual content understanding for comprehensive PDF analysis.

Summary

It allows AI agents to read, summarize, extract, and analyze PDF content instantly — saving time and boosting accuracy across research, business, legal, finance, HR, and education.

Documents stop being obstacles.
They become fuel for smarter decisions.