Extract, analyze, and cross-reference any document with a single API call
The same document intelligence that powers The Drive AI, available as an API. Upload a PDF, spreadsheet, image, or URL — get back typed JSON matching your schema.
This is not a full API for The Drive AI product. These are standalone document intelligence endpoints — the same ones we use internally — exposed for developers and AI agents that need to process documents programmatically.
Extract
Pull structured fields from a document. Fast, schema-enforced, type-safe.
Analyze
Compute, reason, and derive answers that aren’t explicitly written in the document.
Cross-Analyze
Validate and cross-reference across 2-5 documents simultaneously.
import { TheDriveAI, fromZod } from "@thedriveai/sdk";import { z } from "zod";const Invoice = z.object({ vendor: z.string().describe("Company name"), total: z.number().describe("Total amount due"), is_paid: z.boolean().describe("Whether the invoice is paid"),});const client = new TheDriveAI({ apiKey: "tda_live_..." });const result = await client.extract({ file: readFileSync("invoice.pdf"), schema: fromZod(Invoice),});
The SDK converts your Pydantic models and Zod schemas to the typed format automatically — including nested objects, arrays, enums, and optional fields.