检查能力
POST /tools/by-ids
检查能力
REST API 概览 · OpenAPI JSON · OpenAPI YAML
接口契约
| 稳定性 | 认证 | 费用 | Operation ID |
|---|---|---|---|
| 已发布 | Bearer API 密钥 | 免费 | get_tools_by_ids_api_v1_tools_by_ids_post |
参数
此操作没有路径或查询参数。
请求体
Schema: PublicToolsByIdsRequest
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
tool_ids | 是 | string[] | Capability ids returned by Discover. |
search_id | 否 | string | Search id that returned these capabilities, when available. |
session_id | 否 | string | Optional tracking and pricing-context identifier. It does not promise a cache hit. |
view | 否 | "full" | "lean" | Response projection. lean trims per-capability metadata for model context; full or omitted returns the complete result shape. |
可运行示例
curl --request POST \
--url "https://qveris.ai/api/v1/tools/by-ids" \
--header "Authorization: Bearer $QVERIS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"tool_ids": [
"openweathermap.weather.execute.v1"
],
"search_id": "srch_01HZX9QK7J3M9T",
"session_id": "sess_7Q9m"
}'
const response = await fetch("https://qveris.ai/api/v1/tools/by-ids", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.QVERIS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"tool_ids": [
"openweathermap.weather.execute.v1"
],
"search_id": "srch_01HZX9QK7J3M9T",
"session_id": "sess_7Q9m"
}),
})
if (!response.ok) throw new Error(`QVeris request failed: ${response.status}`)
console.log(await response.json())
import json
import os
import requests
response = requests.request(
"POST",
"https://qveris.ai/api/v1/tools/by-ids",
headers={"Authorization": f"Bearer {os.environ['QVERIS_API_KEY']}"},
json=json.loads(r'''{
"tool_ids": [
"openweathermap.weather.execute.v1"
],
"search_id": "srch_01HZX9QK7J3M9T",
"session_id": "sess_7Q9m"
}'''),
timeout=30,
)
response.raise_for_status()
print(response.json())
响应
| 状态码 | 含义 | Schema |
|---|---|---|
200 | Successful Response | PublicInspectResponse |
401 | Unauthorized | PublicApiError |
429 | Too Many Requests | unknown |
504 | Upstream timeout | PublicApiError |
成功响应示例
{
"search_id": "srch_01HZX9QK7J3M9T",
"total": 1,
"results": [
{
"tool_id": "openweathermap.weather.execute.v1",
"name": "Current Weather",
"description": "Get current weather data for a city.",
"provider_name": "OpenWeatherMap",
"params": [
{
"name": "q",
"type": "string",
"required": true,
"description": "Location query accepted by the weather provider."
}
],
"expected_cost": "5 credits per successful request",
"billing_rule": {
"unit": "request",
"amount_credits": 5
},
"stats": {
"avg_execution_time_ms": 210.7,
"success_rate": 0.982
},
"verification_status": "unverified",
"verification": {
"status": "unverified",
"policy_version": "catalog-verification-v1",
"required_checks": [
"schema",
"authentication",
"description_contract",
"provider_identity",
"permissions",
"freshness",
"live_check"
],
"checks": [
{
"name": "schema",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": null
},
{
"name": "authentication",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": "authentication_path_missing"
},
{
"name": "description_contract",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": null
},
{
"name": "provider_identity",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": "provider_id_missing"
},
{
"name": "permissions",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": null
},
{
"name": "freshness",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": "expires_at_missing"
},
{
"name": "live_check",
"status": "missing",
"checked_at": null,
"evidence_digest": null,
"reason": "live_check_samples_missing"
}
],
"verified_at": null,
"expires_at": null,
"test_run_digest": null,
"quality_issues": [
"live_check_samples_missing",
"authentication_path_missing",
"provider_id_missing",
"permission_disclosure_incomplete",
"verified_at_missing",
"expires_at_missing",
"test_run_digest_missing"
]
},
"execution_restrictions": {
"callable": false,
"technical": "ready",
"authentication": "unknown",
"eligibility": "unknown",
"license": "unknown",
"regions": {
"allow": [],
"deny": []
},
"region_status": "unknown",
"commercial_use": "unknown",
"freshness": "unknown",
"price_certainty": "estimated",
"data_as_of": null,
"warnings": [],
"confidence": 0.125,
"allowed_actions": [
"discover",
"inspect",
"probe"
],
"blocked_actions": [
"execute"
],
"next_action": "inspect",
"retryable": true
},
"examples": {
"sample_parameters": {
"q": "London"
}
}
}
],
"remaining_credits": 995
}
精确契约
- 稳定版 JSON: OpenAPI JSON
- 稳定版 YAML: OpenAPI YAML
- 版本化 JSON: OpenAPI v1 JSON
- 版本化 YAML: OpenAPI v1 YAML
