Skip to content

Get the model call averages

GET
/api/metrics
curl --request GET \
--url 'http://127.0.0.1:8765/api/metrics?kind=assess'

What this project’s model calls cost, as averages per kind of call and model. Every model call Scout makes is recorded once, locally: the model, tokens in, out and cached, the cost when the provider reports one, the wall time and the outcome. No prompt, answer, resume or posting text is stored or served. aggregates has one entry per (kind, model_target, model); comparison adds the model ids of one model target together. avg_input_tokens is everything the model read (cached input included) and avg_cached_tokens the part served from cache; token and cost averages are over the calls that reported them, avg_seconds over the calls that succeeded; error_rate counts a call that failed or answered something unusable; items is how many jobs or titles the calls covered (a rank or tag call covers several). A value nothing reported is null. Reading makes no model call.

kind
string
Allowed values: assess rank tag tailor extract interview learning

Only this kind of call.

model
string

Only this model target (codex_cli, claude_cli, ollama_local, openrouter_api) or model id.

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-metrics:1
key
additional properties
any
Example
{
"aggregates": [
{
"avg_cached_tokens": 9200,
"avg_cost_usd": null,
"avg_input_tokens": 18400,
"avg_output_tokens": 1100,
"avg_seconds": 11.2,
"avg_tokens": 19500,
"calls": 12,
"error_rate": 0.0833,
"errors": 1,
"items": 12,
"kind": "assess",
"last_at": "2026-10-02T14:02:00.000000Z",
"model": "gpt-5.1-codex",
"model_target": "codex_cli"
}
],
"comparison": [
{
"avg_cached_tokens": 9200,
"avg_cost_usd": null,
"avg_input_tokens": 18400,
"avg_output_tokens": 1100,
"avg_seconds": 11.2,
"avg_tokens": 19500,
"calls": 12,
"error_rate": 0.0833,
"errors": 1,
"items": 12,
"kind": "assess",
"last_at": "2026-10-02T14:02:00.000000Z",
"model_target": "codex_cli",
"models": [
"gpt-5.1-codex"
]
}
],
"kind": "assess",
"model": null,
"schema_version": "scout-metrics:1"
}

Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Target_unavailable

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "target_unavailable",
"message": "..."
}
}

Invalid_value, unknown_key

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "invalid_value",
"message": "..."
}
}