Give your AI coding assistant the knowledge to work with the Portkey SDK by installing our official skills. This enables AI agents to understand Portkey's APIs, patterns, and best practices when helping you write code.
Install Portkey skills in your project:
npx add-skill portkey-ai/skillsOr install a specific skill:
# Python SDK skill
npx add-skill portkey-ai/skills --skill portkey-python-sdk
# TypeScript SDK skill
npx add-skill portkey-ai/skills --skill portkey-typescript-sdkThe skills work with any AI coding assistant that supports the Agent Skills format:
| Assistant | Status |
|---|---|
| Claude Code | ✅ Supported |
| Cursor | ✅ Supported |
| OpenCode | ✅ Supported |
| GitHub Copilot | ✅ Supported |
| Codex | ✅ Supported |
| Amp | ✅ Supported |
| Roo Code | ✅ Supported |
Teaches your AI assistant how to use the Portkey Python SDK, including:
- SDK installation and configuration
- Chat completions and streaming
- Observability and tracing
- Caching, fallbacks, and load balancing
- Multi-provider routing
- Error handling patterns
Teaches your AI assistant how to use the Portkey TypeScript SDK, including:
- SDK installation and configuration
- Chat completions and streaming
- Observability and tracing
- Caching, fallbacks, and load balancing
- Multi-provider routing
- Error handling patterns
npx add-skill portkey-ai/skills --listInstalls skills to your current project directory:
npx add-skill portkey-ai/skillsInstalls skills globally so they're available across all your projects:
npx add-skill portkey-ai/skills --globalInstall for a specific AI coding assistant only:
npx add-skill portkey-ai/skills --agent cursor
npx add-skill portkey-ai/skills --agent claudeIf you prefer to install manually, copy the skill files to your project's skills directory:
mkdir -p .claude/skills/portkey-python-sdk
curl -o .claude/skills/portkey-python-sdk/SKILL.md \
https://raw.githubusercontent.com/portkey-ai/skills/main/skills/portkey-python-sdk/SKILL.mdmkdir -p .cursor/skills/portkey-python-sdk
curl -o .cursor/skills/portkey-python-sdk/SKILL.md \
https://raw.githubusercontent.com/portkey-ai/skills/main/skills/portkey-python-sdk/SKILL.mdPortkey is an AI Gateway that provides:
- Unified API: Single API to access 200+ LLM providers
- Observability: Complete visibility into LLM requests, costs, and performance
- Reliability: Automatic fallbacks, retries, and load balancing
- Caching: Reduce costs with semantic and simple caching
- Guardrails: Input/output validation and content moderation
After installing the skill, your AI assistant can help you with tasks like:
"Help me set up Portkey with OpenAI fallback to Anthropic"
from portkey_ai import Portkey
client = Portkey(
api_key="YOUR_PORTKEY_API_KEY",
config={
"strategy": {"mode": "fallback"},
"targets": [
{"virtual_key": "openai-key"},
{"virtual_key": "anthropic-key"}
]
}
)
response = client.chat.completions.create(
messages=[{"role": "user", "content": "Hello!"}]
)"Add request tracing to my Portkey calls"
response = client.chat.completions.create(
messages=[{"role": "user", "content": "Hello!"}],
metadata={
"trace_id": "my-trace-123",
"user_id": "user-456"
}
)To get the latest SDK documentation, re-run the install command:
npx add-skill portkey-ai/skillsContributions are welcome! Please see our contributing guidelines.
Apache 2.0 - See LICENSE for details.