Skip to main content

theo.complete(request)

Sends a prompt through the full orchestration pipeline and returns the complete response.

CompletionRequest

CompletionResponse.usage

For image / video / tts / stt modes, token counts are always 0. Use cost_cents as the sole usage metric on those modes.

theo.stream(request)

Returns a TheoStream — an async-iterable handle with a cancel() method plus final-metadata properties populated as events arrive.

TheoStream

StreamEvent (discriminated union)

switch (event.type) narrows event.data automatically.