QVeris
运行任务
文档目录

发现能力

POST /search

发现能力

REST API 概览 · OpenAPI JSON · OpenAPI YAML

接口契约

稳定性认证费用Operation ID
已发布Bearer API 密钥免费search_api_v1_search_post

参数

此操作没有路径或查询参数。

请求体

Schema: PublicSearchRequest

名称必填类型说明
querystringNatural-language capability query or an exact tool ID for deterministic lookup.
limitintegerMaximum number of ranked results to return.
session_idstringOptional tracking and pricing-context identifier. It does not promise a cache hit.
view"routing" | "full"Response projection. routing returns compact routing cards (tool_id, capability, cost_class, reliability, as_of_support) sized for model context; full or omitted returns the complete result shape, byte-identical to previous releases.
lang"zh" | "en"Response language. When omitted the service negotiates from the Accept-Language header.

可运行示例

bash
curl --request POST \
  --url "https://qveris.ai/api/v1/search" \
  --header "Authorization: Bearer $QVERIS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "openweathermap.weather.execute.v1",
  "limit": 10,
  "session_id": "sess_7Q9m"
}'
typescript
const response = await fetch("https://qveris.ai/api/v1/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.QVERIS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "query": "openweathermap.weather.execute.v1",
  "limit": 10,
  "session_id": "sess_7Q9m"
}),
})

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/search",
    headers={"Authorization": f"Bearer {os.environ['QVERIS_API_KEY']}"},
    json=json.loads(r'''{
  "query": "openweathermap.weather.execute.v1",
  "limit": 10,
  "session_id": "sess_7Q9m"
}'''),
    timeout=30,
)
response.raise_for_status()
print(response.json())

响应

状态码含义Schema
200Successful ResponsePublicSearchResponse
401UnauthorizedPublicApiError
402Insufficient creditsPublicSearchResponse
429Too Many RequestsPublicApiError

成功响应示例

json
{
  "query": "openweathermap.weather.execute.v1",
  "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
      }
    }
  ],
  "elapsed_time_ms": 245.6,
  "remaining_credits": 995
}

精确契约

相关操作

POST 检查能力 · POST 预检能力 · POST 调用能力

这个页面对你有帮助吗?