Torra Docs

API Reference

High-level reference for Torra request patterns, auth, and streaming responses.

Base request model

  • Authenticated POST endpoints for request-response execution
  • Server-sent events for token streaming and workflow progress
  • Provider and model routing for text, image, audio, video, and document workloads

What an integration usually sends

  • End-user or workflow input
  • Optional workspace or pack context
  • Optional source or file references
  • Output preferences such as JSON shape, stream mode, or target workflow

Authentication

  • Use a Torra API key or service token at the edge of the integrating system.
  • Keep workspace scoping explicit so requests resolve against the intended knowledge and policy boundary.
  • Separate public web-session auth from server-to-server runtime auth.

Streaming

  • Use SSE when the host surface needs partial output, progress updates, or interactive rendering.
  • Treat stream events as structured application events rather than plain text chunks.
  • Design the client to handle terminal success, error, and cancellation states explicitly.

What should be documented next

  • Concrete endpoint inventory with request and response examples
  • Streaming event catalog for assistant and generation workloads
  • Error codes, retry rules, and rate-limit behavior
  • Webhook or callback patterns for asynchronous workflow completion

Integration guidance

  • Keep the surrounding business workflow in the host app.
  • Use Torra as the execution and answer layer.
  • Return structured outputs whenever the host app needs deterministic rendering or downstream automation.
  • Prefer one runtime contract that can support both sync and streaming surfaces.

On this page