Skip to main content
POST
Reference example

请求规范

  • 方法与路径: POST /apis/v1/anthropic-websearch/search
  • 可用状态: disabled
此接口已停用,无法调用。历史请求、schema 和价格声明仅保留供参考。 完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

按用量计费;默认请求预估费用:$0.3 USD(不是固定价格)。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.3
  • 计费依据: response_components
  • 公开参考倍率: 1.0
  • 结算证据来源: response_body
当前未启用。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
max_tokens
integer
默认值:1024
必填

Maximum number of tokens to generate in the answer. Required by the upstream Messages API.

示例:

1024

messages
object[]
必填

Conversation messages, same format as the Anthropic Messages API. The user turn holds your question.

示例:
system
string

Optional system prompt to steer the answer's tone or format.

响应

A standard Anthropic Messages response. content[] interleaves the searches performed and the cited answer; usage.server_tool_use.web_search_requests is the billed search count.

content
object[]

Ordered blocks: server_tool_use (search queries), web_search_tool_result (sources), and text (the cited answer).

id
string
role
string
示例:

"assistant"

stop_reason
string
示例:

"end_turn"

type
string
示例:

"message"

usage
object