Learning resourcesReviewed · Perplexity

Perplexity with OpenCode

Perplexity with OpenCode is Perplexity's setup guide for developers who want to use models from OpenAI, Anthropic, Google, xAI and Perplexity inside OpenCode, an open-source AI coding agent, through one Perplexity Agent API key and endpoint. It requires a Responses API provider connection and gives no usage prices. It explains provider configuration, default model selection and assigning different models to coding and research agents.

Researched 14 Nov 2026

In short.

Perplexity with OpenCode is a configuration guide for developers who want multiple AI model providers inside OpenCode through one Perplexity key, but compatibility and usage costs remain unverified. Its central instruction is to use a Responses API provider pointed at Perplexity’s /v1/responses endpoint. It includes configuration examples for model selection and separate coding and research agents. Nothing was executed, so the examples establish documented setup instructions rather than successful operation or measured performance.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected page at [https://docs.perplexity.ai/docs/getting-started/integrations/opencode.md], including its setup instructions, provider configuration, model examples, multi-agent example and warning about the unsupported Chat Completions route. Linked pages and the documentation index are excluded. No code, commands or API requests were executed, and runtime compatibility, current availability, pricing, performance and complete permission enforcement remain unverified.

The overview

Identity

This Perplexity documentation page explains how to connect the Perplexity Agent API to OpenCode, which it describes as an open-source coding agent for terminal, IDE and desktop use. The source address is [https://docs.perplexity.ai/docs/getting-started/integrations/opencode.md].

Assessment

The guide is useful for developers who want to configure several model providers through one Perplexity account. Its strongest practical detail is the distinction between the required Responses API connection and a Chat Completions connection that the page says will return 404.

The configuration is concrete enough to attempt, but the page provides no execution results, compatibility matrix or performance measurements. Its model recommendations do not establish which model will work best for a particular codebase.

Users

The intended users are OpenCode developers choosing a default coding model or assigning different models to specialized agents. Beginners will need to work with shell environment variables and JSON configuration. Experienced developers may find the endpoint, provider package and model identifier conventions particularly useful.

Capabilities

The page describes adding explicitly declared models to OpenCode’s model selector, choosing a default model and assigning separate models to primary agents and subagents. It advertises access to models from OpenAI, Anthropic, Google, xAI and Perplexity through the Agent API.

The examples demonstrate the intended configuration structure. Current model availability, feature coverage and successful switching between models are not established.

Using it

Requirements

The documented prerequisites are an OpenCode installation, a Perplexity API key and access to OpenCode’s JSON configuration. The key is exposed through the PERPLEXITY_API_KEY environment variable and referenced in configuration as {env:PERPLEXITY_API_KEY}.

The page points to installation guidance for macOS, Linux and Windows. It does not specify minimum OpenCode or provider-package versions, hardware requirements or account eligibility conditions.

Mechanism

OpenCode’s custom provider connects through @ai-sdk/open-responses to [https://api.perplexity.ai/v1/responses]. The sample provider is named perplexity-agent and includes the API-key reference, model declarations and an X-Pplx-Integration header.

OpenCode identifies a model using the provider identifier followed by the model identifier. The page also names @ai-sdk/openai with its .responses() method as an option. It explicitly warns against @ai-sdk/openai-compatible because that package targets /v1/chat/completions, which the page says is not a valid Agent API route.

Setup

The documented sequence is to install OpenCode, create a Perplexity API key at [https://console.perplexity.ai/project/keys], export PERPLEXITY_API_KEY and add the custom provider configuration. The page names opencode.json and ~/.config/opencode/config.json as configuration locations.

Declare the desired model identifiers under the provider and use /models to check whether they appear. For a multi-agent configuration, the page additionally suggests /agents to check the agent list. These commands are suggested checks; no successful result is supplied.

Example

The multi-agent example assigns perplexity-agent/anthropic/claude-opus-5-5 to a primary coder and perplexity-agent/openai/gpt-5.6-sol to a researcher subagent. These are identifiers shown in the captured page; their current availability is unknown.

The coder enables write, edit and bash. The researcher disables those three tools for lookup and summarization work. Those settings show the intended division of responsibilities but do not establish complete isolation or the permissions of every possible tool.

Assessment & evidence

Limitations

The guide does not establish supported version combinations, rate limits, context limits, retry behavior or troubleshooting beyond the API-route warning. It also does not show whether all listed models support the same tool-use and configuration features.

No installation, API request, coding task or multi-agent session was executed. Reliability, latency, code quality and the effectiveness of the researcher’s tool restrictions remain unassessed.

Reasoning

A shared endpoint and credential could reduce account and configuration work when changing models; that is an inference from the documented design. It does not establish identical behavior across providers.

The page assigns models to roles such as architecture review, fast edits and long-context refactoring, but gives no benchmark methods or results. These labels can guide an initial comparison, but they do not support a quality or value ranking.

Alternatives

For the same API connection, the page names @ai-sdk/openai with .responses() as an alternative to @ai-sdk/open-responses, although it only supplies a full configuration for the latter.

For direct API use, it links to the Perplexity SDK at [https://docs.perplexity.ai/docs/sdk/overview.md] and describes access to effort levels and tools. The linked SDK documentation is outside the evidence, so its setup and tradeoffs are not assessed.

Evidence

The evidence consists of the complete Perplexity documentation page at [https://docs.perplexity.ai/docs/getting-started/integrations/opencode.md]. It contains setup instructions, configuration examples, model-role descriptions and suggested verification commands.

This supports an explanation of the documented integration. It provides no independent operational results. Linked installation instructions, model pricing, compatibility documentation, SDK documentation and FAQs are excluded.

Access & freshness

Costs

Usage costs are unknown. The page supplies no numerical model prices, free allowance, subscription requirements or task-cost examples. Descriptions such as cheap and low-cost are not quantified.

It links to a model catalog with pricing at [https://docs.perplexity.ai/docs/agent-api/models.md], but that linked page is outside the available evidence. The cost of the multi-agent example is also unknown.

Rights

The page describes OpenCode as open source but provides no license text or specific license identifier. It does not establish redistribution rights for the documentation or configuration examples.

Perplexity’s service terms, rights in generated code and data-handling terms are not supplied. Those rights and obligations cannot be determined from this page.

Freshness

The page was captured on 14 November 2026 at 21:31:13.819 UTC. The supplied page text gives no publication date, last-update date or pinned dependency versions.

Model identifiers, availability, prices and configuration compatibility may change. Their status after the capture is unknown.

Actions

Before adopting the integration, confirm a desired model’s current identifier and price in the linked catalog. Follow the documented Responses API configuration, then check /models and, if applicable, /agents.

Use a representative coding task to assess tool behavior, output quality and actual charges before choosing a default model. Review the applicable software license and API terms where those affect your intended use.

Evidence for this report

selected-page.txtselected · checked 2026-11-14