perplexity-sdk-patterns

Installation
SKILL.md

Perplexity SDK Patterns

Overview

Production-ready patterns for Perplexity Sonar API. Since Perplexity uses the OpenAI wire format, you build wrappers around the openai client library with Perplexity-specific response handling (citations, search results, related questions).

Prerequisites

  • openai package installed (npm install openai or pip install openai)
  • API key configured in PERPLEXITY_API_KEY
  • Understanding of OpenAI chat completions format

Instructions

Step 1: Typed Client Singleton (TypeScript)

// src/perplexity/client.ts
import OpenAI from "openai";
Installs
2
GitHub Stars
2.7K
First Seen
1 day ago
perplexity-sdk-patterns — jeremylongshore/tons-of-skills-marketplace