OpenAIProvider. Your application runs the model and tool loop; Valyu returns content and source URLs. To use Valyu inside ChatGPT, connect via MCP.
Installation
Install the Valyu and OpenAI packages:Basic usage
The OpenAI provider handles the integration with the Responses API:How it works
TheOpenAIProvider handles tool registration, execution, and conversation flow for you. The model decides when to search; the provider runs the call and feeds results back.
Search parameters the model can set
Search parameters the model can set
The model chooses these per query based on context:
max_num_results- 1-20 for standard keys, up to 100 with a special API keyincluded_sources/excluded_sources- target or exclude datasetscategory- guide search to a topicstart_date/end_date- time-bounded searchesrelevance_threshold- filter by relevance (0-1)
OpenAIProvider reference
OpenAIProvider reference
Additional resources
OpenAI Responses API
Official OpenAI Responses API documentation
Valyu API Reference
Complete Valyu API documentation
Python SDK
Full Python SDK documentation
Get API Key
Sign up for $10 free credits ($20 with a company email)