---
title: "What is Portkey?"
description: Portkey AI is a comprehensive platform designed to streamline and enhance AI integration for developers and organizations. It serves as a unified interface for interacting with over 250 AI models, offering advanced tools for control, visibility, and security in your Generative AI apps.
mode: "wide"
---

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

Here's a product walkthrough (3 mins):

<iframe width="100%" height="400px" src="https://www.youtube.com/embed/DBGeYByV5zc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

### Integrate in 3 Lines of Code

<CodeGroup>

```Python Python
from portkey_ai import Portkey

portkey = Portkey(
    api_key="YOUR_PORTKEY_API_KEY",
    provider="@YOUR_PROVIDER"
)

chat_complete = portkey.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)
print(chat_complete.choices[0].message.content)
```

```js NodeJS
import Portkey from 'portkey-ai';

const portkey = new Portkey({
  apiKey: "YOUR_PORTKEY_API_KEY",
  provider:"@YOUR_PROVIDER"
});

async function createChatCompletion() {
  const chat_complete = await portkey.chat.completions.create({
    model: "gpt-3.5-turbo",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Hello!" }
    ]
  });
  console.log(chat_complete.choices[0].message.content);
}

createChatCompletion();
```

```sh REST API
curl https://api.portkey.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-portkey-api-key: YOUR_PORTKEY_API_KEY" \
  -H "x-portkey-provider: YOUR_PROVIDER" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'
```

```py OpenAI Python SDK
from openai import OpenAI
from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders

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

chat_complete = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)
print(chat_complete.choices[0].message.content)
```

```js OpenAI NodeJS SDK
import OpenAI from 'openai';
import { PORTKEY_GATEWAY_URL, createHeaders } from 'portkey-ai';

const openai = new OpenAI({
  apiKey: 'YOUR_OPENAI_API_KEY',
  baseURL: PORTKEY_GATEWAY_URL,
  defaultHeaders: createHeaders({
    provider: "openai",
    apiKey: "YOUR_PORTKEY_API_KEY"
  })
});

async function createChatCompletion() {
  const chat_complete = await openai.chat.completions.create({
    model: "gpt-3.5-turbo",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Hello!" }
    ]
  });
  console.log(chat_complete.choices[0].message.content);
}

createChatCompletion();
```
</CodeGroup>

<Check>
  While you're here, why not [give us a star](https://git.new/ai-gateway-docs)? It helps us a lot!
</Check>

### FAQs

<AccordionGroup>
  <Accordion title="Will Portkey increase the latency of my API requests?">
    Portkey is hosted on edge workers throughout the world, ensuring minimal latency. Our benchmarks estimate a total latency addition between 20-40ms compared to direct API calls. This slight increase is often offset by the benefits of our caching and routing optimizations.

    Our edge worker locations:
<Frame>
  <img src="/images/welcome/welcome-4.avif"  />
</Frame>
  </Accordion>
  <Accordion title="Is my data secure?">
    Portkey AI is ISO:27001 and SOC 2 certified, and GDPR & HIPAA compliant. We maintain best practices for service security, data storage, and retrieval. All data is encrypted in transit and at rest using industry-standard AES-256 encryption. For enhanced security, we offer:
    1. On request, we can enable a feature that does NOT store any of your request and response body objects in Portkey datastores or our logs.
    2. For enterprises, we offer managed hosting to deploy Portkey inside private clouds.

    For more information on these options, contact us at support@portkey.ai.
  </Accordion>
  <Accordion title="Will Portkey scale if my app explodes?">
    Portkey is built on scalable infrastructure and can handle millions of requests per minute with very high concurrency. We currently serve over 25M requests daily with a 99.99% uptime. Our edge architecture & scaling capabilities ensure we can accommodate sudden spikes in traffic without performance degradation.

    <a href="https://status.portkey.ai">View our Status Page</a>
  </Accordion>
  <Accordion title="Does Portkey impose timeouts on requests?">
    We *DO NOT* impose any explicit timeout for our free OR paid plans currently. While we don't time out requests on our end, we recommend implementing client-side timeouts appropriate for your use case to handle potential network issues or upstream API delays.
  </Accordion>
  <Accordion title="Do you support SSO?">
    Yes! We support SSO with any custom OIDC provider.
  </Accordion>
  <Accordion title="What are the pricing options? Is there a free trial?">
    Portkey's Gateway is open source and free to use.
    On managed version, Portkey offers a free plan with 10k requests per month. We also offer paid plans with more requests and additional features.
  </Accordion>
  <Accordion title="Where can I reach you?">
    We're available all the time on <a href="https://discord.gg/DD7vgKK299">Discord</a>, or on our support email - <a href="mailto:support@portkey.ai">support@portkey.ai</a>
  </Accordion>
</AccordionGroup>
