using-perplexity-platform

using-perplexity-platform is a skill for Claude Code from FortiumPartners/ensemble. It costs 56 tokens per session (2,863 once invoked), scanned A, original, MIT.

Development guidance for Perplexity's Sonar API, a service that combines AI-generated answers with live web searches and source citations. It covers Python and TypeScript/JavaScript clients and an OpenAI-compatible chat interface.

In plain words
What is it for?
Use it to build research assistants, search-based chatbots, and other applications that need up-to-date, cited web information.
Why use it?
It helps when an AI application needs current information instead of relying only on older training data. It also explains how to return sources with answers.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the ensemble-ai plugin — 5 skills shipped together

Good fit Use it to build research assistants, search-based chatbots, and other applications that need up-to-date, cited web information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fortiumpartners/ensemble/using-perplexity-platform
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add FortiumPartners/ensemble --skill using-perplexity-platform
Clone the repo
git clone --depth 1 https://github.com/FortiumPartners/ensemble

Made for: Claude Code.

Or install ensemble-ai, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-perplexity-platform

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortiumpartners/ensemble/using-perplexity-platform/github.svg)](https://agentmods.dev/skills/fortiumpartners/ensemble/using-perplexity-platform)
Your own site
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/using-perplexity-platform"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/using-perplexity-platform/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-perplexity-platform

Your own site · 80×15
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/using-perplexity-platform"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/using-perplexity-platform.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.02863
Opus 5.5 $0.00022 $0.01145
Sonnet 5.5 $0.00011 $0.00573
Haiku 4.5 $0.00006 $0.00286

Measured 1mo ago against content hash 48a3456b566f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-perplexity-platform scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (examples/basic-chat.example.py, examples/citations.example.py, examples/research-assistant.example.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.perplexity.ai/chat/completions \
packages/ai/skills/using-perplexity-platform/SKILL.md · 438 lines

How it starts

The opening of the file, as written. The whole thing — 438 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Perplexity Sonar API Development Skill

Quick Reference

Perplexity Sonar API development with Python and TypeScript/JavaScript clients. Covers Sonar model family for search-augmented generation, Chat Completions API (OpenAI-compatible), real-time web search, citations, and streaming.


Table of Contents

  1. When to Use
  2. Sonar Model Family
  3. Quick Start
  4. Chat Completions API
  5. Citations and Sources
  6. Search Configuration
  7. Streaming
  8. Error Handling
  9. Best Practices
  10. Anti-Patterns
  11. Integration Checklist
  12. When to Use Perplexity vs Others
  13. CLI Quick Test
  14. See Also

When to Use

This skill is loaded by backend-developer when:

  • openai package in requirements.txt or pyproject.toml with Perplexity base URL
  • Environment variables PERPLEXITY_API_KEY or PPLX_API_KEY present
  • User mentions "Perplexity", "Sonar", or "search-augmented" in task
  • Code uses api.perplexity.ai base URL

Minimum Detection Confidence: 0.8 (80%)


Sonar Model Family

Available Models

Model Context Search Use Case Speed
sonar 128K Yes General search-augmented Fast
sonar-pro 200K Yes Complex research, deeper search Medium
sonar-reasoning 128K Yes Multi-step reasoning with search Slower
sonar-reasoning-pro 200K Yes Advanced reasoning, citations Slowest

Model Selection Guide

Task Complexity -> Model Selection
+-- Simple factual queries     -> sonar (fast, affordable)
+-- Research with citations    -> sonar-pro (deeper search)
+-- Multi-step reasoning       -> sonar-reasoning
+-- Complex analysis           -> sonar-reasoning-pro

Read the full file on GitHub · 438 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 438 lines · 56 tokens per session scan A 48a3456b566f

Subscribe to this mod's changes

using-perplexity-platform is a skill published in the GitHub repository FortiumPartners/ensemble (12 stars, last pushed 6d ago), licensed MIT. It adds 56 tokens to every session and 2,863 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

llm-provider

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending…

caliber-ai-org/ai-setup · 100 tokens

nodejs

Use when building or operating a plain Node.js / Express 5 backend service: project layout, async correctness, central error middleware, fail-fast config, graceful shutdown on SIGTERM. NOT DI modules/providers/guards (that is nestjs), NOT the type system or tsconfig (that is typescript), NOT REST contract design (that…

ericrisco/rsc-harness · 77 tokens

arkcli-infer-endpoint

A manager for inference endpoints, the online addresses used to send requests to deployed AI models. It can work with endpoints created by the current SSO sub-user, which is a separately identified account user.

volcengine/ark-cli · 258 tokens

webiny-api-cms-content-models

Creating Headless CMS content models via code using the ModelFactory pattern. Use this skill when the developer wants to create, modify, or understand content model definitions, define fields and validators, set up reference fields between models, configure field layouts (including nested layouts inside object or…

webiny/webiny-js · 313 tokens

webiny-form-model

Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with tabs/rows/separators, add validation (Zod or…

webiny/webiny-js · 93 tokens