Custom backend

For a production integration, call STYD from your own backend. It keeps keys safe and gives you full control of the flow.

Why a backend

Keys stay server-side
Never put an API key in browser or mobile frontend code.
Full control
Send a question to /api/v1/chat. It waits for the answer for a while; if the run is not finished, read it with /api/v1/runs/{runId}. A repeated request with the same Idempotency-Key does not run twice.
Safe logging
Log errors carefully, without leaking keys or sensitive data.
Respect boundaries
Stay within usage controls and the workspace your key belongs to.
The API reference lists every route, field and error. Start with API getting started.

Good custom workflows

  • an internal data lookup before sending a reply
  • a decision-support workflow for operations or support
  • an email-assist workflow where STYD searches connected data and helps prepare a response
  • a nightly question whose answer is written to a sheet or a database

These are example patterns to build, not templates that ship with STYD.

Need a specific output format?

Ask for the shape you need with the format field of the request: json returns structured data (tables as columns and rows, and the figures), text returns plain text, and email returns an email-style reply. The format costs no extra prompt.

Anything beyond these, such as a classification, a product match or a decision field, is logic you write in your own backend, on top of the answer. If you would rather have it built for you, see the catalogue of custom builds.