What is Portkey?

Teams use Portkey to improve the cost, performance, and accuracy of their Gen AI apps.

It takes <2 mins to integrate and with that, it already starts monitoring all of your LLM requests and also makes your app resilient, secure, performant, and more accurate at the same time.

Here's a product walkthrough (3 mins):


Integrate in 3 Lines of Code

# pip install portkey-ai

from openai import OpenAI
from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders

client = OpenAI(
    base_url=PORTKEY_GATEWAY_URL,
    default_headers=createHeaders(provider="openai", api_key="PORTKEY_API_KEY")
)

chat_complete = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Say this is a test"}],
)

print(chat_complete.choices[0].message.content)
pageMake Your First Request

✨ Product Features

Jump to the product section to learn more about the Portkey modules and the use cases they solve.

🚀 Quickstart

Setting up Portkey takes . Check out how.

📔 API Reference

Head to the API reference and code samples for all Portkey functionality available through REST APIs and SDKs

🤝 Integrations

Find the best integration for you with 0+ models across LLM providers and multiple frameworks.

Languages Supported

LanguageSupported Library

Javascript

Python

Go

Java

Rust

Ruby

AI Providers Supported

View all supported integration guides here

AI ProviderStatus
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic
fully supportedpublic

AI21

fully supportedpublic

AWS Bedrock

fully supportedpublic

AzureML

partially supported

BYOLLM

fully supportedpublic

Frameworks Supported

FrameworkStatus
nativepython
nativepython

Last updated