Overview
Integrate Valyu’s deep search capabilities directly into your OpenAI applications using our provider system with OpenAI’s Responses API. This enables your AI agents to access real-time information from academic papers, news, financial data, and authoritative sources.Installation
Install the Valyu and OpenAI packages:Free Credits
Get your API key with $10 credit from the Valyu Platform.
Basic Usage
The new OpenAI provider makes integration incredibly simple with the Responses API:How It Works
TheOpenAIProvider
handles everything for you:
- Tool Registration: Automatically formats Valyu search for OpenAI Responses API
- Tool Execution: Manages search API calls behind the scenes
- Conversation Flow: Builds proper message sequences with tool results
responses.create()
), not Chat Completions!
Research Agent Example
Create a simple research agent that can access current information:Financial Analysis Example
Configuration Options
Model Selection
You can use any OpenAI model with the Responses API:Search Parameters
The AI model can automatically use advanced search parameters based on your query context:- max_num_results: Limit results (1-20)
- included_sources: Search specific domains or datasets
- excluded_sources: Exclude certain sources
- category: Guide search to specific topics
- start_date/end_date: Time-bounded searches
- relevance_threshold: Filter by relevance (0-1)