安装
npx skills add https://github.com/brave/brave-search-skills --skill answers
- Answers — AI Grounding
- Requires API Key
-
- Get one at
- https://api.search.brave.com
- Plan
-
- Included in the
- Answers
- plan. See
- https://api-dashboard.search.brave.com/app/subscriptions/subscribe
- When to Use
- Use Case
- Skill
- Why
- Quick factual answer (raw context)
- llm-context
- Single search, returns raw context for YOUR LLM
- Fast AI answer with citations
- answers
- (single-search)
- streaming, citations
- Thorough multi-search deep research
- answers
- (research mode)
- Iterative deep research, synthesized cited answer
- This endpoint
- (
- /res/v1/chat/completions
- ) supports two modes:
- Single-search
- (default): Fast AI-grounded answer from a single search. Supports
- enable_citations
- .
- Research
- (
- enable_research=true
- ): Multi-iteration deep research with progress events and synthesized cited answer.
- Quick Start (cURL)
- Blocking (Single-Search)
- curl
- -X
- POST
- "https://api.search.brave.com/res/v1/chat/completions"
- \
- -H
- "Content-Type: application/json"
- \
- -H
- "X-Subscription-Token:
- ${BRAVE_SEARCH_API_KEY}
- "
- \
- -d
- '{
- "messages": [{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
- "model": "brave",
- "stream": false
- }'
- Streaming with Citations (Single-Search)
- curl
- -X
- POST
- "https://api.search.brave.com/res/v1/chat/completions"
- \
- -H
- "Content-Type: application/json"
- \
- -H
- "X-Subscription-Token:
- ${BRAVE_SEARCH_API_KEY}
- "
- \
- -d
- '{
- "messages": [{"role": "user", "content": "What are recent breakthroughs in fusion energy?"}],
- "model": "brave",
- "stream": true,
- "enable_citations": true
- }'
- Research Mode
- curl
- -X
- POST
- "https://api.search.brave.com/res/v1/chat/completions"
- \
- -H
- "Content-Type: application/json"
- \
- -H
- "X-Subscription-Token:
- ${BRAVE_SEARCH_API_KEY}
- "
- \
- -d
- '{
- "messages": [{"role": "user", "content": "Compare quantum computing approaches"}],
- "model": "brave",
- "stream": true,
- "enable_research": true,
- "research_maximum_number_of_iterations": 3,
- "research_maximum_number_of_seconds": 120
- }'
- Endpoint
- POST https://api.search.brave.com/res/v1/chat/completions
- Authentication
- :
- X-Subscription-Token:
- header (or
- Authorization: Bearer
- )
- SDK Compatible
- Works with OpenAI SDK via
base_url="https://api.search.brave.com/res/v1"
Two Modes
Feature
Single-Search (default)
Research (
enable_research=true
)
Speed
Fast
Slow
Searches
1
Multiple (iterative)
Streaming
Optional (
stream=true/false
)
Required
(
stream=true
)
Citations
enable_citations=true
(streaming only)
Built-in (in
tag)
Progress events
No
Yes (
← 返回排行榜