Skip to main content

Overview

The BLACKBOX AI API provides powerful web search capabilities through the blackbox-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
To enable web search, simply use the blackbox-search model in your chat completion requests:

Response Format

When using web search, the response includes an annotations array containing URL citations:

Annotations Structure

annotations
array
Array of annotation objects containing source citations.

Use Cases

News and Current Events
Research and Fact-Checking
Product Information
Market Data

Best Practices

  1. Be Specific: Provide clear, specific queries for better search results
  2. Use System Messages: Set context about the type of information needed
  3. Handle Citations: Always check for and display source citations to users
  4. Rate Limiting: Be mindful of API rate limits when making frequent searches
  5. Verify Information: While web search provides current data, always encourage users to verify critical information
Web search works seamlessly with streaming responses:

Pricing

The blackbox-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)
See the Inference page for complete pricing information.

Chat Completions

Learn about the chat completions API

Chat Models

Explore all available chat models

Sample Usage

See more API usage examples

CLI Web Search

Use web search in BLACKBOX CLI