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, CreditBalance

Two 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

TypeKey Fields
ConnectorTypename, short_name, auth_methods, capabilities
Connectionconnection_id, id, name, connector_type, status
ConnectionDetailinherits Connection plus credentials_summary
ConnectionListitems, total, active_count, page
ConnectionTestResultsuccess, message, latency_ms
SchemaDiscoveryconnection_id, connector_type, discovered_schema
QueryResultsuccess, data, columns, row_count — top-level binding of the collision
SyncConfigconnection_id, enabled, strategy, interval_minutes
SyncStatusconnection_id, sync_enabled, is_ready, total_entities, total_chunks
GlobalSearchResultsresults, total, structured, layers_executed, retrieval_strategy
GlobalSearchHitlayer, kind, score, citation, chunk, entity

Unstructured Types

TypeKey Fields
Jobjob_id, status, progress, result, chunks
BatchJobbatch_id, status, total, completed, failed, jobs
UnstructuredFilefile_id, filename, file_type, status, progress — also the return type of files.process(...) and files.import_from_storage(...)
UnstructuredFileDetailinherits UnstructuredFile plus result, metadata
SupportedFormatscategories
VideoSearchResultsquery, results, total
VideoChatResponsemessage, telemetry — non-streaming video.chat(...)
DocumentChatResponsemessage, telemetry — non-streaming documents.chat(...)
EmbeddingStatstotal_embeddings, total_videos, per_video
EmbeddingCoveragetotal_videos, embedded_videos, missing_videos
MultipartInitResponsefile_id, upload_id, storage_path, upload_token, parts — returned by files.upload_multipart_init(...)
MultipartPartUrlpart_number, upload_url — top-level binding of the collision
MultipartCompletedPartpart_number, etag — echoed back to files.upload_multipart_complete(...)

Deep Research Types

TypeKey Fields
ResearchResultcontent, mode, citations, sources, tool_calls_count, usage
ResearchEventtype, data
ResearchJobjob_id, status, result, error_code, enabled_toolsresearch_result() returns the typed result
ResearchTooltool_id, name, description, credits_per_use
Citationurl, title, source_type

Web Access Types

TypeKey Fields
ScrapeResultsuccess, url, markdown, html, links, media, metadata
WebSearchResultsuccess, query, results, total_results
CrawlTasksuccess, task_id
CrawlStatussuccess, status, data, pages, error

Object Storage Types

TypeKey Fields
StorageInfoprojects, active_project_id, storage_usage, buckets
StoredObjectkey, bucket, project, size, url
StoredFilekey, size, content_type, created_by, project_id
FileInfokey, size, content_type, last_modified, storage_class
Bucketid, name, platform_project_id, is_default, managed_by
ObjectInfokey, size, content_type, etag, created_by
ObjectListobjects, total, prefixes, folders, is_truncated, next_continuation_token
FolderInfoprefix, created_by, created_at
SignedUrlurl, method, expires_in — returned by upload_signed_url(...)
MultipartInitiatekey, upload_id, bucket, project — returned by multipart_initiate(...)
MultipartPartUrlupload_id, part_number, url, expires_in — import from touai.types.object_storage
MultipartCompleteResultkey, bucket, project, size, etag — returned by multipart_complete(...)

Knowledge Base Types

TypeKey Fields
KnowledgeBaseid, name, description, rag_config
KnowledgeBaseListknowledge_bases, total, page, page_size
KBDocumentid, kb_id, title, mime, size_bytes, index_state
KBDocumentListdocuments, total, page, page_size
KBDocumentDownloadUrlurl, expires_in
KBSearchResulthits
KBSearchHitscore, chunk, citation, kbdoc_id, title

pgvector Types

TypeKey Fields
Collectionid, name, dimension, metric, vector_count, managed_by
CollectionListcollections, total, page, page_size
CollectionStatsvector_count, dimension, metric, index
VectorRecordid, embedding, content, metadata
UpsertResultupserted
QueryResultresults — import from touai.types.pgvector (the top-level name is the connectors model)
QueryHitid, score, content, metadata
DeleteVectorsResultdeleted

Workflows Types

TypeKey Fields
Assetasset_id, kind, owner_service, native_id, status
Lineageasset_id, direction, depth, nodes, edges
WorkflowRunrun_id, status, steps, error_code
WorkflowStepstep_id, seq, service, action, status
RunUsagerun_id, credits_consumed, transaction_count, services

Billing Types

TypeKey Fields
CreditBalanceorganization_id, balance, total_purchased, total_consumed, held_credits
CreditOverviewbalance, recent_transactions, buckets, org_kind, account_state, capabilities, shared_overage, product_access
EnterpriseGrouporg_kind, account_state, contract, group_overage, capabilities, sub_organizations, allocatable
CreditAllocationdirection, bucket, amount, target_organization_id, reclaims_allocation_id
CreditLotlot_id, bucket, credits_remaining, status, expires_at
CreditLotListlots, total, available_credits, next_expiration
CreditTransactionid, type, amount, balance_after, service_type, project_id
CreditTransactionListtransactions, total
ProjectUsageSummarycontext, organization_id, projects
ProjectUsageEntryproject_id, credits_consumed, transaction_count
ServiceCostservice_type, credits_per_unit, unit_name, tiers, billing_mode
Planplan_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.

Error HandlingComplete Examples