Skip to main content

Overview

Aifano uses a credit-based billing system. Credits are consumed per page processed, with different rates depending on the operation. Free operations like file uploads and job status checks cost zero credits.

Credit Pricing

OperationCredits per PageDescription
Parse1Document parsing into structured JSON
Extract2Structured data extraction with schema
Split1Document splitting into sections
Edit1Document editing and form filling
Pipeline2Pipeline execution (varies by processors)
Upload0File upload to Aifano storage
Job Status0Checking async job status
Cancel Job0Cancelling a running job
Credits are calculated based on the number of pages in the document. A 10-page PDF processed with /extract costs 20 credits (10 pages × 2 credits).

How Credits Are Calculated

Credits are charged after processing completes. The formula is:
credits = num_pages × credits_per_page
For example:
  • Parsing a 5-page PDF: 5 × 1 = 5 credits
  • Extracting from a 10-page PDF: 10 × 2 = 20 credits
  • Splitting a 25-page document: 25 × 1 = 25 credits

Usage in Responses

Every API response includes a usage object showing credits consumed:
{
  "job_id": "job_abc123",
  "duration": 2.34,
  "usage": {
    "num_pages": 5,
    "credits": 5
  },
  "result": { ... }
}

Monthly Credit Limits

Each organization has a monthly credit limit. When the limit is reached, API requests return a 429 error:
{
  "error": "Credit limit reached. You have used 1000 of 1000 credits this month. Please upgrade your plan or wait until next month.",
  "code": "CREDIT_LIMIT_EXCEEDED",
  "credits_used": 1000,
  "credit_limit": 1000
}

Monitoring Usage

Via Studio

Track your credit usage in real-time through the Aifano Studio:
  1. Navigate to Credits in the sidebar
  2. View your current usage, remaining credits, and usage history
  3. See a breakdown by operation type and endpoint

Via API Response Headers

Each API response includes usage information in the response body. Track the usage.credits field to monitor consumption programmatically.

Tips to Optimize Credit Usage

If you’ve already parsed a document and want to extract different data, use jobid://job_id as input. This skips the parsing step and saves credits.
Async endpoints don’t cost more credits, but they prevent timeouts on large documents — ensuring you don’t waste credits on failed requests.
Use pipelines to combine parse + extract in a single call. This is more efficient than calling each endpoint separately.
Before processing large batches, test your configuration with a single small document to verify the output matches your expectations.

Failed Requests

Credits are not charged for failed requests. If a request returns an error (4xx or 5xx status code), no credits are deducted from your account.