Skip to main content

Request content is never stored or logged

The content of your requests (the state, every instructions value and every criteria description or label) is used only to compute the answer to that request. It is never stored and never written to logs, traces or error reports, and it is never put into an error message. This makes the API suitable for sensitive inputs such as customer messages and internal documents.

What is kept

For each request that passes validation and the balance check, we keep a usage record so that you can see and audit your spend. This covers every request that gets that far, whether the model then answers or the call fails. Requests rejected before that point (an invalid request or key, an unknown or retired model, a body too large, a rate limit, a key’s spend limit, or too little balance) are not recorded and are never charged. Each record has:
  • the request id (x-request-id);
  • which API key sent it (or that it came from the console playground);
  • the pinned model the request was sent to;
  • the number of questions;
  • the billable input tokens, when the model answered (empty for a failed call);
  • the cost (zero for a failed call), the time it took, and the status code.
These records contain no request content. You can see and export them on the console’s Usage page.

What comes back

A successful response contains only the answers. The only parts of your request that appear in it are the identifiers your code reads answers by: question names, choice option names (as keys of probabilities and as the choice), and score level labels (in legend). Error responses never echo request content. When an error names a field in param, it uses the field’s path, in which only question names and option names can appear.

The docs pages send nothing

The API reference on these docs pages shows each endpoint with example requests and responses that you can copy. It never sends a request, so your API key and request content are never entered into or passed through these pages. To try the API without writing code, use the playground in the console. Requests you send from your own code go straight to https://api.torchcast.ai.