Nexus

Perplexity

Use Perplexity's search-augmented generation models with Nexus.

Perplexity provides search-augmented generation models that combine LLM capabilities with real-time web search. Uses an OpenAI-compatible API.

Installation

import "github.com/xraph/nexus/providers/perplexity"

Quick Start

provider := perplexity.New(os.Getenv("PERPLEXITY_API_KEY"))

gw := nexus.New(
    nexus.WithProvider(provider),
)

Options

OptionDescription
perplexity.WithBaseURL(url)Override the API base URL (default: https://api.perplexity.ai)

Capabilities

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsNo
VisionNo
ToolsNo
ThinkingNo

Models

ModelContextMax OutputInput PriceOutput Price
sonar-pro127K4,096$3.00/M$15.00/M
sonar127K4,096$1.00/M$1.00/M
sonar-reasoning127K4,096$1.00/M$5.00/M

On this page