Skip to main content

Add your description here

Project description

Regia AI SDK

PyPI version

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 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")

base_url = os.getenv("BASE_URL")
token = os.getenv("API_TOKEN")

client = VisionClient(token=token, base_url=base_url)

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 BASE_URL=https://your-api-url.com
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.6.0.tar.gz (2.9 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.6.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: regia_ai_sdk-0.6.0.tar.gz
  • Upload date:
  • Size: 2.9 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.6.0.tar.gz
Algorithm Hash digest
SHA256 247b3776b499369fe2068ecdac0143aac6b73a18420e4196df54f64c87955d6d
MD5 4a147a335d4c76443734758cfdeb4208
BLAKE2b-256 28cc6a19003278b6e48b1ea4e8adf54a597d0135f431e081d2bdaab9fd25a747

See more details on using hashes here.

File details

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

File metadata

  • Download URL: regia_ai_sdk-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 535262078a9270ef652e109f56c9d91fa2ac31818ffaf8a7397dac7413e07fb8
MD5 09ea23ce0c68c967003298abb347b06f
BLAKE2b-256 225e661c82f9035cf24143312c2f156b37eb15be9399b463396afc211fa43518

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