POST /chat/completions): a hosted provider, a gateway, or a server on your own machine. Each job can use its own endpoint and its own key.
The jobs
models takes only these four keys and rates. Anything else throws ScoutConfigError.
What each job takes
Structured replies
Scout asks each model for JSON.structuredOutput sets how:
'tool_choice'(the default) forces one function call whose parameters are the schema. Function calling is the most widely supported way to get structured output across chat completions endpoints.'json_object'asks for any JSON and spells the schema out in the prompt, for an endpoint without function calling.'strict'sends a strictjson_schemaresponse format, for an endpoint that supports it.
error names the job, its model and the two other settings to try, for example set models.hands.structuredOutput to 'json_object' or 'strict'. Scout does not switch modes on its own: you decide which one your endpoint takes.
Cost
When your endpoint states a cost per call,result.costUsd is the run’s model spend in USD. To price models yourself, and to hold a run to a caps.budget, pass models.rates with every job’s model:
cacheRead and cacheWrite are null when the endpoint bills no such line, which is not the same as billing zero. inputModalities lists what the model accepts: 'text', and 'image' for a model that reads screenshots. Once you pass rates, every job’s model needs an entry, or new Scout throws ScoutConfigError rather than report a cost that reads as zero. Without rates and without a stated cost, costUsd is absent rather than zero.
Models from the environment
The examples read their models from environment variables through a small helper,examples/models.ts. Scout itself reads none of these: the only variable it reads is OUTCRAWL_API_KEY, for the cloud browser. Start from the helper if the pattern suits you.
Any job can use its own endpoint with
SCOUT_<JOB>_BASE_URL and SCOUT_<JOB>_API_KEY, for example SCOUT_BRAIN_BASE_URL.