Document AI

Any financial file to structured JSON.

The /v1/read/document endpoint runs a structured-then-template-then-OCR-then-LLM ladder, so a bank statement, contract note, or tax file returns clean JSON with per-field confidence and provenance. You send a base64 file with its content type. You get back parsed fields and the path each value came from. For KYC files, /v1/read/kyc-ocr extracts the fields from ID and utility documents and /v1/read/forgery scores an image for tampering.

APIs
3 you can call
Consent
Bound to every read
Audit
Every call in a hash-chained log

APIs in Document AI

Every API shares the same key, error format and audit log. Each one is switched on for your account separately.

  • Read document → JSON

    Any financial file/email → structured JSON via the structured→template→OCR→LLM ladder, with per-field confidence + provenance.

    POST /v1/read/documentReference
  • KYC document OCR

    Extracts the fields from ID and utility documents. Send one or two images as public https URLs or base64.

    POST /v1/read/kyc-ocrReference
  • Document forgery check

    Scores one or two document images (public https URLs) for tampering. threshold (0-100, default 20) sets the sensitivity; text_fields lets you check printed values.

    POST /v1/read/forgeryReference

What teams use it for

Use cases for each Document AI check. See how they combine with other products on the use cases page.

  • Reads the fields from ID and utility documents into structured data.

    • Fill sign-up forms from a photo of the customer’s ID.
    • Cut manual data entry in branch and assisted onboarding.
    • Read uploaded documents so the matching checks can run automatically.
  • Scores document images for signs of tampering.

    • Flag edited ID and address documents before approval.
    • Review loan and insurance claim documents for tampering.
    • Send only suspicious documents to manual review.

How you get Document AI

From a new account to a live call in four steps.

  1. Create your account

    Sign up with your work email and create an app and its key. No API is active on a new account.

  2. Pay and subscribe

    Add money to your wallet, then subscribe to this API in Dashboard → API access. We switch it on for your account after your payment.

  3. Make your first call

    Once the API is activated, send the sample request to /v1/read/document with your key and read back the JSON.

  4. Go live

    Use a live key in production. Every call is checked against the APIs activated for you, drawn from your prepaid wallet, and recorded in a hash-chained audit trail.

Call read document → json

The main call for this product. Use your own key once this API is switched on for your account.

POST /v1/read/document
curl -X POST https://grappi.ai/v1/read/document \
-H "Authorization: Bearer $GRAPPI_API_KEY" \
-H "content-type: application/json" \
-d '{"filename":"statement.csv","content_type":"text/csv","content_base64":"RGF0ZSxOYXJyYXRpb24sV2l0aGRyYXdhbCxEZXBvc2l0LENsb3NpbmcgQmFsYW5jZQowMS8wNC8yMDI0LE9wZW5pbmcsLCwxMDAwMC4wMAowMi8wNC8yMDI0LFVQSSBQYXltZW50LDE1MDAuMDAsLDg1MDAuMDAKMDMvMDQvMjAyNCxTYWxhcnkgQ3JlZGl0LCw1MDAwMC4wMCw1ODUwMC4wMAo="}'

Developer ready

Docs, MCP, and a prompt that does the work

Every product ships with an integration guide, an MCP server for AI agents, and a ready-to-paste prompt, so your first Document AI call takes minutes, not days.

Integration guide

The quickstart covers keys, auth, idempotency, the error envelope, and paise money units. The catalog documents every Document AI endpoint with a live sample you can run from the playground.

MCP server for AI agents

grappi-mcp exposes the API as agent tools over the same gateway, so every tool call keeps auth, consent, metering, and audit. Drop this into your MCP client config.

mcp.json
{
  "mcpServers": {
    "grappi": {
      "command": "npx",
      "args": ["grappi-mcp"],
      "env": {
        "GRAPPI_API_BASE": "https://grappi.ai",
        "GRAPPI_API_KEY": "your-api-key"
      }
    }
  }
}

Prompt-ready integration

Paste this into your coding assistant or agent. It carries the real contract rules, so the generated client matches the gateway on the first try.

integrate-document-ai.prompt
Integrate the Grappi Document AI API into my app.

Endpoints:
- POST /v1/read/document (Read document → JSON)
- POST /v1/read/kyc-ocr (KYC document OCR)
- POST /v1/read/forgery (Document forgery check)

Contract rules: send the key as a Bearer token in the Authorization header, treat all money as integer paise (100 paise is one rupee), send an Idempotency-Key on every POST, and branch on the error envelope error.code (handle 402 insufficient_balance, 403 api_not_activated, 403 consent_required, 422 validation_failed, 429 rate_limited, 503 api_unavailable).

Write a small typed client for these endpoints plus one worked call, with validation and error handling, in my project's language.

Questions

How do I start?

Create an account and add money to your wallet. Then subscribe to this API in your dashboard and we switch it on for your account.

What comes with every API?

Auth, idempotency, consent and metering hooks, a unified error envelope, and a hash-chained audit trail, identical across every API on the platform.

What do I need to go live?

Subscribe to the API in your dashboard and we switch it on for your account after your payment. The request and reply format is the same in test and in production.

Is this compliant for regulated use?

Reads are consent-bound and DPDP and RBI-AA aligned. Every call lands in a hash-chained audit trail, and every API is switched on for your account individually.