> For the complete documentation index, see [llms.txt](https://docs.jetpero.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetpero.com/basics/integrations.md).

# Integrations

<figure><img src="https://gitbookio.github.io/onboarding-template-images/integrations-hero.png" alt=""><figcaption></figcaption></figure>

***

### 🔧 **How to Integrate a Provider via JetPero**

JetPero simplifies API integrations by providing pre-configured templates for various services. Instead of manually setting up each connection, follow these simple steps to integrate a provider:

1. Select the project you want to integrate (e.g., `abc.co`).
2. **Go to your Admin Panel → Add new API**
3. From the list of supported providers, select the **provider** you want to integrate (e.g., OpenAI, ElevenLabs, etc.).
4. Enter your **provider’s API key** (only needed for the first time setup, JetPero securely stores it afterward).
5. Choose the **integration template** that matches the provider’s functionality (e.g., **OpenAI - ChatGPT**, **OpenAI - Image Generation**).
6. Review the settings, and **save the integration**.

JetPero will then automatically configure the connection, so you don’t have to worry about manually setting up the endpoint URLs or authorization headers.

***

### ⚙️ **Automated Configuration Templates**

We’ve pre-configured integration templates for various providers to help speed up your setup. These templates handle all the heavy lifting of connecting to the provider’s API, including setting the right endpoints, headers, and parameters.

For example, if you’re integrating **OpenAI**:

1. Select **OpenAI - Chat Completion** in the integration template list.
2. The system auto-configures the base url to `https://api.openai.com/v1/model`.
3. JetPero automatically sets the necessary authorization and headers, ensuring that you don’t need to manually enter or expose your API key.

***

### 🏗️ **Working with Custom Integrations**

If JetPero doesn’t have an out-of-the-box template for your specific provider, you can easily create a custom integration:

1. Go to **Admin Panel→ Add new API → Custom Configure**.
2. Enter the **Base URL**, **API key**, and choose the **authentication method** (e.g., API key, OAuth).
3. JetPero will create the integration and let you configure it with the needed endpoints.

***

### 🔐 **Security & Token Handling**

Once your integration is set up, JetPero ensures secure token management by storing API keys and tokens **only in the project’s environment**, keeping them safe from any frontend exposure.

For each project, JetPero uses the **project-specific token** for authentication. This means each project’s API keys and configurations are securely isolated.

***

### 💡**Example Use Cases:**

1. **Connecting OpenAI for Chat Completion**

To call OpenAI’s `chat/completions` endpoint via JetPero’s proxy, use the following request:

```bash
curl https://api.jetpero.com/proxy/openai/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <Your-Project-Token>" \
  -d '{
    "model": "gpt-4",
    "messages": [
      {"role": "user", "content": "Hello, who are you?"}
    ]
  }'
```

2. **Connecting OpenAI for Image Generation**

```bash
curl https://api.jetpero.com/proxy/openai/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <Your-Project-Token>" \
  -d '{
    "prompt": "A futuristic cityscape at sunset",
    "n": 1,
    "size": "1024x1024"
  }'
```

In both examples, JetPero uses the **project token** for secure API access, and you don’t need to worry about provider key management.

### 🔄 **Rotating and Managing API Keys**

If needed, you can **rotate** or **revoke** your provider's API keys at any time:

1. Go to your Admin panel **→ Under API key table**.
2. Click **Edit** on the provider you want to update.
3. Change the **API key**, and save.
4. JetPero will automatically update the integration for you.

> ⚠️ **Important:** Rotating or revoking the API key will require you to update the provider in your project settings to ensure continued operation of the integration.

***

### 🧑‍💻 **Need Help?**

***

Need help? Contact us anytime via the **Support** section in your dashboard or email <jetpero.io@gmail.com>
