预检能力
POST /tools/probe
预检能力
REST API 概览 · OpenAPI JSON · OpenAPI YAML
接口契约
| 稳定性 | 认证 | 费用 | Operation ID |
|---|---|---|---|
| 已发布 | Bearer API 密钥 | 免费 | probe_tool_api_v1_tools_probe_post |
参数
| 名称 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
tool_id | query | 是 | string | Tool ID to validate |
请求体
Schema: PublicToolProbeRequest
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
parameters | 否 | object | Candidate parameters to validate without executing the capability. |
checks | 否 | "schema" | "quote" | "coverage" | "sample"[] | — |
live_budget | 否 | "none" | "metadata" | "sampled" | M1 is zero-cost; every value avoids an upstream tool execution. |
sub_user_id | 否 | string | Optional sub-user identity used for provider OAuth readiness checks. |
可运行示例
curl --request POST \
--url "https://qveris.ai/api/v1/tools/probe?tool_id=string" \
--header "Authorization: Bearer $QVERIS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"parameters": {
"q": "London"
},
"checks": [
"schema",
"quote"
],
"live_budget": "none"
}'
const response = await fetch("https://qveris.ai/api/v1/tools/probe?tool_id=string", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.QVERIS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"parameters": {
"q": "London"
},
"checks": [
"schema",
"quote"
],
"live_budget": "none"
}),
})
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/probe?tool_id=string",
headers={"Authorization": f"Bearer {os.environ['QVERIS_API_KEY']}"},
json=json.loads(r'''{
"parameters": {
"q": "London"
},
"checks": [
"schema",
"quote"
],
"live_budget": "none"
}'''),
timeout=30,
)
response.raise_for_status()
print(response.json())
响应
| 状态码 | 含义 | Schema |
|---|---|---|
200 | Successful Response | PublicToolProbeResponse |
400 | Invalid probe request | PublicApiError |
401 | Unauthorized | PublicApiError |
404 | Capability not found | PublicApiError |
422 | Validation Error | HTTPValidationError |
429 | Too Many Requests | unknown |
502 | Upstream unavailable | PublicApiError |
504 | Upstream timeout | PublicApiError |
成功响应示例
{
"schema": {
"valid": true
},
"quote": {
"estimate_credits": 5,
"currency": "credits",
"exact": true,
"basis": "per_call"
},
"recovery": {
"missing_fields": [],
"safe_fixes": [],
"retryable": true,
"next_action": "execute",
"provider_fallback": false
},
"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",
"reason": "schema_missing"
},
{
"name": "authentication",
"status": "missing",
"reason": "authentication_path_missing"
},
{
"name": "description_contract",
"status": "missing",
"reason": "description_missing"
},
{
"name": "provider_identity",
"status": "missing",
"reason": "provider_id_missing"
},
{
"name": "permissions",
"status": "missing"
},
{
"name": "freshness",
"status": "missing",
"reason": "expires_at_missing"
},
{
"name": "live_check",
"status": "missing",
"reason": "live_check_samples_missing"
}
],
"quality_issues": [
"live_check_samples_missing",
"schema_missing",
"authentication_path_missing",
"description_missing",
"provider_id_missing",
"permission_disclosure_incomplete",
"verified_at_missing",
"expires_at_missing",
"test_run_digest_missing",
"verification_status_missing"
]
},
"execution_restrictions": {
"callable": true,
"technical": "ready",
"authentication": "unknown",
"eligibility": "unknown",
"license": "unknown",
"regions": {
"allow": [],
"deny": []
},
"region_status": "unknown",
"commercial_use": "unknown",
"freshness": "unknown",
"price_certainty": "exact",
"warnings": [],
"confidence": 0.25,
"allowed_actions": [
"discover",
"inspect",
"probe",
"execute"
],
"blocked_actions": [],
"next_action": "execute",
"retryable": true
},
"contract_features": [
"verification-evidence-v1",
"action-guidance-v1",
"probe-recovery-v1"
]
}
精确契约
- 稳定版 JSON: OpenAPI JSON
- 稳定版 YAML: OpenAPI YAML
- 版本化 JSON: OpenAPI v1 JSON
- 版本化 YAML: OpenAPI v1 YAML
