Perplexity Search API on Vercel AI Gateway

You can now use the Perplexity Search API to add real-time web search to any model from any provider via Vercel AI Gateway. No additional API keys required.

import { gateway } from 'ai';

const result = await generateText({
  model: gateway('openai/gpt-4o'),
  tools: {
    perplexity_search: gateway.tools.perplexitySearch()
  },
  prompt: 'What are the latest AI developments?'
});

Read more: Use Perplexity Web Search with Vercel AI Gateway