Best for: building Valyu into your product / agents. Add real-time search to an OpenAI app via Valyu’s provider.
OpenAIProvider exposes Valyu search as a tool through OpenAI’s Responses API, so your agents can pull real-time information from academic papers, news, financial data, and authoritative sources.
Paste into your AI assistant to wire Valyu search into an OpenAI app.
Installation
Install the Valyu and OpenAI packages:Free Credits
Get your API key with $10 free credits ($20 with a work email) from the Valyu Platform.
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 work email)

