using-perplexity-platform

using-perplexity-platform is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/fortiumpartners/ensemble/using-perplexity-platform
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00056 $0.02863
Opus 5 $0.00028 $0.01432
Sonnet 5 $0.00011 $0.00573
Haiku 4.5 $0.00006 $0.00286

Measured 4d ago against content hash 48a3456b566f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (11 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 2,863 once invoked, about $0.0003 per session on Opus 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

debugging-output-and-previewing-html-using-ray

Use when user says "send to Ray," "show in Ray," "debug in Ray," "log to Ray," "display in Ray," or wants to visualize data, debug output, or show diagrams in the Ray desktop application.

coollabsio/coolify · 58 tokens

rust-system-calls

Guides using bunsys for system calls and file I/O in Rust. Use when implementing file operations, opening fds, or any syscall path instead of std::fs or libc.

oven-sh/bun · 42 tokens

write-a-prd

Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.

webiny/webiny-js · 51 tokens

doncheli-context-health

Report the current state of the context window and recommend compression or cleanup actions. Activate when user mentions "context health", "context window", "how much context", "context full", "running out of context", "compress context".

doncheli/don-cheli-sdd · 52 tokens

mongoose-adapter

Wiring @kavo/mongoose into a Nest app — models as entity identities, ObjectId rendered as hex strings and id-keyed DTOs, declared soft delete, ref paths as relation and foreign key at once, and the cross-relation filter that is refused. Use when adding Kavo to a Mongoose/MongoDB project, or answering "how do I use…

kavo-labs/kavo · 97 tokens

task-control-doc

Use when the user wants a master control document for a large, complex, long-running, or multi-session task. Defines how to create a task control doc that captures background, mandatory reads, subtask breakdown, and self-contained work packages so each subtask can be executed in a fresh session with minimal context.

BackToCimaCoppi/Praxis · 66 tokens