API Documentation

Complete guide to integrating FinanceAI's document processing API

Getting Started

Base URL

http://149.102.159.66:8000/v1

Quick Start

  1. Sign up for a free account
  2. Get your API key from the dashboard
  3. Make your first API call
  4. Process your documents!

🚀 Get Started

Ready to start processing documents? Create your free account to get instant access to the API.

Complete API Reference

NEW

Explore our comprehensive API documentation with detailed examples for every endpoint:

cURL Examples

Copy-paste ready commands

Postman Guide

Step-by-step instructions

Request/Response

Input/output examples

View Full API Reference

Authentication

All API requests require authentication using your API key in the Authorization header.

Example Request

curl -X POST http://149.102.159.66:8000/v1/documents/scan -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F "file=@document.pdf"

API Endpoints

Our API provides comprehensive endpoints for document processing, voice tools, and user management. View the complete reference with cURL commands and Postman examples.

📄 Document Scanning

  • • Single & Bulk Upload
  • • Bank Statement Processing
  • • Request Status Polling

🎙️ Voice Tools

  • • Text to Speech (TTS)
  • • Speech to Text (STT)
  • • Multiple Language Support

📊 History & Analytics

  • • Document Processing History
  • • Voice Processing History
  • • Summary Statistics

🔐 Authentication

  • • JWT Bearer Tokens
  • • API Key Authentication
  • • User Registration & Login

👤 User Management

  • • Profile Management
  • • API Key Access
  • • Session Management
View Complete API Reference

Code Examples

JavaScript/Node.js

const FormData = require('form-data'); const fs = require('fs'); const axios = require('axios'); const form = new FormData(); form.append('file', fs.createReadStream('bank_statement.pdf')); form.append('type', 'bank_statement'); const response = await axios.post( 'http://149.102.159.66:8000/v1/documents/scan', form, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', ...form.getHeaders() } } ); console.log(response.data);

Python

import requests url = "http://149.102.159.66:8000/v1/documents/scan" headers = {"Authorization": "Bearer YOUR_API_KEY"} with open("receipt.pdf", "rb") as f: files = {"file": f} data = {"type": "receipt"} response = requests.post(url, headers=headers, files=files, data=data) result = response.json() print(result)

Rate Limits & Pricing

Free Tier

100

documents per month

5 requests/minute

Pro

5,000

documents per month

50 requests/minute

Enterprise

Unlimited

Custom pricing

Custom rate limits

Error Handling

HTTP Status Codes

200Success
400Bad Request
401Unauthorized
429Rate Limited
500Server Error

Error Response Format

{ "error": { "code": "invalid_file_type", "message": "File type not supported. Please upload PDF, PNG, JPG, or JFIF files.", "details": { "supported_types": ["pdf", "png", "jpg", "jpeg", "jfif"] } } }

Webhooks

Configure webhooks to receive real-time notifications when document processing is complete.

Webhook Events

document.processedDocument processing completed
document.failedDocument processing failed
batch.completedBatch processing completed

Webhook Payload Example

{ "event": "document.processed", "timestamp": "2025-10-19T14:30:00Z", "data": { "document_id": "doc_abc123", "type": "invoice", "status": "completed", "extracted_data": { "supplier_name": "ABC Supplies Inc.", "invoice_number": "INV-2024-001", "total_amount": 1250.00, "currency": "USD", "invoice_date": "2024-10-15" } } }

SDK Libraries

Use our official SDKs for faster integration in your preferred programming language.

Python SDK

Official Python client for FinanceAI

pip install financeai-python
View Documentation →

Node.js SDK

Official Node.js client for FinanceAI

npm install @financeai/node
View Documentation →

Ruby SDK

Official Ruby client for FinanceAI

gem install financeai
View Documentation →

PHP SDK

Official PHP client for FinanceAI

composer require financeai/php
View Documentation →

Best Practices

Document Quality

For best results, upload documents with resolution of at least 300 DPI. Ensure text is clearly visible and not obscured by shadows or glare. PDFs are preferred over image formats when available.

Error Handling

Always implement retry logic with exponential backoff for failed requests. Check the confidence scores of extracted data and implement a review process for low-confidence results.

Rate Limiting

Monitor your rate limit headers and implement queuing for batch processing. Consider upgrading your plan if you frequently hit rate limits during peak usage.

Security

Never expose your API keys in client-side code or public repositories. Rotate keys regularly and use environment variables to store sensitive credentials.

Data Retention

Documents are automatically deleted after 30 days. Download and store extracted data in your own systems if you need long-term access. Use the retention settings to adjust storage duration.

Ready to Get Started?

Sign up for your free API key and start processing documents today.

Get Your API Key