BazaarLinkBazaarLink
登入
文件API 参考SDK 参考Agent 应用AI Skills
账户

创建 Tavily 研究任务

异步创建研究任务。OpenAPI 的必填输入字段是 input(不是 query);model 可选 mini、pro 或 auto,stream=true 时返回 SSE 流。优先使用 Bearer 认证,也兼容在 JSON body 中提供可选 api_key。研究按实际消耗的 credits 按次计费:mini 动态范围为 4–110 credits,pro 为 15–250 credits,auto 遵循所选层级。免费额度不适用于 research;免费额度覆盖 search、extract、crawl、map 和 :online。

POST/v1/research

验证

Authorization必填
string · header

在 Authorization 标头以 Bearer token 传入 API 密钥。

Body

input必填
string

要研究的任务或问题。OpenAPI 使用 input;query 不是别名。

Example: What are the latest developments in AI?
model
string

研究代理使用的模型层级;mini 适合聚焦问题,pro 适合多角度研究,auto 由服务选择。

miniproauto
Example: mini
stream
boolean

是否以 SSE 流式传输研究结果;默认为 false。

Example: false
output_schema
object

定义研究输出的 JSON Schema;必须包含 properties,可选 required。

properties必填
object

输出对象的属性定义;每个值都是 JSON Schema 字段。

required
string[]

输出对象中必填属性的名称列表。

Example: ["company"]
citation_format
string

研究报告中的引用格式,默认为 numbered。

numberedmlaapachicago
Example: numbered
include_domains
string[]

来源的软性偏好;报告中仍可能出现其他域名。

maxItems: 20
Example: ["sec.gov"]
exclude_domains
string[]

硬性屏蔽来源域名及其子域名。

maxItems: 20
Example: ["reddit.com"]
output_length
string

响应大小目标;是目标范围而非硬性上限,默认为 standard。

shortstandardlong
Example: standard
files
array<object>

以 base64 附加 .txt、.md 或 .json 内容;最多 5 个文件,总字数上限 80,000。

maxItems: 5
name必填
string

文件名,扩展名必须是 .txt、.md 或 .json。

Example: brief.md
data必填
string

文件内容的 base64 编码。

Example: <base64-encoded file contents>
type
string

data 字段的编码类型,默认为 base64。

base64
Example: base64
api_key
string

BazaarLink 可选的 body 凭证;优先使用 Authorization: Bearer,认证后会移除此字段。

Example: YOUR_BAZAARLINK_API_KEY
POST /v1/research
curl -X POST https://api.bazaarlink.ai/v1/research \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"What are the latest developments in AI?","model":"mini"}'
响应示例

研究任务已加入队列;返回 request_id、created_at、pending 状态、input、model 和 response_time。

{
  "request_id": "123e4567-e89b-12d3-a456-426614174111",
  "created_at": "2025-01-15T10:30:00Z",
  "status": "pending",
  "input": "What are the latest developments in AI?",
  "model": "mini",
  "response_time": 1.23
}
客服
客服
您好!有什么可以协助?
请留下消息,我们会尽快回复。