# TokenRadar for calling agents / 调用方 Agent 指南

Use the public read-only `GET /api/recommendations` to select a model, provider route, and allowance plan together. [Response and query schema](/recommendation.schema.json). Neither this endpoint nor the website accepts or stores your model API key. Querying it performs no inference and writes no catalog or evidence data.

使用只读 `GET /api/recommendations`，一并选择模型、渠道和额度方案。[输入约定与输出 Schema](/recommendation.schema.json)。此接口不接受或保存模型 API Key，查询不会执行推理或写入数据。

```sh
# Existing OpenRouter key; coding agent, tools, 128K, 40 requests/day.
# With no valid_until, availability is checked at query time.
curl --get 'https://tokenradar-8cr.pages.dev/api/recommendations' \
  --data-urlencode 'task=coding_agent' \
  --data-urlencode 'providers=openrouter' \
  --data-urlencode 'channels=api_console' \
  --data-urlencode 'capabilities=tools' \
  --data-urlencode 'min_context=128000' \
  --data-urlencode 'requests_per_day=40' \
  --data-urlencode 'free_only=true' \
  --data-urlencode 'explore=true'
```

`primary` and `alternatives` require healthy independent evidence for the exact task and model version. `coding` completion/generation benchmark scores do not qualify as `coding_agent` evaluations. Consequently, this real scenario may have `primary: null` while `exploration` contains routes whose hard constraints match. Treat exploration as unassessed; read `unknowns`, `confidence`, `related_community`, and `excluded[].reasons`. If nothing matches, constraints are preserved and the result explains the gaps.

首选和备选要求同任务、同版本且来源状态正常的独立证据。编程补全/生成分数不会当作编程 Agent 成功率，因此上面的真实场景可能没有成熟首选，只有满足硬条件的探索对象。请读取未知项、证据可信程度、相关反馈和排除原因；无匹配时不会自动放宽条件。

Add `evidence=benchmark` or `evidence=independent` to make evidence a hard requirement; `explore=true` does not override it. To require availability until the end of a particular day, pass an ISO date such as `valid_until=2026-10-31` (interpreted as the end of that UTC date). A missing announced end date is not a promise of future service. Date-time values with explicit offsets are also supported.

已公布额度只用于估算，不代表知道个人账户剩余额度。OpenRouter 免费模型共享每日请求额度，首选与备选的额度不能相加；40 次/日是否满足按公布上限判断。速度与可靠性未经实测时保持未知。

For callable candidates, `configuration` contains the exact API model ID, base URL, protocol and environment-variable placeholder, plus a `sample_curl`. Export your own key locally; never append it to this GET URL. OpenRouter examples use `OPENROUTER_API_KEY`; the generated header is double-quoted so the shell expands the variable. Product-only candidates have `configuration: null`.

Arrays (`capabilities`, `channels`, `providers`) accept commas and repeated parameters. Scalar parameters may occur only once. Booleans accept only `true` or `false`; invalid values, unknown parameters and unknown providers return HTTP 400 with `error.code=invalid_query`. No region or inferred preference filter is supported. Use `budget_usd_daily`, `input_tokens_per_day` and `output_tokens_per_day` for USD cost estimates where verified meters exist; an unknown cost cannot satisfy a budget constraint. A paid-plan calculation contract exists, but this does not claim a verified paid-model catalog.

Check `coverage.sources` for success, failure, unavailable credentials and staleness. Retained evidence includes original links, model/benchmark versions, run configuration and separate fetch/publication dates. Manual community summaries are a small curated sample, not an approval percentage. Popularity measures HN discussion windows, not positive sentiment or overall community popularity.
