How To Leverage Reka Research To Build Smarter Ai Apps
Captured source
source ↗How to Leverage Reka Research to Build Smarter AI Apps
← Back to Blog
Sep 10, 2025
How to Leverage Reka Research to Build Smarter AI Apps
How to Leverage Reka Research to Build Smarter AI Apps
Imagine having an assistant that could search across a curated list of sources, gather information, synthesize it, and present it in a structured format tailored to your needs. This is the power of Reka Research, an AI model designed to perform research by leveraging web searches and document analysis much faster than a human could. With tools like Reka Research integrated into your applications, you can create smarter, more reliable AI experiences. This post walks you through a demo app that showcases how to use Reka Research and fine-tune it by using advanced options and get better results, faster. The following video show step‑by‑step how Reka Research powers a simple “Reka Restaurants” app that turns a craving (e.g., bagels”) into a short, structured list of nearby restaurants—plus a transparent reasoning trace. You can follow along and build it yourself! Clone the repo, and run the app locally. Repo: the example lives in reka-restaurants inside: github.com/reka-ai/api-examples-typescript Watch the video
Get the code and setup Prerequisite: Node.js 18+ and npm.
Clone the repo and install dependancies
cd reka-restaurants npm
cd reka-restaurants npm
cd reka-restaurants npm
Get your Reka API Key
In our recent End of Summer Updates , we announced that you can now sign-up for a 100% free API key! You can use this key to experiment with Reka Research and build your own applications. Get you free key by following these steps: Visit the Reka Platform dashboard
Open “API keys” in the left nav
Create a new key (e.g., “reka-restaurants”) and copy it
Configure your environment
export REKA_API_KEY = ""
export REKA_API_KEY = ""
export REKA_API_KEY = ""
Run the app
npm run build npm start
npm run build npm start
npm run build npm start
Try the app in your browser
Open http://localhost:5173 and try a query like "sushi".
The OpenAI‑compatible client In src/server.ts , the constant reka_research is the OpenAI‑compatible client for Reka: const reka_research = new OpenAI ( { apiKey : process . env . REKA_API_KEY , baseURL : 'https://api.reka.ai/v1' } , ) ;
const reka_research = new OpenAI ( { apiKey : process . env . REKA_API_KEY , baseURL : 'https://api.reka.ai/v1' } , ) ;
const reka_research = new OpenAI ( { apiKey : process . env . REKA_API_KEY , baseURL : 'https://api.reka.ai/v1' } , ) ;
This makes it trivial to swap in Reka Research without changing your app stack. You only need to change the model to reka-flash-research and the baseURL. Structured outputs A great feature of Reka Research is the ability to specify the response format. This is extremely useful when you want to use the output directly in your application without additional parsing or processing. In our current example, by defining the expected answer to be a list of restaurants with the following information: name, cuisine type, address, price range, rating, url, why it was selected, that is exactly what we get back. This list can then be used directly by our application, saved to a database, or displayed to users, without any additional parsing or processing. Even better, specifying the schema helps guide the model to produce more accurate and relevant results. The Reka Restaurant backend defines a response schema RestaurantItemSchema that the model must follow: const RestaurantItemSchema = z . object ( { name : z . string ( ) , cuisine : z . string ( ) , address : z . string ( ) , neighborhood : z . string ( ) . nullable ( ) , approx_price : z . enum ( [ "$" , "$$" , "$$$" , "$$$$" ] ) . nullable ( ) , rating : z . number ( ) . nullable ( ) , distance_km : z . number ( ) . nullable ( ) , url : z . string ( ) . nullable ( ) , why : z . string ( ) . nullable ( ) , } ) ;
const RestaurantItemSchema = z . object ( { name : z . string ( ) , cuisine : z . string ( ) , address : z . string ( ) , neighborhood : z . string ( ) . nullable ( ) , approx_price : z . enum ( [ "$" , "$$" , "$$$" , "$$$$" ] ) . nullable ( ) , rating : z . number ( ) . nullable ( ) , distance_km : z . number ( ) . nullable ( ) , url : z . string ( ) . nullable ( ) , why : z . string ( ) . nullable ( ) , } ) ;
const RestaurantItemSchema = z . object ( { name : z . string ( ) , cuisine : z . string ( ) , address : z . string ( ) , neighborhood : z . string ( ) . nullable ( ) , approx_price : z . enum ( [ "$" , "$$" , "$$$" , "$$$$" ] ) . nullable ( ) , rating : z . number ( ) . nullable ( ) , distance_km : z . number ( ) . nullable ( ) , url : z . string ( ) . nullable ( ) , why : z . string ( ) . nullable ( ) , } ) ;
When you submit a query, the agent performs web searches to gather relevant information. This may result in searching more websites to make sure all relevant information is found. The agent then opens and analyzes the content of these pages to extract the required details about each restaurant. Finally, it compiles this information into a structured list that adheres to the defined schema. Grounding results with the user’s location Instead of requiring users to type “near me” or specify a city, the app automatically uses the browser’s location to populate the API’s location parameter. This enables more accurate, relevant restaurant recommendations and a smoother user experience. app . post ( '/api/recommendations' , async ( req : Request , res : Response ) => { try { const user_query : string = ( req . body ?. query ?? '' ) . toString ( ) ; const loc : ApproxLocation = { country : req . body ?. location ?. country ?? null , city : req . body ?. location ?. city ?? null , region : req . body ?. location ?. region ?? null , timezone : req . body ?. location ?. timezone ?? null , } ;
app . post ( '/api/recommendations' , async ( req : Request , res : Response ) => { try { const user_query : string = ( req . body ?. query ?? '' ) . toString ( ) ; const loc : ApproxLocation = { country : req . body ?. location ?. country ?? null , city : req . body ?. location ?. city ?? null , region : req . body ?. location ?. region ?? null , timezone : req . body ?. location ?. timezone ?? null , } ;
app . post ( '/api/recommendations' , async ( req : Request , res : Response ) => { try { const user_query : string = ( req . body ?. query ?? '' ) . toString ( ) ; const loc : ApproxLocation = { country : req . body ?. location ?. country ??...
Excerpt shown — open the source for the full document.
Notability
notability 5.0/10Substantive how-to post, not a major release or research.