Skip to content
API referenceDashboard

Web search

Ground answers in live search results.

Web search is available on Chat Completions. Add web_search_options with a search_context_size of low, medium or high; larger sizes put more results into the prompt.

curl https://api.solcardinference.ai/v1/chat/completions \
-H "Authorization: Bearer $SOLCARD_INFERENCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flash",
"web_search_options": { "search_context_size": "medium" },
"messages": [{ "role": "user", "content": "What happened in crypto markets today?" }]
}'

The model decides whether and how often to search. Search results count as input tokens.

Each search costs $0.008 plus the input tokens its results add. Streaming requests are charged for the searches actually run; a non-streaming request with web search on is charged for one search.