Threads AI

secret

A reference to a host secret, resolved only in the host.

Values never reach the log, prompts or the sandbox. A resolved value must be at least 8 characters and not a literal of the event schema, or resolving it is ConfigError invalid_config.

Import from @threads/core (TypeScript) or threads (Python).

function secret(name: string): Secret

Parameters

namestringrequired

The name of the host environment variable that holds the value. It is read only when host code needs it; an unset or empty variable is a setup error missing_secret.

Returns

Secret

Edit on GitHub

On this page