---
title: "Connecting to AI Gateway | Hostman Docs"
description: "Learn how to connect to AI Gateway on Hostman: creating and deleting API keys, and getting connection details for your chosen model and language."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

To connect to AI Gateway, go to the **AI Gateway** tab in the **AI Agents** section.

## Creating an API Key

AI Gateway uses separate keys that aren't linked to your account level API keys.

> [!NOTE]
> Each API key is billed separately and costs $0.01 per month.

To create a key:

1.  Go to **AI Agents** → **AI Gateway**.
2.  Click **Create key**.
3.  Enter a name for the key and select the validity period.
4.  (Optional) Add a description that will show in the dashboard.
5.  (Optional) Select the project.
6.  Click **Create**.

![AI Agents 06 11 2026 12 16 Pm](https://content.hostman.com/assets/2af9c738-dd28-4a03-be1a-e81c6089c106.png?width=1749&height=866)

7.  Copy the generated key and store it locally.

## Deleting an API Key

To delete an API key:

1.  Go to **AI Agents** → **AI Gateway**.
2.  Open the **API Keys** tab.
3.  Click the three dot menu next to the key you want to remove.
4.  Click **Delete**.
5.  Confirm the action.

![AI Agents 06 15 2026 04 18 Pm](https://content.hostman.com/assets/382a6b63-4f0f-436d-bf84-abbf3a958150.png?width=1408&height=809)

## Getting Connection Details

You can find the connection details in the **Connection** tab.

1.  Go to **AI Agents** → **AI Gateway**.
2.  Open the **Connection** tab.
3.  Select a model and a programming language. The interface will show the input and output token pricing for the selected model.
4.  Copy the code sample for connecting and the command for installing the OpenAI library.

![AI Agents 06 15 2026 04 19 Pm](https://content.hostman.com/assets/9d0ce12b-07d9-4db9-b6c6-87acc78b7fe8.png?width=1410&height=1493)
