canonical: https://jentic.com/apis/cradl.ai/cradl

# Cradl AI API

Jentic publishes the only available OpenAPI specification for Cradl AI API, keeping it validated and agent-ready. Cradl AI lets teams build AI agents that automate document-heavy workflows such as invoice ingestion, purchase order processing, and KYC document review. The API exposes operations for listing configured agents, kicking off a run by submitting a document, and creating documents in the platform for downstream extraction. Authentication is via OAuth 2.0 client credentials and the production base URL is api.cradl.ai/v1.

## For AI agents

Trigger document-processing agents on Cradl AI to extract structured data from invoices, receipts, and forms. Use when an agent needs human-in-the-loop document automation rather than raw OCR.

## Scope

Does not handle raw image OCR without an agent context, document storage as a CMS, or e-signature workflows - use for AI document extraction with configured agents only.

## Capabilities

- List configured Cradl document-processing agents available in the workspace
- Submit a document run to a specific agent and receive structured extracted fields
- Upload documents into Cradl for downstream extraction or training data collection
- Authenticate via OAuth 2.0 client credentials with scoped service-to-service tokens
- Combine automated extraction with human-in-the-loop review for low-confidence fields

## Use cases

### Invoice Automation for Accounts Payable

An accounts payable team automates invoice intake by submitting each incoming PDF to a Cradl invoice agent. POST `/agents/{agentId}/runs` returns the extracted vendor, total, line items, and tax amounts as structured JSON. Low-confidence fields are routed to a human reviewer through Cradl's UI before posting to the ERP. This removes manual data entry while keeping a control point for edge cases.

Example prompt: Submit invoice 'INV-7782.pdf' to agent 'invoice-eu' via POST `/agents/{agentId}/runs` and route any field with confidence below 0.85 to the AP reviewer queue.

### KYC Document Review

A fintech onboarding flow uses Cradl to extract identity fields from passports, utility bills, and proof-of-address documents. POST /documents uploads each scan and POST `/agents/{agentId}/runs` triggers the KYC agent that returns name, date of birth, and address. Human-in-the-loop review handles ambiguous cases before the customer is approved. This shortens onboarding without weakening compliance.

Example prompt: Upload passport scan via POST /documents, then run the KYC agent and capture name, dob, and address fields with their confidence scores.

### Purchase Order Matching Pipeline

A procurement system runs incoming purchase order PDFs through a Cradl agent to extract item codes, quantities, and prices, then matches against existing supplier catalogues. The structured output feeds straight into the ERP without staff retyping. Cradl's training-on-corrections improves accuracy as more orders flow through.

Example prompt: POST the new PO PDF to /documents, then trigger agent 'po-extractor' and return a list of {sku, qty, unit_price} objects to the ERP integration.

### Agent-Driven Document Workflow

An AI agent in a finance team's chat workflow accepts dropped PDFs from users, sends each to the right Cradl agent based on document type, and returns the extracted fields back into the conversation. Through Jentic, the agent finds the Cradl operation by intent and uses scoped OAuth tokens that it never sees in plain text.

Example prompt: Search Jentic for 'run cradl document agent', list agents via GET /agents to pick the right one, then POST `/agents/{agentId}/runs` with the user's uploaded PDF.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/agents` | List configured Cradl agents |
| POST | `/agents/{agentId}/runs` | Trigger an agent run on a document |
| POST | `/documents` | Upload a document for processing |

## Key resources

- **Agents** — List configured document-processing agents in the workspace
- **Runs** — Trigger an agent run on a specific document and receive structured extraction output
- **Documents** — Upload documents for extraction or training data collection

## Why Jentic

- **Setup:** Wiring Cradl AI by hand means running its OAuth2 client-credentials exchange against auth.cradl.ai, passing the correct audience, and refreshing the short-lived bearer before every batch of document runs. Through Jentic you install once, import Cradl AI from the API Directory, store the client id and secret once, and your agent calls it.
- **Permission scoping:** Cradl puts the agent id in the URL path (`/agents/{agentId}/runs`), so a rule can pin your agent to one Cradl document-processing agent and nothing else. You choose the operations it may call, so it can list agents and start runs only if you include those operations.
- **Credential handling:** Your Cradl client id and secret are stored once, encrypted, by your own Jentic One instance and exchanged for short-lived tokens at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'extract data from an invoice' or 'run a document AI agent', and Jentic returns the matching Cradl operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mindee API** — Mindee provides hosted document parsing APIs for invoices, receipts, and IDs.
- **Rossum API** — Rossum is a competing document AI platform aimed at enterprise AP automation.
- **Nanonets API** — Nanonets offers customisable OCR models for invoices, receipts, and forms.

## FAQ

### Why is there no official OpenAPI spec for Cradl AI API?

Cradl AI does not publish an OpenAPI specification on a public docs site. Jentic generates and maintains this spec so that AI agents and developers can call Cradl AI API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Cradl AI API use?

Cradl uses OAuth 2.0 client credentials. Service-to-service integrations exchange a client ID and secret for a bearer token, which is then sent as the Authorization header on each call. Through Jentic, credentials are stored encrypted and tokens are minted and refreshed automatically.

### Can I extract invoice line items with the Cradl AI API?

Yes. POST `/agents/{agentId}/runs` against an invoice agent returns line items along with totals, vendor details, and tax. Low-confidence fields can be flagged for human-in-the-loop review in the Cradl UI before posting downstream.

### How do I trigger a Cradl agent through Jentic?

Search Jentic for 'run a cradl document agent', call GET /agents to find the right agent ID, then POST `/agents/{agentId}/runs` with the document reference. Jentic handles the OAuth bearer token end to end.

### What are the rate limits for the Cradl AI API?

The OpenAPI spec does not declare numeric rate limits. Cradl enforces fair-use limits in production tied to the workspace's plan. Agents should serialise heavy batch runs and back off on 429 responses.

### Is Cradl AI free?

Cradl offers paid plans based on document volume and seats. There is typically a free trial; check cradl.ai for current pricing tiers. The API itself does not charge extra over the workspace plan.

### Can I limit what my agent is allowed to do with the Cradl AI API?

Yes. Because Jentic One is self-hosted, your own rules decide which Cradl operations the agent may call, so you can allow it to list agents with GET /agents and start runs with POST `/agents/{agentId}/runs` while blocking anything else. Since Cradl puts the agent id in the URL path, a rule can pin the agent to a single Cradl document-processing agent and no other. Your OAuth client id and secret stay under your control and are exchanged for short-lived tokens at execution time, never entering the agent's prompt or logs.
