TouAI Python SDK
Use one Python client to work with Connectors, Unstructured, Deep Research, Web Access, Object Storage, Knowledge Base, pgvector, Workflows, and Billing.
TouAI Python SDK is the official Python client for the TouAI platform. It gives application developers, agents, and backend services a single entry point for the platform's data, research, storage, and billing APIs.
Package: touai · Python: >= 3.10 · Auth: project API key (created in the web console)
Why this SDK
- One client for the full TouAI platform
- First-class Python examples for synchronous and streaming workflows
- Built-in retry handling for transient failures
- Typed response models powered by Pydantic v2
Service Map
Context Layer
Connectors: link external data sources, configure sync, and run RAG search through one client.
Multimodal Perception
Unstructured: process documents and videos, manage files, and enable semantic retrieval.
Deep Research
Run blocking or streaming research workflows with tool-aware orchestration.
Web Access
Scrape pages, run web search, and launch deep crawls with auto-polling helpers.
Memory
Object Storage, Knowledge Base, and pgvector: files, indexed documents, and vector search.
Billing and Platform
Read credit balances, usage, and the plan catalog. Purchases live in the web console.
Installation at a Glance
pip install touaifrom touai import TouAI
# Reads TOUAI_ACCESS_KEY_ID / TOUAI_SECRET_KEY from the environment
with TouAI() as client:
results = client.connectors.search("quarterly revenue")
print(results.total_results)Client Surface
The SDK exposes the nine platform services as namespaced properties on the TouAI client:
| Property | Service | Description |
|---|---|---|
client.connectors | Connectors | 50+ data connectors, sync, RAG search |
client.unstructured | Unstructured | Document and video processing, file management |
client.deep_research | Deep Research | research() / research_stream() workflows with SSE |
client.web_access | Web Access | Web scraping, search, deep crawl |
client.object_storage | Object Storage | Buckets and objects with project-scoped access |
client.knowledge_base | Knowledge Base | Managed document stores with hybrid search |
client.pgvector | pgvector | Managed vector collections, upsert and query |
client.workflows | Workflows | Asset registry, runs, lineage, usage |
client.billing | Billing | Read-only credits, usage, and plan catalog |
Authentication is API key only — create a project API key in the
web console and pass it as access_key_id /
secret_key (or the TOUAI_ACCESS_KEY_ID / TOUAI_SECRET_KEY
environment variables). Account, organization, project, and API-key
management — plus credit purchases and subscription changes — are web
console features and are not part of the SDK.
Recommended Reading Path
Install and authenticate
Start with installation, authentication, configuration, and client lifecycle so every example later in the docs feels familiar.
Pick a core service
Move into Connectors, Unstructured, Deep Research, Web Access, or Object Storage based on the workflow you are building.
Finish with platform reference
Use the Billing, Error Handling, and Type Reference pages as reference material while integrating.