Ninjadoc AI API - Getting Started Guide

Welcome to the Ninjadoc AI API! This guide will help you get up and running with our document processing platform that extracts structured data from documents using AI-powered extraction.

What is Ninjadoc AI?

Ninjadoc AI is a document processing platform that offers:

  • Visual Schema Builder: Define extraction rules visually without coding

  • Zero Training: Works out-of-the-box without model training

  • Developer-First API: Clean REST API with structured JSON responses

  • Layout-Aware: Handles document variations without rigid templates

  • Coordinate Extraction: Returns bounding box coordinates for all extracted fields

Quick Start

1. Get Your API Key

First, you'll need an API key from your Ninjadoc AI dashboard. Your API key will look like: nj_your_api_key_here

2. Authentication

Include your API key in every request using one of these

# Using X-API-Key header
curl -H "X-API-Key: nj_your_api_key_here" \
https://ninjadoc.ai/api/extract

Note: The /api/billing/balance endpoint uses session-based authentication and is not available via API key.

3. Credit Requirements

You need a minimum of 10 credits to start a processing job. If you don't have enough credits, the API will return a 402 error:

{
    "error": "Insufficient credits. A minimum of 10 credits is required to start a job.",
    "code": 402
}

Note: Credit balance checking is available through the web dashboard, not via API key authentication.

Next Steps

  1. Create Processors: Use the visual schema builder to create processors for your document types

  2. Test Different Documents: Try various document layouts to see how the AI adapts

  3. Integrate Webhooks: Set up webhook endpoints for production workflows

  4. Monitor Usage: Track your credit usage and processing success rates

Ready to start processing documents? Use the interactive API explorer in Scalar to test endpoints with your actual API key and documents!