Portkey AI Gateway integration for Perplexity Sonar models with advanced features including citation retrieval, domain filtering, recency controls, image results, and multi-SDK compatibility (Python, TypeScript, OpenAI, cURL).
## Overview Portkey provides an AI Gateway that routes requests to Perplexity's Sonar models with added observability, prompt management, and reliability features. Supports both sonar and sonar-pro models with 127K token context. ## Key Features - **Citation Retrieval**: Get source citations by disabling strict OpenAI compliance - **Domain Filtering**: Whitelist or blacklist specific domains for citations - **Recency Controls**: Filter by month, week, day, or hour for fresh results - **Search Context Size**: Control depth with low, medium, or high settings - **Image Results**: Retrieve relevant images alongside text responses (beta) - **Related Questions**: Generate follow-up question suggestions (beta) ## Supported Models - sonar: 127K context, real-time search - sonar-pro: 127K context, advanced reasoning ## Integration Methods - Python SDK - TypeScript/JavaScript SDK - OpenAI-compatible client - cURL requests - Responses API format ## Setup 1. Access Portkey dashboard → Model Catalog → Add Provider 2. Select Perplexity AI, enter API key 3. Name the provider (e.g., "perplexity-ai") 4. Use provider name in API calls Includes observability dashboards, cost tracking, and fallback routing.
Reads and summarizes scientific papers in plain language
Monitors supply chain disruptions and logistics developments globally
Analyzes job market conditions, salary trends, and skill demand
Monitors clinical trials for specific conditions or treatments
Monitors content for outdated information and suggests updates
Collects cybersecurity threat intelligence from open sources