> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leapter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a release and call it

> Release a Lab project, deploy it to a runtime cluster, create an evaluation key, and call a blueprint with curl.

In this tutorial you take a project from the Lab to a runtime cluster and call it from a terminal. You create a release, deploy it to an environment, create an evaluation key in the Admin UI, and run a blueprint with `curl`. Afterwards, any system that can send an HTTP request can use your blueprint.

The tutorial uses the Pizza Pricing Calculator project. Its blueprint **Pizza Pricing** calculates the price of a pizza from its size, toppings, crust and day of the week. You can follow the same steps with your own project: the names on your screen will be different.

## Before you start

* A Lab account and a project with at least one public blueprint that was never deployed. The Pizza Pricing Calculator project comes from the Leapter examples.
* The right to deploy to an environment of your runtime cluster, and to create evaluation keys there. [Who may do what](https://docs.leapter.com/rc/user-guide/concepts.md#who-may-do-what) explains the rights.
* A terminal with `curl`.

## Steps

**1. Open the Deploy dialog**

Open the project in the Lab and click **Deploy** in the toolbar.

You should see the **Deploy** dialog. **Version name** is filled in with the next version, for example `v1`. Under **Callable on the cluster** you see the public blueprints that callers can run.

![The Lab's Deploy dialog. Version name is v1, Description is empty, Callable on the cluster lists Pizza Pricing. The Create release button has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/lab-deploy-create-release.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=c8e52fdb298c382fccae1a3c6046f199)

The Deploy dialog with the version name and Create release.

**2. Create the release**

Click **Create release**.

You should see **Release created** and "v1 is ready." Below it, under **Deploy to an environment**, the dialog says where the release goes:

* When your workspace uses only Leapter Cloud, it says **Deploys to Leapter Cloud**, with the address of the runtime cluster below it, for example `https://cluster.example.com`.
* When your workspace has runtime clusters of its own, it shows **Runtime Cluster** with **Choose a cluster**. Choose yours in the list, and its address appears below it.

![The dialog now says Release created and v1 is ready. Under Deploy to an environment, Runtime Cluster shows Leapter Cloud with the address https://cluster.example.com. The Sign in and deploy button has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/lab-deploy-sign-in.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=2eb60833480fda8705af84058dd02457)

After Create release, the dialog offers to deploy to the runtime cluster.

**3. Sign in to the runtime cluster and deploy**

The button below says what it does:

* **Deploy to playground** (or another environment): the Lab has already signed you in to the runtime cluster. Click it.
* **Sign in and deploy**: click it. A sign-in window opens. If it asks you to allow the runtime cluster to sign you in, click **Allow**. The window closes by itself. When you are already signed in to the Lab, it can close before you see it.

If you may deploy to only one environment, the Lab deploys to it. On Leapter Cloud the line above the button then names it, for example **Deploys to Leapter Cloud · playground**. If you may deploy to more than one, choose the one your callers should use in **Environment**, for example the environment for trying things out (here `playground`). Then click the button **Deploy to** with the environment's name.

On Leapter's own runtime cluster, the Lab first prepares `playground` for your project, so `playground` is always in the list there. While it does this, the dialog shows **Preparing playground access…**. The first deploy of a project to `playground` gives you the rights on that application in `playground`, so you need no one to give them to you. If the project's name is already used in `playground` by another workspace, the dialog says that the name is already in use and asks you to rename the project. The Lab then sends nothing to `playground`, but you can still sign in and deploy to another environment.

You should see three lines like these:

![The end of the Deploy dialog: This project is called pizza-pricing-calculator-180269 there. A green check mark and v1 is deployed to playground. Callers need an evaluation key for playground before they can run it.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/lab-deploy-deployed.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=bbaf3f891611a0dd1cce780c3c7daa99)

The release is deployed. The dialog names the application and says that callers need a key.

Click **Create an evaluation key** below the last line. The Admin UI of your runtime cluster opens in a new tab.

**4. Open your application in the Admin UI**

If the Admin UI asks you to sign in, click **Sign in with Leapter**. Your application's page opens.

If you closed the Lab dialog, open the Admin UI yourself. Its address is the cluster address followed by `/runtime-management/ui/`, for example `https://cluster.example.com/runtime-management/ui/`. Click **Sign in with Leapter**. The **Status** page opens. At the bottom of the sidebar, choose your environment in the environment list. Your application is in the table. **Serving now** says "Not served yet: this application has no evaluation key in playground.", and **Drift** says **Not served**. In your application's row, click **Create an evaluation key**.

![The Admin UI Status page for the playground environment. The row for pizza-pricing-calculator-180269 shows release v1, Not served yet: this application has no evaluation key in playground, and Not served in the Drift column. The Create an evaluation key link has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/admin-status-no-key.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=67a0353269e2a5d20e3a522a7b9b3dd0)

The Status page before the application has a key.

**5. Create an evaluation key**

On your application's page, go to the last card, **Keys**, and click **Create key**.

![The application page of pizza-pricing-calculator-180269. The Keys card says This application has no key in this environment. The Create key button has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/admin-keys-create.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=5a9f087ce07bff935b083d47a26f47e0)

The Keys card of the application, before it has a key.

In the dialog **Create an evaluation key**, type the system that will call in **Used by**, for example `pizza-shop`. Type why it needs the key in **Reason**, for example `The pizza shop shows prices from this release`. Click **Create**.

![The dialog Create an evaluation key with Used by pizza-shop and Reason The pizza shop shows prices from this release. The Create button has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/admin-keys-create-dialog.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=24c7681ca2ee4651550c1eef554f454d)

Used by names the calling system, Reason says why it needs the key.

**6. Copy the key**

The dialog **Copy this key now** shows the start of the key. Click the copy button next to it. **Copied** appears below the key.

![The dialog Copy this key now. The key field shows lk\_dev\_ followed by dots. The copy button next to it has a green ring, and Copied is shown below the field.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/admin-keys-copy.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=99c9c10e76188b8314cab5a0a2505541)

The key is shown only once. The copy button puts it on your clipboard.

Paste the key into a safe place now. The Admin UI never shows it again. Then click **Done**.

**7. Copy the run address**

Scroll up to the card **Connect to** with your application's name. Under **Blueprints**, find **Pizza Pricing**. Next to **Run address**, click **Copy**.

![The card Connect to pizza-pricing-calculator-180269. Under Blueprints, Pizza Pricing has the run address https://cluster.example.com/runtime/api/v1/playground/pizza-pricing-calculator-180269/models/pizza\_pricing/runs. Its Copy button has a green ring.](https://mintcdn.com/leapter/3NthIZmfsFFgUhyn/rc/user-guide/images/admin-connect-rest.png?fit=max\&auto=format\&n=3NthIZmfsFFgUhyn\&q=85\&s=cf93796d2e5eaf439d07d4ba9ff57ec5)

Each callable blueprint has its own run address.

**8. Call the blueprint**

In a terminal, store the run address and the key in two variables. Replace the two values with the ones you copied:

```bash theme={null}
export RUN_ADDRESS='<run-address>'
export LEAPTER_EVALUATION_KEY='<your-evaluation-key>'
```

Then call the blueprint with a large thin-crust pizza with two toppings on a Friday. The body is a JSON object with the blueprint's inputs. For your own project, use your blueprint's inputs: [Call a release over REST](https://docs.leapter.com/rc/user-guide/call-rest.md) shows where to read them.

```bash theme={null}
curl -X POST "$RUN_ADDRESS" \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: $LEAPTER_EVALUATION_KEY" \
  -d '{"pizzaSize":"large","toppings":["mushroom","olive"],"crustType":"thin","dayOfWeek":"friday"}'
```

You should see the blueprint's outputs:

```json theme={null}
{"outputData":{"basePrice":16,"crustUpcharge":0,"dayMultiplier":1.1,"subtotal":19,"toppingsCost":3,"totalPrice":20.9,"weeklyPrices":[19,15.2,17.1,19,20.9,21.85,19]}}
```

> [!NOTE]
>
> The first key of an application needs about a minute to reach the cluster. Until then, the call answers `404 page not found`. Wait a minute and call again.

## Result

Release v1 of your project runs in an environment of your runtime cluster, and a system that holds the evaluation key can call it. The total price for the pizza is `20.9`. Click **Status** in the sidebar of the Admin UI: after a short time, **Drift** for your application says **No drift**.

## What to do next

* [Call a release over REST](https://docs.leapter.com/rc/user-guide/call-rest.md): headers, errors and the OpenAPI document.
* [Connect an MCP client to a release](https://docs.leapter.com/rc/user-guide/connect-mcp.md): use the blueprint as a tool for an AI agent.
* [Create and revoke an evaluation key](https://docs.leapter.com/rc/user-guide/evaluation-keys.md): give more systems access, or take it back.
* [Find a run and read usage](https://docs.leapter.com/rc/user-guide/runs-and-usage.md): see the call you just made.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.