Skip to main content

Install

Requirements: Node.js 18+ (native fetch required). Works in Node.js, Deno, Bun, and edge runtimes.

Initialize

Configuration

Always target the www host. The apex https://hitheo.ai 307-redirects to https://www.hitheo.ai, and most HTTP clients (including Node 18’s built-in fetch) strip the Authorization header on 3xx responses — the redirected request arrives unauthenticated and returns 401. The SDK defaults to https://www.hitheo.ai as of @hitheo/sdk@0.2.0. See 401 Troubleshooting if you override baseUrl.

What’s Included

The SDK exports:

Upgrading to 0.2.0

If you’re upgrading from 0.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 a TheoStream. for await still works; you additionally gain .cancel() and post-completion metadata (conversationId, usage, requestId).
  • CompletionResponse.usage now includes prompt_tokens, completion_tokens, total_tokens, and an optional cached boolean. Existing res.usage.cost_cents usage keeps working.
  • List methods that used to return Promise<unknown[]> (conversations, skills, tools, workflows, submissions, etc.) now return typed records — remove any as any casts. Full release notes: Changelog.