跳转到主要内容
POST
Answers

请求规范

  • 方法与路径: POST /apis/v1/brave/chat/completions
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/brave/chat/completions
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

按实际用量收费。 默认请求预估费用:$0.012 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

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

请求体

application/json
messages
UserMessage · object[]
必填

The conversation so far. Exactly one user message is supported, e.g. [{"role": "user", "content": "Explain quantum computing"}].

Required array length: 1 element
country
string
默认值:us
enable_citations
boolean
默认值:false

Whether to include inline citation tags in the answer. Requires stream=true and is not supported in research mode.

enable_entities
boolean
默认值:false

Whether to include inline entity tags in the answer. Requires stream=true and is not supported in research mode.

enable_research
boolean
默认值:false

Whether to answer with iterative deep research instead of a single search. Requires stream=true.

language
string
默认值:en
max_completion_tokens
integer | null
metadata
Metadata · object | null

Accepted for OpenAI SDK compatibility and currently ignored: the pairs are not stored or returned.

model
enum<string>
默认值:brave-pro

Model ID used to generate the response.

可用选项:
brave-pro,
brave
research_allow_thinking
boolean
默认值:true

Accepted for compatibility. Ignored by the mixer engine behind this API, which always runs research with extended thinking off.

research_maximum_number_of_iterations
integer
默认值:4

Maximum number of research iterations.

必填范围: 1 <= x <= 5
research_maximum_number_of_queries
integer
默认值:20

Maximum number of search queries research mode may issue in total.

必填范围: 1 <= x <= 50
research_maximum_number_of_results_per_query
integer
默认值:30

Maximum number of search results to consider per research query.

必填范围: 1 <= x <= 60
research_maximum_number_of_seconds
integer
默认值:180

Time budget for research, in seconds.

必填范围: 1 <= x <= 300
research_maximum_number_of_tokens_per_query
integer
默认值:8192

Maximum number of tokens to gather per research query.

必填范围: 1024 <= x <= 16384
safesearch
string
默认值:moderate
seed
integer | null

Accepted for OpenAI SDK compatibility and currently ignored: answers are not reproducible.

stream
boolean
默认值:true
web_search_options
WebSearchOptions · object | null

响应

Successful Response

choices
ChoiceChunk · object[]
必填
created
integer
必填
id
string
必填
model
enum<string>
默认值:brave-pro
可用选项:
brave-pro,
brave
object
enum<string>
默认值:chat.completion.chunk
可用选项:
chat.completion.chunk
Allowed value: "chat.completion.chunk"
system_fingerprint
string | null
usage
OpenAIUsage · object | null