> ## 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.

# TypeScript Types Reference

> All exported types from @hitheo/sdk.

## Core Types

```typescript theme={null}
type ChatMode =
  | "auto" | "fast" | "think" | "image" | "video"
  | "code" | "research" | "roast" | "genui"
  | "data_extraction";

type PersonaInput = "theo" | "none" | { system_prompt: string };

type CompletionAttachment =
  | { type: "image_url"; url: string }
  | { type: "image_base64"; data: string; mime_type: "image/png" | "image/jpeg" | "image/webp" | "image/gif" };

type TheoImageEngine =
  | "auto" | "theo-1-create" | "theo-1-photo" | "theo-1-rapid"
  | "theo-1-design" | "theo-1-studio" | "theo-1-type";

type TheoImageQuality = "draft" | "standard" | "hd";
type TheoStealthAspect = "square" | "portrait" | "landscape" | "wide";
type TheoStealthDuration = "5s" | "6s" | "10s";
```

<Note>
  Additional domain-specific modes are available for specialized use cases. Contact us or check the API for the full list.
</Note>

## Completion Request / Response Types

| Type                                              | Used By                                   | Description                                                                                                                                |
| ------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `CompletionRequest`                               | `theo.complete()`, `theo.stream()`        | Request body — supports `conversation`, `personality_config`, `response_style`, `theo_branding`, `brand_soul`, `attachments`, stealth pins |
| `CompletionResponse`                              | `theo.complete()`                         | Response — includes `request_id`, `conversation_id`, full `usage`                                                                          |
| `CompletionUsage`                                 | `CompletionResponse`, `StreamDoneData`    | `{ cost_cents, prompt_tokens, completion_tokens, total_tokens, cached? }`                                                                  |
| `GenUICompletionResponse`                         | `theo.complete()` when `mode === "genui"` | Adds `genui_code` field                                                                                                                    |
| `PersonalityConfigInput`                          | `CompletionRequest.personality_config`    | Per-request trait + uncensored-mode override                                                                                               |
| `ResponseStyleInput`                              | `CompletionRequest.response_style`        | Per-request format/preciseness/intent override                                                                                             |
| `InlineConversation`, `InlineConversationMessage` | `CompletionRequest.conversation`          | Inline history envelope for stateless callers                                                                                              |

## Streaming Types

| Type               | Description                                                                                                                                   |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `TheoStream`       | Class returned by `theo.stream()` — async-iterable with `cancel()`, `conversationId`, `usage`, `model`, `requestId`, `content`, `isCancelled` |
| `StreamEvent`      | Discriminated union over `meta \| token \| tool \| artifact \| genui_meta \| skills \| done \| error`                                         |
| `StreamMetaData`   | Payload of the `meta` event                                                                                                                   |
| `StreamTokenData`  | `{ token: string }`                                                                                                                           |
| `StreamToolData`   | `{ name, status, description? }`                                                                                                              |
| `StreamSkillsData` | `{ active: [...] }`                                                                                                                           |
| `StreamDoneData`   | Payload of the `done` event (full content + usage + ids)                                                                                      |
| `StreamErrorData`  | Payload of the `error` event — matches the REST error envelope                                                                                |
| `GenUIMetaEvent`   | Payload of the `genui_meta` event                                                                                                             |

## Diagnostic Types

| Type           | Used By         | Description                                                                            |
| -------------- | --------------- | -------------------------------------------------------------------------------------- |
| `VerifyResult` | `theo.verify()` | `{ healthy, authenticated, baseUrl, latencyMs, modelCount?, version?, error?, hint? }` |

## Media & Audio Types

| Type                                  | Used By                           | Description                 |
| ------------------------------------- | --------------------------------- | --------------------------- |
| `ImageRequest`, `ImageResponse`       | `theo.images()`                   | Image request/response      |
| `VideoRequest`                        | `theo.video()`                    | Video generation request    |
| `CodeRequest`, `CodeResponse`         | `theo.code()`                     | Code request/response       |
| `ResearchRequest`                     | `theo.research()`                 | Research request            |
| `DocumentRequest`, `DocumentResponse` | `theo.documents()`                | Document request/response   |
| `TtsRequest`                          | `theo.tts()`                      | TTS request                 |
| `SttResponse`                         | `theo.stt()`                      | STT response                |
| `AsyncJobResponse`                    | `theo.video()`, `theo.research()` | Async job creation response |
| `JobStatus`                           | `theo.job()`, `theo.waitForJob()` | Job polling response        |

## Resource Record Types

| Type                               | Used By                                     | Description                                                                                                               |
| ---------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `ConversationSummary`              | `theo.conversations()`                      | Compact conversation metadata                                                                                             |
| `ConversationDetail`               | `theo.conversation(id)`                     | Summary plus full message history                                                                                         |
| `ConversationMessage`              | `ConversationDetail.messages[]`             | Individual message record                                                                                                 |
| `SkillSummary`                     | `theo.skills()`, `theo.createSkill()`       | Skill listing shape                                                                                                       |
| `SdkToolDefinition`                | `theo.tools()`                              | Tool definition — `name, description, inputSchema, outputSchema?, permissionLevel, requiresApproval, skillId?, category?` |
| `WorkflowRecord`                   | `theo.workflows()`, `theo.createWorkflow()` | Workflow shape                                                                                                            |
| `WorkflowRunRecord`                | `theo.triggerWorkflow()`                    | Workflow run shape                                                                                                        |
| `SubmissionRecord`                 | `theo.submitSkill()`, `theo.submissions()`  | Skill marketplace submission                                                                                              |
| `SkillVersion`                     | `theo.skillVersions()`                      | Version-history entry                                                                                                     |
| `WebhookRecord`, `WebhookDelivery` | Webhook methods                             | Webhook endpoint + delivery attempt                                                                                       |
| `HookRecord`, `HookExecution`      | Hook methods                                | Hook + execution history                                                                                                  |
| `EventAck`                         | `theo.publishEvent()`                       | Publish acknowledgement                                                                                                   |
| `UsageReport`                      | `theo.usage()`                              | Aggregated usage totals + per-mode / per-model breakdowns                                                                 |
| `HealthResponse`                   | `theo.health()`                             | System health response                                                                                                    |
| `ModelInfo`                        | `theo.models()`                             | Model registry entry                                                                                                      |

## Browser Session Types

| Type                                             | Used By                                      | Description                     |
| ------------------------------------------------ | -------------------------------------------- | ------------------------------- |
| `BrowserRegion`                                  | `BrowserCreateRequest.region`                | Datacenter region               |
| `BrowserCreateRequest`                           | `theo.browser.create()`                      | Start-session options           |
| `BrowserSessionHandle`, `BrowserSessionSnapshot` | `theo.browser.create()` / `list()` / `get()` | Session metadata                |
| `BrowserLiveView`                                | `theo.browser.live()`                        | Live-view URL + pages + version |
| `BrowserEndResult`                               | `theo.browser.end()`                         | Duration + billed bytes         |

## Skill Authoring Types

| Type                 | Description                                                                 |
| -------------------- | --------------------------------------------------------------------------- |
| `SkillManifestInput` | Input to `defineSkill()`                                                    |
| `SkillManifest`      | Validated output of `defineSkill()`                                         |
| `SkillCategory`      | `"productivity"`, `"domain"`, `"integration"`, `"automation"`, `"creative"` |
| `SkillPermission`    | `"read:conversations"`, `"read:artifacts"`, `"write:artifacts"`, etc.       |
| `SkillTriggerType`   | `"manual"`, `"keyword"`, `"event"`, `"schedule"`                            |
| `SkillToolInput`     | Tool definition within a skill manifest                                     |
| `SkillTriggerInput`  | Trigger configuration                                                       |

## E.V.I. Types

| Type                                                             | Description                        |
| ---------------------------------------------------------------- | ---------------------------------- |
| `EviConfig`                                                      | Configuration for `theo.evi()`     |
| `CanvasVisibility`, `CanvasStatus`                               | Canvas visibility + lifecycle      |
| `CanvasRecord`                                                   | Canvas row as returned by the API  |
| `CreateCanvasInput`, `UpdateCanvasInput`, `PublishCanvasInput`   | Canvas mutation inputs             |
| `CanvasCompileResult`, `CanvasTestResult`, `CanvasPublishResult` | Compile / test / publish results   |
| `TheoProjectConfig`                                              | Configuration for `theo.config.ts` |
| `TheoConfig`                                                     | Client constructor options         |
