portkey-typescript-sdk

portkey-typescript-sdk

Integrate Portkey AI Gateway into TypeScript/JavaScript applications. Use when building LLM apps with observability, caching, fallbacks, load balancing, or routing across 200+ LLM providers.

0Sterne
0Forks
Aktualisiert 1/19/2026
SKILL.md
readonlyread-only
name
portkey-typescript-sdk
description

Integrate Portkey AI Gateway into TypeScript/JavaScript applications. Use when building LLM apps with observability, caching, fallbacks, load balancing, or routing across 200+ LLM providers.

version
"1.0.0"

Portkey TypeScript SDK

When to use this skill

Use this skill when:

  • The user wants to integrate Portkey into a TypeScript or JavaScript application
  • The user needs LLM observability, caching, or reliability features
  • The user wants to route requests across multiple LLM providers
  • The user mentions "Portkey", "AI gateway", or "LLM observability" in Node.js/TS context

Installation

npm install portkey-ai
# or
yarn add portkey-ai
# or
pnpm add portkey-ai

Quick Start

import Portkey from 'portkey-ai';

const client = new Portkey({
  apiKey: 'YOUR_PORTKEY_API_KEY',
  virtualKey: 'YOUR_VIRTUAL_KEY', // Optional: for provider routing
});

const response = await client.chat.completions.create({
  model: 'gpt-4',
  messages: [
    { role: 'user', content: 'Hello!' }
  ],
});

console.log(response.choices[0].message.content);

You Might Also Like

Related Skills

gog

gog

169Kdev-api

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

openclaw avataropenclaw
Holen
weather

weather

169Kdev-api

Get current weather and forecasts (no API key required).

openclaw avataropenclaw
Holen

Guide for implementing oRPC contract-first API patterns in Dify frontend. Triggers when creating new API contracts, adding service endpoints, integrating TanStack Query with typed contracts, or migrating legacy service calls to oRPC. Use for all API layer work in web/contract and web/service directories.

langgenius avatarlanggenius
Holen
blucli

blucli

92Kdev-api

BluOS CLI (blu) for discovery, playback, grouping, and volume.

moltbot avatarmoltbot
Holen
ordercli

ordercli

92Kdev-api

Foodora-only CLI for checking past orders and active order status (Deliveroo WIP).

moltbot avatarmoltbot
Holen
gifgrep

gifgrep

92Kdev-api

Search GIF providers with CLI/TUI, download results, and extract stills/sheets.

moltbot avatarmoltbot
Holen