Documentation Index
Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install
fetch required). Works in Node.js, Deno, Bun, and edge runtimes.
Initialize
path=null start=null
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your theo_sk_... API key |
baseUrl | string | "https://www.hitheo.ai" | API base URL (www host — see note below) |
timeoutMs | number | 30000 | Request timeout in ms |
maxRetries | number | 2 | Retries on 429/5xx (exponential backoff) |
What’s Included
The SDK exports:| Export | Type | Description |
|---|---|---|
Theo | class | Main client with all API methods |
TheoStream | class | Returned by theo.stream() — async-iterable with cancel() and final metadata |
EviInstance | class | E.V.I. wrapper (created via theo.evi()) |
TheoApiError | class | Typed error with status, body, url, and parsed details |
defineSkill | function | Type-safe skill manifest builder |
defineConfig | function | Type-safe project config builder |
| All types | interfaces | CompletionRequest, CompletionResponse, StreamEvent, TheoStream, VerifyResult, ConversationSummary, SkillSummary, SdkToolDefinition, WorkflowRecord, WebhookRecord, HookRecord, UsageReport, etc. See Types for the full list. |
Upgrading to 0.2.0
If you’re upgrading from0.1.x:
- No code changes required for typical
theo.complete()/theo.stream()usage. - If you pinned
baseUrl: "https://hitheo.ai"explicitly, drop it (or switch to"https://www.hitheo.ai") to pick up the new default and avoid header-stripping redirects. theo.stream()now returns aTheoStream.for awaitstill works; you additionally gain.cancel()and post-completion metadata (conversationId,usage,requestId).CompletionResponse.usagenow includesprompt_tokens,completion_tokens,total_tokens, and an optionalcachedboolean. Existingres.usage.cost_centsusage keeps working.- List methods that used to return
Promise<unknown[]>(conversations,skills,tools,workflows,submissions, etc.) now return typed records — remove anyas anycasts. Full release notes: Changelog.
