免费开始 →

API 参考

遥测与优化

上报在网关之外发起的调用、为请求选择模型、查找和存储缓存的回答、检查智能体是否陷入循环、压缩长内容,以及查询提供商市场。

完整的 API 参考

路由摘要和字段名称均以英文撰写,本页与文件中都是如此。

/api/ingest

POST /api/ingest

Ingest AI usage events

认证
API 密钥
密钥作用域
ingest:write
请求体
events (必填)

/api/arbiter

POST /api/arbiter/route

Select optimal model for a request

认证
API 密钥
密钥作用域
inference:write
请求体
agentId · promptTokens · mode · qualityFloor · latencyCeilingMs · budgetUsd · candidates

/api/cache

POST /api/cache/lookup

Look up a cached answer for a prompt

认证
API 密钥
密钥作用域
cache:read
请求体
prompt (必填) · threshold · model

POST /api/cache/store

Store a prompt and its answer in the cache

认证
API 密钥
密钥作用域
cache:write
请求体
prompt (必填) · response (必填) · model (必填) · provider (必填) · costUsd · ttlMs

/api/loops

POST /api/loops/check

Check an agent for a loop, reset its counters, or read its state

认证
API 密钥
密钥作用域
advisory:read
请求体
action · agentId (必填) · workflowId · prompt · model · costUsd

/api/v1/compress

POST /api/v1/compress

Compress long reasoning content (levels L1 to L3)

认证
API 密钥
密钥作用域
advisory:read
模块
在部署运行 FEATURE_CCE 时提供。
请求体
content (必填) · level · agentId · workflowId · traceId

/api/v1/reconstruct

POST /api/v1/reconstruct

Reconstruct compressed content from its id

认证
API 密钥
密钥作用域
advisory:read
模块
在部署运行 FEATURE_CCE 时提供。
请求体
cognitiveStateId (必填)

/api/v1/marketplace

GET /api/v1/marketplace

The best-fit model of the provider marketplace for your constraints

认证
API 密钥
密钥作用域
advisory:read
模块
在部署运行 FEATURE_MARKETPLACE 时提供。
参数
mode · maxCostPer1k · maxLatencyMs · minQuality · requiresVision · requiresTools · minContextWindow