Router API
Create Chat Completion
Send a conversation to any Router model using the OpenAI Chat Completions schema. Set stream: true to receive server-sent events; add stream_options: {"include_usage": true} to get token usage in the final chunk.
Create Response
Generate a model response using the OpenAI Responses schema. Set stream: true to receive typed server-sent events followed by data: [DONE].
Create Message
Send a conversation to any Router model using the Anthropic Messages schema. Set stream: true to receive server-sent events. Authenticate with your Perplexity API key — both Authorization: Bearer and the Anthropic SDK’s default x-api-key header are accepted.
List Models
List the models available through the Router, sorted by id. Each model includes its base token prices in pricing (USD per 1M tokens).
Retrieve Model
Retrieve one model by id, including its base token prices. Model ids contain a / (for example perplexity/kimi-k3); pass the full id in the path.