Overview
The BLACKBOX AI API provides powerful web search capabilities through theblackbox-search model. This feature allows your AI applications to access real-time information from the web, providing up-to-date answers with cited sources.
Key Features
- Real-time Information: Access current data from the web
- Source Citations: Get URLs and titles of sources used
- Seamless Integration: Works with the standard chat completions API
- Automatic Context: Web results are automatically incorporated into responses
Using Web Search
To enable web search, simply use theblackbox-search model in your chat completion requests:
Response Format
When using web search, the response includes anannotations array containing URL citations:
Annotations Structure
Array of annotation objects containing source citations.
Use Cases
News and Current Events
Research and Fact-Checking
Product Information
Market Data
Best Practices
- Be Specific: Provide clear, specific queries for better search results
- Use System Messages: Set context about the type of information needed
- Handle Citations: Always check for and display source citations to users
- Rate Limiting: Be mindful of API rate limits when making frequent searches
- Verify Information: While web search provides current data, always encourage users to verify critical information
Streaming with Web Search
Web search works seamlessly with streaming responses:Pricing
Theblackbox-search model includes web search capabilities at the following rates:
- Input: $0.0002 per 1K tokens
- Output: $0.0005 per 1K tokens
- Web Search: $0.03 for 1 search query (includes X/Twitter search)