> This page is for version v4.0.
> For other versions, use one of these documentation indexes:
> - v5.0 (default): https://humanloop.com/docs/v5/llms.txt
> - v4.0: https://humanloop.com/docs/v4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://humanloop.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/docs/_mcp/server.

> Learn how to create a Prompt in Humanloop using the UI or SDK, version it, and use it to generate responses from your AI models. Prompt management is a key part of the Humanloop platform.

Humanloop acts as a registry of your [Prompts](/docs/explanation/prompts) so you can centrally manage all their versions and [Logs](/docs/explanation/logs), and evaluate and improve your AI systems.

This guide will show you how to create a Prompt [in the UI](#create-a-prompt-in-the-ui) or [via the SDK/API](#create-a-prompt-using-the-sdk).

> **Note**
>
> **Prerequisite**: A Humanloop account.
>
> You can create an account now by going to the [Sign up page](https://app.humanloop.com/signup).

## Create a Prompt in the UI

### Create a Prompt File

When you first open Humanloop you’ll see your File navigation on the left. Click ‘**+ New**’ and create a **Prompt**.

![](/docs/_fern-img/3f3a31bcb3f309e84dc1366929bda597b1facf1a71dd3c533feed22a151c5cea.webp)

In the sidebar, rename this file to "Comedian Bot" now or later.

### Create the Prompt template in the Editor

The left hand side of the screen defines your Prompt – the parameters such as model, temperature and template. The right hand side is a single chat session with this Prompt.

![](/docs/_fern-img/e633d0c0bff79972631e8b3e632702cd099627b085abd9ece5bb5575796a24ca.webp)

Click the "**+ Message**" button within the chat template to add a system message to the chat template.

![](/docs/_fern-img/d33dd1581a919c68c935bb7eba5fdb744c92a538b6c837b841d77e3337ce33a8.webp)

Add the following templated message to the chat template.

```
You are a funny comedian. Write a joke about {{topic}}.
```

This message forms the chat template. It has an input slot called `topic` (surrounded by two curly brackets) for an input value that is provided each time you call this Prompt.

On the right hand side of the page, you’ll now see a box in the **Inputs** section for `topic`.

1. Add a value for`topic` e.g. music, jogging, whatever.
2. Click **Run** in the bottom right of the page.

This will call OpenAI’s model and return the assistant response. Feel free to try other values, the model is *very* funny.

You now have a first version of your prompt that you can use.

### Commit your first version of this Prompt

1. Click the **Commit** button
2. Put “initial version” in the commit message field
3. Click **Commit**

![](/docs/_fern-img/8766fc152bdfd237ca5829896a3e577ea2ce5a731f4a274175c7d76873e78b72.webp)

### View the logs

Under the Prompt File click ‘Logs’ to view all the generations from this Prompt

Click on a row to see the details of what version of the prompt generated it. From here you can give feedback to that generation, see performance metrics, open up this example in the Editor, or add this log to a dataset.

![](/docs/_fern-img/40aed344c0094cee5dc378c6bb5515d682b78ffcd8cbb11cf557b51113535e5d.webp)

---

## Create a Prompt using the SDK

The Humanloop Python SDK allows you to programmatically set up and version your [Prompts](/docs/prompts) in Humanloop, and log generations from your models. This guide will show you how to create a Prompt using the SDK.

> **Note**
>
> **Prerequisite**: A Humanloop SDK Key.
>
> You can get this from your [Organisation Settings page](https://app.humanloop.com/account/api-keys) if you have the [right permissions](/docs/reference/access-roles).

#### Install and initialize the SDK

First you need to install and initialize the SDK. If you have already done this, skip to the next section.

Open up your terminal and follow these steps:

1. Install the Humanloop SDK:

```python
pip install humanloop
```

```typescript
npm install humanloop
```

2. Initialize the SDK with your Humanloop API key (you can get it from the [Organization Settings page](https://app.humanloop.com/account/api-keys)).

```python
from humanloop import Humanloop
humanloop = Humanloop(api_key="<YOUR HUMANLOOP KEY>")

# Check that the authentication was successful
print(humanloop.prompts.list())
```

```typescript
import { HumanloopClient, Humanloop } from "humanloop";

const humanloop = new HumanloopClient({ apiKey: "YOUR_API_KEY" });

// Check that the authentication was successful
console.log(await humanloop.prompts.list());
```

Continue in the same Python interpreter (where you have run `humanloop = Humanloop(...)`).

> **Warning**
>
> Note: Prompts are still called 'projects' in the SDK and versions of Prompts are called 'model configs'

### Create the Prompt "project"

```python
project_response = humanloop.projects.create(name="sdk-tutorial")
project_id = project_response.id
```

### Register your version ("model config")

```python
humanloop.model_configs.register(
    project_id=project_id,
    model="gpt-3.5-turbo",
    prompt_template="Write a snappy introduction about {{topic}}:",
    temperature=0.8,
)
```

### Go to the App

Go to the [Humanloop app](https://app.humanloop.com) and you will see your new project as a Prompt with the model config you just created.

You now have a project in Humanloop that contains your model config. You can view your project and invite team members by going to the **Project** page.

## Next Steps

With the Prompt set up, you can now integrate it into your app by following the [SDK/API integration guide](./generate-and-log-with-the-sdk).