Type Reference
All response models are Pydantic v2 BaseModel classes. As of touai 0.153.0, every service's models are re-exported from touai.types — one import location for all nine services:
from touai.types import KnowledgeBase, Collection, ScrapeResult, CreditBalanceTwo names exist in more than one service. The top-level binding keeps the historical winner; the shadowed model stays importable from its submodule:
QueryResult resolves to the connectors passthrough-query result — the pgvector similarity-search result is touai.types.pgvector.QueryResult.
MultipartPartUrl resolves to the unstructured part-upload URL — the object storage variant is touai.types.object_storage.MultipartPartUrl.
Connectors Types
| Type | Key Fields |
|---|---|
ConnectorType | name, short_name, auth_methods, capabilities |
Connection | connection_id, id, name, connector_type, status |
ConnectionDetail | inherits Connection plus credentials_summary |
ConnectionList | items, total, active_count, page |
ConnectionTestResult | success, message, latency_ms |
SchemaDiscovery | connection_id, connector_type, discovered_schema |
QueryResult | success, data, columns, row_count — top-level binding of the collision |
SyncConfig | connection_id, enabled, strategy, interval_minutes |
SyncStatus | connection_id, sync_enabled, is_ready, total_entities, total_chunks |
GlobalSearchResults | results, total, structured, layers_executed, retrieval_strategy |
GlobalSearchHit | layer, kind, score, citation, chunk, entity |
Unstructured Types
| Type | Key Fields |
|---|---|
Job | job_id, status, progress, result, chunks |
BatchJob | batch_id, status, total, completed, failed, jobs |
UnstructuredFile | file_id, filename, file_type, status, progress — also the return type of files.process(...) and files.import_from_storage(...) |
UnstructuredFileDetail | inherits UnstructuredFile plus result, metadata |
SupportedFormats | categories |
VideoSearchResults | query, results, total |
VideoChatResponse | message, telemetry — non-streaming video.chat(...) |
DocumentChatResponse | message, telemetry — non-streaming documents.chat(...) |
EmbeddingStats | total_embeddings, total_videos, per_video |
EmbeddingCoverage | total_videos, embedded_videos, missing_videos |
MultipartInitResponse | file_id, upload_id, storage_path, upload_token, parts — returned by files.upload_multipart_init(...) |
MultipartPartUrl | part_number, upload_url — top-level binding of the collision |
MultipartCompletedPart | part_number, etag — echoed back to files.upload_multipart_complete(...) |
Deep Research Types
| Type | Key Fields |
|---|---|
ResearchResult | content, mode, citations, sources, tool_calls_count, usage |
ResearchEvent | type, data |
ResearchJob | job_id, status, result, error_code, enabled_tools — research_result() returns the typed result |
ResearchTool | tool_id, name, description, credits_per_use |
Citation | url, title, source_type |
Web Access Types
| Type | Key Fields |
|---|---|
ScrapeResult | success, url, markdown, html, links, media, metadata |
WebSearchResult | success, query, results, total_results |
CrawlTask | success, task_id |
CrawlStatus | success, status, data, pages, error |
Object Storage Types
| Type | Key Fields |
|---|---|
StorageInfo | projects, active_project_id, storage_usage, buckets |
StoredObject | key, bucket, project, size, url |
StoredFile | key, size, content_type, created_by, project_id |
FileInfo | key, size, content_type, last_modified, storage_class |
Bucket | id, name, platform_project_id, is_default, managed_by |
ObjectInfo | key, size, content_type, etag, created_by |
ObjectList | objects, total, prefixes, folders, is_truncated, next_continuation_token |
FolderInfo | prefix, created_by, created_at |
SignedUrl | url, method, expires_in — returned by upload_signed_url(...) |
MultipartInitiate | key, upload_id, bucket, project — returned by multipart_initiate(...) |
MultipartPartUrl | upload_id, part_number, url, expires_in — import from touai.types.object_storage |
MultipartCompleteResult | key, bucket, project, size, etag — returned by multipart_complete(...) |
Knowledge Base Types
| Type | Key Fields |
|---|---|
KnowledgeBase | id, name, description, rag_config |
KnowledgeBaseList | knowledge_bases, total, page, page_size |
KBDocument | id, kb_id, title, mime, size_bytes, index_state |
KBDocumentList | documents, total, page, page_size |
KBDocumentDownloadUrl | url, expires_in |
KBSearchResult | hits |
KBSearchHit | score, chunk, citation, kbdoc_id, title |
pgvector Types
| Type | Key Fields |
|---|---|
Collection | id, name, dimension, metric, vector_count, managed_by |
CollectionList | collections, total, page, page_size |
CollectionStats | vector_count, dimension, metric, index |
VectorRecord | id, embedding, content, metadata |
UpsertResult | upserted |
QueryResult | results — import from touai.types.pgvector (the top-level name is the connectors model) |
QueryHit | id, score, content, metadata |
DeleteVectorsResult | deleted |
Workflows Types
| Type | Key Fields |
|---|---|
Asset | asset_id, kind, owner_service, native_id, status |
Lineage | asset_id, direction, depth, nodes, edges |
WorkflowRun | run_id, status, steps, error_code |
WorkflowStep | step_id, seq, service, action, status |
RunUsage | run_id, credits_consumed, transaction_count, services |
Billing Types
| Type | Key Fields |
|---|---|
CreditBalance | organization_id, balance, total_purchased, total_consumed, held_credits |
CreditOverview | balance, recent_transactions, buckets, org_kind, account_state, capabilities, shared_overage, product_access |
EnterpriseGroup | org_kind, account_state, contract, group_overage, capabilities, sub_organizations, allocatable |
CreditAllocation | direction, bucket, amount, target_organization_id, reclaims_allocation_id |
CreditLot | lot_id, bucket, credits_remaining, status, expires_at |
CreditLotList | lots, total, available_credits, next_expiration |
CreditTransaction | id, type, amount, balance_after, service_type, project_id |
CreditTransactionList | transactions, total |
ProjectUsageSummary | context, organization_id, projects |
ProjectUsageEntry | project_id, credits_consumed, transaction_count |
ServiceCost | service_type, credits_per_unit, unit_name, tiers, billing_mode |
Plan | plan_id, name, price_cents, interval, credits_included |
Money fields (balance, amount, credits_*) arrive as exact decimal strings on the wire and parse to decimal.Decimal.