Getting Started with The Drive AI Developer Platform — API Quickstart Guide
What You Can Build
The Drive AI Developer Platform gives you five APIs that cover the full document-processing pipeline. All endpoints live at dev.thedrive.ai, authenticated with a single API key.
- Markdown — Convert any URL or document to clean, LLM-ready markdown. One GET request, no parsing.
- Extract — Pull structured JSON from PDFs, invoices, contracts, and websites. You define the schema, the API returns typed data with confidence scores.
- Analyze — Ask questions about documents and get computed answers. The API runs multi-step reasoning with sandboxed Python code execution.
- Screenshot — Capture JPEG, GIF, or MP4 of any URL. Supports dark mode, custom viewports, and full-page captures.
- Thumbnails — Generate preview images for 107+ file types in a single batch request.
Each API is independent. Use one or combine them. This guide walks through all five with working examples you can run immediately.
Get Your API Key
- Go to dev.thedrive.ai.
- Create an account or sign in.
- Copy your API key from the dashboard. It starts with
tda_live_.
Every account includes 100 free credits per month. That is enough to test every API and build a prototype before you spend anything.
Install the SDK
Node.js
npm install @thedriveai/sdk
import { TheDriveAI } from "@thedriveai/sdk";
const client = new TheDriveAI({ apiKey: "tda_live_..." });
Python
pip install thedriveai
from thedriveai import TheDriveAI
client = TheDriveAI(api_key="tda_live_...")
You can also call the APIs directly with curl or any HTTP client. Every example below includes the raw HTTP request alongside the SDK call.
Your First API Call — Markdown
The Markdown API is the simplest endpoint. One GET request converts any URL into clean markdown with headings, tables, and code blocks preserved. JavaScript-rendered pages are handled automatically.
Endpoint: GET https://dev.thedrive.ai/md/{url}
Cost: 1 credit per conversion.
curl
curl -H "X-API-Key: tda_live_..." \
https://dev.thedrive.ai/md/https://openai.com/index/gpt-4o
Node.js
const markdown = await client.markdown.convert("https://openai.com/index/gpt-4o");
console.log(markdown);
Python
markdown = client.markdown.convert("https://openai.com/index/gpt-4o")
print(markdown)
The response is raw markdown text — no JSON wrapping, no metadata overhead. Drop it straight into a vector database, an LLM prompt, or a document store.
For a deep dive into use cases like RAG pipelines and AI agent context, see Free URL to Markdown API for LLM Pipelines.
Extract Structured Data
The Extract API takes a document and a schema, and returns typed JSON. Each extracted field includes a confidence score and a citation pointing to where the value was found in the source document.
Endpoint: POST https://dev.thedrive.ai/api/v1/extract
Cost: 1 credit per page, 5 credits per site.
Define Your Schema
The schema tells the API what to pull. Each field has a type, a description, and an optional required flag.
curl
curl -X POST https://dev.thedrive.ai/api/v1/extract \
-H "X-API-Key: tda_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/invoice-2024-003.pdf",
"schema": {
"vendor_name": {
"type": "string",
"description": "Company that issued the invoice",
"required": true
},
"total_amount": {
"type": "number",
"description": "Total amount due in USD",
"required": true
},
"due_date": {
"type": "string",
"description": "Payment due date in YYYY-MM-DD format"
}
}
}'
Node.js
const result = await client.extract({
url: "https://example.com/invoice-2024-003.pdf",
schema: {
vendor_name: { type: "string", description: "Company that issued the invoice", required: true },
total_amount: { type: "number", description: "Total amount due in USD", required: true },
due_date: { type: "string", description: "Payment due date in YYYY-MM-DD format" },
},
});
console.log(result.data);
// { vendor_name: "Acme Corp", total_amount: 1250.00, due_date: "2024-02-15" }
Python
result = client.extract(
url="https://example.com/invoice-2024-003.pdf",
schema={
"vendor_name": {"type": "string", "description": "Company that issued the invoice", "required": True},
"total_amount": {"type": "number", "description": "Total amount due in USD", "required": True},
"due_date": {"type": "string", "description": "Payment due date in YYYY-MM-DD format"},
},
)
print(result.data)
# {"vendor_name": "Acme Corp", "total_amount": 1250.00, "due_date": "2024-02-15"}
Response Structure
Every field in the response includes a confidence score (0 to 1) and a citation referencing the source text:
{
"data": {
"vendor_name": "Acme Corp",
"total_amount": 1250.00,
"due_date": "2024-02-15"
},
"confidence": {
"vendor_name": 0.97,
"total_amount": 0.95,
"due_date": 0.91
},
"citations": {
"vendor_name": "From: Acme Corp, 123 Business Ave",
"total_amount": "Total Due: $1,250.00",
"due_date": "Payment Due: February 15, 2024"
}
}
The schema is flexible. Define fields for invoices, contracts, receipts, medical forms, or any document type. For advanced patterns like nested schemas and batch extraction, see Extract Structured Data from Documents API.
Analyze Documents
The Analyze API goes beyond extraction. It performs multi-step reasoning over documents, running sandboxed Python code when computation is needed. Ask a question in plain English and get a computed answer with a full reasoning trace.
Endpoint: POST https://dev.thedrive.ai/api/v1/analyze
Cost: 2 credits per page, 10 credits per site.
curl
curl -X POST https://dev.thedrive.ai/api/v1/analyze \
-H "X-API-Key: tda_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/quarterly-report-q1-2024.pdf",
"question": "What was the quarter-over-quarter revenue growth rate, and which product line contributed the most to the increase?"
}'
Node.js
const analysis = await client.analyze({
url: "https://example.com/quarterly-report-q1-2024.pdf",
question:
"What was the quarter-over-quarter revenue growth rate, and which product line contributed the most to the increase?",
});
console.log(analysis.answer);
console.log(analysis.reasoning);
Python
analysis = client.analyze(
url="https://example.com/quarterly-report-q1-2024.pdf",
question="What was the quarter-over-quarter revenue growth rate, and which product line contributed the most to the increase?",
)
print(analysis.answer)
print(analysis.reasoning)
The response includes the computed answer, the reasoning steps taken, and any code that was executed during analysis. This is useful for financial documents, research papers, and datasets where the answer requires calculation rather than simple lookup.
For more examples including spreadsheet analysis and multi-document comparison, see AI Document Analysis API with Code Execution.
Capture Screenshots
The Screenshot API renders any URL and returns a visual capture. It supports JPEG, GIF, and MP4 formats, with options for dark mode, custom viewports, and full-page scrolling captures.
Endpoint: GET https://dev.thedrive.ai/{url}
Cost: 1 credit per capture.
curl
curl -H "X-API-Key: tda_live_..." \
"https://dev.thedrive.ai/https://github.com" \
--output screenshot.jpg
Node.js
const screenshot = await client.screenshot("https://github.com");
// Returns image buffer
Python
screenshot = client.screenshot("https://github.com")
# Returns image bytes
Use this for link previews, visual regression testing, social sharing cards, or any workflow that needs a rendered snapshot of a URL.
Batch Thumbnails
The Thumbnails API generates preview images for files across 107+ formats — PDFs, Office documents, images, videos, CAD files, and more. Send a batch of file URLs and get back thumbnail images.
Endpoint: POST https://dev.thedrive.ai/api/v1/thumbnails
Cost: 1 credit per thumbnail.
curl
curl -X POST https://dev.thedrive.ai/api/v1/thumbnails \
-H "X-API-Key: tda_live_..." \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com/report.pdf",
"https://example.com/presentation.pptx",
"https://example.com/spreadsheet.xlsx"
]
}'
Node.js
const thumbnails = await client.thumbnails({
urls: [
"https://example.com/report.pdf",
"https://example.com/presentation.pptx",
"https://example.com/spreadsheet.xlsx",
],
});
thumbnails.forEach((thumb) => {
console.log(thumb.url, thumb.image);
});
Python
thumbnails = client.thumbnails(
urls=[
"https://example.com/report.pdf",
"https://example.com/presentation.pptx",
"https://example.com/spreadsheet.xlsx",
]
)
for thumb in thumbnails:
print(thumb.url, thumb.image)
Batch processing keeps requests efficient. Send up to 100 URLs in a single call instead of making individual requests. For supported formats and advanced options, see Free Thumbnail Preview API for Developers.
What to Build Next
You now have working calls to all five APIs. Here are some common patterns developers build with them:
RAG pipelines — Use the Markdown API to convert source URLs into clean text, then chunk and embed for retrieval-augmented generation. See the full walkthrough in Free URL to Markdown API for LLM Pipelines.
Document processing workflows — Chain Extract and Analyze. Extract the structured fields first, then run Analyze for any question that requires computation or cross-referencing. Detailed examples in Extract Structured Data from Documents API and AI Document Analysis API with Code Execution.
File management UIs — Use the Thumbnails API to generate visual previews for file browsers, dashboards, or knowledge bases. The Thumbnail Preview API guide covers supported formats and rendering options.
Link previews and monitoring — The Screenshot API works well for social cards, visual diff testing, and content monitoring dashboards.
Pricing
| Tier | Cost | Credits |
|---|---|---|
| Free | $0 | 100 credits/month |
| Pro | $0.01/credit | Pay as you go |
| Enterprise | Custom | Volume pricing, SLA, dedicated support |
Credit costs per API
| API | Cost |
|---|---|
| Markdown | 1 credit |
| Extract | 1 credit/page, 5 credits/site |
| Analyze | 2 credits/page, 10 credits/site |
| Screenshot | 1 credit |
| Thumbnails | 1 credit/thumbnail |
The free tier resets monthly. No credit card required to start.
Have questions? Reach out at contact@thedrive.ai.
Share it with your network
