Constructors
Constructor
Parameters
config?
TypeSafeClientConfig = {}
Returns
TypeSafeClient
Throws
The API key is missing, configuration is invalid, the runtime is unsupported, or the runtime lacks the requested compression.Properties
baseURL
compression
false when bodies are sent uncompressed.
defaultHeaders
defaultModel
model.
fetch
logger
logLevel.
logLevel
models
retry
timeout
Methods
systemOne()
Type Parameters
Q
Q extends Questions
Parameters
request
SystemOneRequest<Q>
State, questions, an optional model override, and optional assets.
Assets in state, question content, or withAssets text are sent under their references.
options?
RequestOptions = {}
Per-call timeout, retry, headers, and cancellation settings.
Returns
APIPromise<SystemOneResult<Q>>
Answers typed by question name and criteria, with model and token usage. Every
failure below rejects the returned promise; the call itself doesn’t throw.
Throws
State isnull or omitted, questions are empty, score criteria are not
a list of at least two entries, choice criteria are not a nonempty map, a noul question has
neither instructions nor a described outcome, a string holds the reference of an asset not
attached to the request, a name in assets doesn’t appear in the request, or a Blob
asset can’t be read.

