激活 Agent 试用
POST /agent/trial/activate
激活已准备的会话,私密保存一次性 API Key,使用原持有证明恢复未知结果。
REST API 概览 · OpenAPI JSON · OpenAPI YAML
接口契约
| 稳定性 | 认证 | 费用 | Operation ID |
|---|---|---|---|
| 已发布 | 私密 Agent 试用持有证明 | 免费 | activate_api_v1_agent_trial_activate_post |
参数
此操作没有路径或查询参数。
请求体
Schema: AgentTrialIssueRequest
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
agentName | 否 | string | — |
可运行示例
umask 077
trial_response_file=$(mktemp)
curl --fail-with-body --request POST \
--url "https://qveris.ai/api/v1/agent/trial/activate" \
--header "Authorization: Bearer $QVERIS_TRIAL_PROOF" \
--header 'Content-Type: application/json' \
--data '{
"agentName": "Agent trial"
}' \
--output "$trial_response_file" && printf 'Response saved privately: %s\n' "$trial_response_file"
# Import the one-time key into your secret store, then delete this temporary file.
const response = await fetch("https://qveris.ai/api/v1/agent/trial/activate", {
method: "POST",
credentials: "omit",
redirect: "error",
headers: {
Authorization: `Bearer ${process.env.QVERIS_TRIAL_PROOF}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"agentName": "Agent trial"
}),
})
if (!response.ok) throw new Error(`QVeris request failed: ${response.status}`)
const payload = await response.json()
// Save payload.data.api_key privately before continuing; never log it.
import json
import os
import requests
response = requests.request(
"POST",
"https://qveris.ai/api/v1/agent/trial/activate",
headers={"Authorization": f"Bearer {os.environ['QVERIS_TRIAL_PROOF']}"},
allow_redirects=False,
json=json.loads(r'''{
"agentName": "Agent trial"
}'''),
timeout=30,
)
response.raise_for_status()
payload = response.json()
# Save payload["data"]["api_key"] privately before continuing; never print it.
响应
| 状态码 | 含义 | Schema |
|---|---|---|
200 | Successful Response | APIResponse_AgentTrialActivationView_ |
201 | Created | APIResponse_AgentTrialActivationView_ |
400 | Bad Request | APIResponse_BrowserTrialFailure_ |
401 | Unauthorized | APIResponse_BrowserTrialFailure_ |
413 | Request Entity Too Large | APIResponse_BrowserTrialFailure_ |
422 | Unprocessable Entity | APIResponse_BrowserTrialFailure_ |
429 | Too Many Requests | APIResponse_BrowserTrialFailure_ |
成功响应示例
{
"status": "string",
"message": "string"
}
精确契约
- 稳定版 JSON: OpenAPI JSON
- 稳定版 YAML: OpenAPI YAML
- 版本化 JSON: OpenAPI v1 JSON
- 版本化 YAML: OpenAPI v1 YAML
