QVeris
运行任务
文档目录

调用能力

POST /tools/execute

调用能力

REST API 概览 · OpenAPI JSON · OpenAPI YAML

接口契约

稳定性认证费用Operation ID
已发布Bearer API 密钥取决于所选能力的 billing_ruleexecute_api_v1_tools_execute_post

参数

名称位置必填类型说明
tool_idquerystring | nullTool ID (optional if provided in request body)

请求体

Schema: PublicExecuteToolRequest

名称必填类型说明
tool_idstringCapability id. Optional when supplied as the tool_id query parameter.
search_idstringSearch id that returned the selected capability.
session_idstringOptional tracking and pricing-context identifier. If omitted, the service may use the execution id.
parametersobjectCapability-specific parameters validated by the selected tool schema.
max_response_sizeintegerMaximum response payload bytes before truncation. Use -1 for no limit.
respond_withstringServer-side result projection. full (default) returns the complete result, byte-identical to previous releases. fields:<JSONPath,...> returns only the selected fields — JSONPath expressions are rooted at result.data, comma-separated, and at least one non-empty expression is required. summary returns the response schema, size/row statistics, and a full_content_file_url for the complete payload.

可运行示例

bash
curl --request POST \
  --url "https://qveris.ai/api/v1/tools/execute" \
  --header "Authorization: Bearer $QVERIS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "search_id": "srch_01HZX9QK7J3M9T",
  "session_id": "sess_7Q9m",
  "parameters": {
    "q": "London"
  },
  "max_response_size": 20480
}'
typescript
const response = await fetch("https://qveris.ai/api/v1/tools/execute", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.QVERIS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "search_id": "srch_01HZX9QK7J3M9T",
  "session_id": "sess_7Q9m",
  "parameters": {
    "q": "London"
  },
  "max_response_size": 20480
}),
})

if (!response.ok) throw new Error(`QVeris request failed: ${response.status}`)
console.log(await response.json())
python
import json
import os
import requests

response = requests.request(
    "POST",
    "https://qveris.ai/api/v1/tools/execute",
    headers={"Authorization": f"Bearer {os.environ['QVERIS_API_KEY']}"},
    json=json.loads(r'''{
  "search_id": "srch_01HZX9QK7J3M9T",
  "session_id": "sess_7Q9m",
  "parameters": {
    "q": "London"
  },
  "max_response_size": 20480
}'''),
    timeout=30,
)
response.raise_for_status()
print(response.json())

响应

状态码含义Schema
200Successful ResponsePublicExecuteToolResponse
401UnauthorizedPublicApiError
402Insufficient creditsPublicExecuteToolResponse
422Validation ErrorPublicExecuteToolResponse
429Too Many RequestsPublicApiError

成功响应示例

json
{
  "execution_id": "exec_01HZX9R2R4S2E",
  "result": {
    "data": {
      "temperature": 15.5,
      "description": "partly cloudy"
    }
  },
  "success": true,
  "error_message": null,
  "execution_time": 0.211,
  "billing": {
    "summary": "5 credits per successful request",
    "list_amount_credits": 5
  },
  "cost": 5,
  "remaining_credits": 990
}

精确契约

相关操作

POST 发现能力 · POST 检查能力 · POST 预检能力

这个页面对你有帮助吗?