2 min read

Credits API

Manage your API credits and monitor usage

The Credits API allows you to check your balance, view transaction history, and monitor usage statistics. Understanding your credit usage is essential for managing costs and ensuring uninterrupted document processing. These endpoints give you full visibility into your account's financial state and consumption patterns.

Overview

DocuRift uses a credit-based billing system where each document processed consumes a certain number of credits based on the document type and page count. This pay-as-you-go model means you only pay for what you use, with no monthly minimums or long-term commitments required.

  • Each document processed consumes credits
  • Credit cost varies by document type and page count
  • Free credits are provided upon signup
  • Additional credits can be purchased

Credit Costs

| Document Type | Credits per Page | |---------------|------------------| | Generic | 1 | | Invoice | 2 | | Bill of Lading | 3 | | Customs Declaration | 3 | | Others | 2 |

Available Endpoints

Balance Types

Your balance includes:

  • Free Credits: One-time signup bonus
  • Purchased Credits: Credits you've bought
  • Total Balance: Combined available credits

Low Balance Alerts

Set up webhooks to receive notifications when your balance is low:

{
  "event": "credits.low_balance",
  "data": {
    "balance": 10,
    "threshold": 50
  }
}

Best Practices

  1. Monitor Usage: Regularly check your usage stats to plan capacity
  2. Set Alerts: Configure low balance webhooks to avoid service interruption
  3. Batch Processing: Process documents in batches to optimize credit usage
  4. Choose Document Types: Use specific document types for better extraction accuracy