This demo shows how to use the with the Reka Research with Reka API to search the web and return structured output using response_format.
It's built with Streamlit.
- Uses
response_formatto get structured event data (title, date, URL) - Uses
research["web_search"]to control which domains are searched - Displays reasoning steps during streaming
- Shows results in styled event cards based on structured output
📚 Learn more in our documentation:
-
User enters a query like:
Find AI conferences in Tokyo next month
-
User can choose to:
- Allow all web results
- Limit results to specific domains (e.g.
eventbrite.com) - Block results from specific domains
-
The app sends a streaming request to the Reka API with:
- A JSON schema as
response_format - A research config as
research
- A JSON schema as
-
The model searches the web and returns structured results like:
{ "events": [ { "title": "AI Expo Tokyo", "date": "2025-07-10", "url": "https://aiexpo.jp" } ] } -
The app renders this as UI elements in the browser.
-
Make sure you have Python, Streamlit and OpenAI SDK installed.
pip install streamlit openai
-
Set your Reka API key in the environment:
export REKA_API_KEY=your-api-keySign up for a Reka API key at Reka Platform if you don’t already have one.
-
Run the app:
streamlit run app.py
app.py: Main Streamlit appREADME.md: This guide
- You can change the schema to get other structured formats, like job listings or product data.
- This app uses
reka-flash-researchwith streaming enabled.
