LeapOCRLeapOCR Docs

Frequently Asked Questions

Common questions about LeapOCR

Frequently Asked Questions

Quick answers to common questions about LeapOCR.

General

What file formats does LeapOCR support?

LeapOCR supports PDF files:

  • PDF (single and multi-page)

What's the maximum file size?

The maximum file size is 50MB per document. For larger documents, consider splitting them into smaller files or contact support for enterprise options.

How many pages can a document have?

There's no hard limit on page count, but processing time and credit usage scale with the number of pages. Each page consumes credits based on the model used.

What languages are supported?

All models support multiple languages. However, english-pro-v1 is optimized specifically for English documents and may not perform well with other languages.

Pricing & Credits

How does credit pricing work?

Credits are consumed per page based on the model:

  • Standard v1: 1 credit per page
  • English Pro v1: 2 credits per page
  • Pro v1: 3 credits per page

What happens if I run out of credits?

Processing jobs will fail with a 403 Insufficient Credits error. You can purchase additional credits through your dashboard.

Do failed jobs consume credits?

No. Credits are only consumed when a job completes successfully. Failed jobs do not deduct credits from your account.

Can I get a refund for incorrectly processed documents?

Contact support through your dashboard with the job ID and details of the issue. We review requests on a case-by-case basis.

Processing

How long does processing take?

Processing time depends on:

  • Document size and complexity
  • Number of pages
  • Current queue load

Can I process documents faster?

Yes, several options:

  1. Process multiple documents in parallel
  2. Contact sales for dedicated processing capacity (Enterprise plans)

What happens if processing fails?

The SDK automatically retries transient failures. If a job ultimately fails:

  1. Check the error message in the response
  2. Verify the document is readable and not corrupted
  3. Ensure the schema/instructions are valid
  4. Contact support if the issue persists

Can I cancel a running job?

Jobs cannot be cancelled once submitted. If you no longer need the result, simply don't retrieve it. The job will complete but you can ignore the output.

API & SDKs

Which SDK should I use?

Choose based on your application:

  • JavaScript/TypeScript: Node.js, Next.js, browser apps
  • Python: Django, FastAPI, data science workflows
  • Go: High-performance backends, microservices
  • REST API: Any language, maximum flexibility

Do I need to handle retries manually?

No. All SDKs include automatic retry logic for transient failures (network errors, rate limits, etc.). You can customize retry behavior in the SDK configuration.

Can I contribute to the SDKs?

Yes! All SDKs are open source. Check the GitHub repositories:

Schemas & Extraction

What's the difference between schema and instructions?

  • Schema: Structured JSON Schema defining exact fields and types
  • Instructions: Natural language description of what to extract

Use schemas for precise, repeatable extraction. Use instructions for ad-hoc, exploratory processing.

Can I use both schema and instructions?

No. Only one of schema, instructions, or template_slug can be used per request.

How complex can schemas be?

Schemas can include:

  • Nested objects (up to 10 levels deep)
  • Arrays of objects
  • Mixed types
  • Optional and required fields

Very complex schemas may increase processing time.

What if the document doesn't match my schema?

LeapOCR will do its best to extract matching data. Fields that cannot be found will be null or omitted. Always validate the output structure.

Can I extract tables?

Yes. Use array schemas to extract tabular data:

{
  "table_data": {
    "type": "array",
    "items": {
      "type": "object",
      "properties": {
        "column1": { "type": "string" },
        "column2": { "type": "number" }
      }
    }
  }
}

Rate Limits

What are the rate limits?

Rate limits vary by plan:

  • Free: 10 requests/minute
  • Pro: 100 requests/minute
  • Enterprise: Custom limits

What happens if I hit the rate limit?

You'll receive a 429 Too Many Requests error. The SDKs automatically retry with exponential backoff. Rate limit information is included in response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1640000000

Can I request higher rate limits?

Yes. Contact sales for custom rate limits on Enterprise plans.

Troubleshooting

I'm getting authentication errors

Verify:

  1. API key is correct and not expired
  2. API key is properly passed to the SDK or in the header
  3. No extra whitespace or quotes around the key
  4. The key is active in your dashboard

Processing is slower than expected

Possible causes:

  1. Document is very large or complex
  2. Network latency issues
  3. Queue backlog

Try processing multiple documents in parallel.

The extracted data is inaccurate

Improve accuracy by:

  1. Using a higher-quality model (pro-v1 or english-pro-v1)
  2. Providing more detailed schema descriptions
  3. Ensuring the document is high-quality (good scan/photo)
  4. Adding specific instructions for ambiguous fields

I'm getting timeout errors

For large documents:

  1. Increase the timeout in SDK configuration
  2. Poll job status manually instead of using waitUntilDone
  3. Process documents in smaller batches

Still Have Questions?