Skip to main content

Add your description here

Project description

Regia AI SDK

A lightweight Python SDK to interact with the Regia Vision Extractor API.
Send PDF documents and automatically extract structured data using Pydantic schemas.


📦 Installation

Using pip:

pip install regia-ai-sdk

or uv use the command line:

uv add regia-ai-sdk

🚀 Quickstart

from regia_ai_sdk.vision import VisionClient
from pydantic import BaseModel, Field
import os

class InvoiceModel(BaseModel):
  due_date: str = Field(..., description="The due date of the invoice")
  total_amount: float = Field(..., description="The total amount of the invoice")

token = os.getenv("API_TOKEN")

client = VisionClient(token=token)

result = client.extract("./data/sample.pdf", InvoiceModel)
print(result)

📂 Other Input Methods

From bytes

with open("./data/sample.pdf", "rb") as f:
  content_bytes = f.read()

result = client.extract(content_bytes, InvoiceModel, filename="sample_bytes.pdf")
print(result)

From base64

import base64

with open("./data/sample.pdf", "rb") as f:
  base64_string = base64.b64encode(f.read()).decode("utf-8")

result = client.extract(base64_string, InvoiceModel, filename="sample_base64.pdf")
print(result)

🧠 Features

  • ✅ Simple interface for sending documents to the Regia Vision API
  • ✅ Supports file path, bytes, and base64 inputs
  • ✅ Use Pydantic models to define the expected data
  • ✅ Automatically converts Pydantic to schema JSON

🔐 Authentication

You must provide an API token and base URL:

export API_TOKEN=your_api_token_here

Made with 💡 by Regia.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

regia_ai_sdk-0.7.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

regia_ai_sdk-0.7.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file regia_ai_sdk-0.7.1.tar.gz.

File metadata

  • Download URL: regia_ai_sdk-0.7.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for regia_ai_sdk-0.7.1.tar.gz
Algorithm Hash digest
SHA256 ae54bff81e20ba46484973036cf80427f4c3d7749ff59cdb1e2546b17284c23f
MD5 8c16f906830d365a95f84dc36a4fbb5e
BLAKE2b-256 eb7c5b4692f6731af5a248a6d0e222c2444feac708bbd22777510ab30f41100b

See more details on using hashes here.

File details

Details for the file regia_ai_sdk-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: regia_ai_sdk-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for regia_ai_sdk-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e118d442f94559ab1ce84bf226e0e67f42e7ae164ef2b79ffb85fd22ac4cb33
MD5 01b7e8003044f76226585e45459db021
BLAKE2b-256 ee6f2a4c47d85a4db53e0d11ed68e7a3f2fa1983bcc09e02326d8d985bc3574d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page