> ## 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.

# Call a release over REST

> Run a blueprint of a deployed release with an HTTP request, find the run again, and read the release's OpenAPI document.

Use this when a system of yours, such as a web shop or a backend service, should run a blueprint and use its result.

## Before you start

* The application is deployed and has an evaluation key ([Deploy a release and call it](https://docs.leapter.com/rc/user-guide/deploy-and-call.md), [Create and revoke an evaluation key](https://docs.leapter.com/rc/user-guide/evaluation-keys.md)).
* You can sign in to the Admin UI of the runtime cluster. Its address is the cluster address followed by `/runtime-management/ui/`, for example `https://cluster.example.com/runtime-management/ui/`.
* A terminal with `curl`. The examples use the Pizza Pricing Calculator project.

## Steps

**1. Copy the run address**

Open the Admin UI and click **Sign in with Leapter**. Choose the environment in the environment list at the bottom of the sidebar, and click the application's name on the **Status** page. In the card **Connect to** with the application's name, find the blueprint under **Blueprints** and click **Copy** next to **Run address**.

![The card Connect to pizza-pricing-calculator-180269 with the MCP endpoints, the OpenAPI specification and, under Blueprints, the run address of Pizza Pricing. The Copy button of the run address 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)

The run address of the blueprint Pizza Pricing.

A run address always has this form. The blueprint's name is in lowercase with underscores:

```text theme={null}
https://cluster.example.com/runtime/api/v1/<environment>/<application>/models/<blueprint>/runs
```

In place of the name, the address also takes the blueprint's ID. The name changes when the blueprint's title changes; the ID does not.

**2. Store the address and the key**

Replace `<run-address>` with the run address you copied, and `<your-evaluation-key>` with your key:

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

**3. Send the input**

Send the blueprint's inputs as a JSON object in a `POST` request. Send the key in the `X-API-Key` header. You can add an `X-Correlation-Id` header with an ID from your own system, for example an order number. It is stored with the run, and you can search for it later.

```bash theme={null}
curl -i -X POST "$RUN_ADDRESS" \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: $LEAPTER_EVALUATION_KEY" \
  -H 'X-Correlation-Id: order-1042' \
  -d '{"pizzaSize":"medium","toppings":["bacon"],"crustType":"stuffed","dayOfWeek":"tuesday"}'
```

You should see `200 OK`, an `X-Run-Id` header and the blueprint's outputs in `outputData`:

```text theme={null}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 177
Content-Type: application/json
Date: Wed, 21 Oct 2026 15:16:09 GMT
X-Run-Id: 0d5e32b5-373a-4b2b-b740-dc3ca7cff9aa

{"outputData":{"basePrice":12,"crustUpcharge":3,"dayMultiplier":0.8,"subtotal":16.5,"toppingsCost":1.5,"totalPrice":13.2,"weeklyPrices":[16.5,13.2,14.85,16.5,18.15,18.98,16.5]}}
```

Keep the `X-Run-Id` or your correlation ID if you want to find this run again.

**4. Find the run**

In the Admin UI, click **Runs** and type your correlation ID, here `order-1042`, in the search field. The run is listed with its status, release and duration. If your system sent the same correlation ID more than once, every run with it is listed, the newest first. [Find a run and read usage](https://docs.leapter.com/rc/user-guide/runs-and-usage.md) explains the page, and how to open a run by its `X-Run-Id`.

**5. Read the OpenAPI document**

Every deployed release describes its blueprints in an OpenAPI document. Its address is in the card **Connect to**, next to **Specification**. Send the key here too:

```bash theme={null}
curl 'https://cluster.example.com/runtime/api/v1/<environment>/<application>/openapi' \
  -H "X-API-Key: $LEAPTER_EVALUATION_KEY"
```

The answer is an OpenAPI 3.0 document with one path per callable blueprint and the schema of its inputs and outputs. It starts like this:

```text theme={null}
{"openapi":"3.0.0","info":{"title":"Pizza Pricing Calculator","version":"1.0.0","description":"Pizza Pricing Calculator - Calculates pizza prices based on size, toppings, crust, and the day of the week"},"servers":[{"url":"https://cluster.example.com/runtime/api/v1/playground/pizza-pricing-calculator-180269","description":"Runtime server endpoint for this project"}],"paths":{"/models/f1ae47d5-b5bf-427a-a964-b7d18bd86609/runs":{"post":{"summary":"Pizza Pricing",
…
```

The paths in the document use the blueprint's ID (`/models/f1ae47d5-…/runs`), which works like the name. Tools that read OpenAPI can build a client from it.

## Result

Your system runs the blueprint with a `POST` to its run address and reads the result from `outputData`. Each run has an ID in `X-Run-Id`, and the Admin UI shows the run under this ID.

## Troubleshooting

**After Sign in with Leapter, you are in the Lab and not in the Admin UI.** Open the Admin UI's address again and click **Sign in with Leapter** once more. The **Status** page opens.

**`400 Bad Request` with `"title":"Validation Error"`.** An input is missing or has the wrong type. `errors` names each field:

```json theme={null}
{"type":"about:blank","title":"Validation Error","status":400,"detail":"Input validation failed. Please check the errors for details.","instance":"/playground/pizza-pricing-calculator-180269/models/pizza_pricing/runs","errors":[{"field":"toppings","message":"Invalid input: expected array, received string","code":"invalid_type","path":["toppings"]}]}
```

Fields that the blueprint does not know are ignored.

**`401 Unauthorized`.** The key is missing, wrong, revoked, or belongs to another application or environment. The answer is the same in every case:

```json theme={null}
{"type":"about:blank","title":"Unauthorized","status":401,"detail":"This request was refused. Present a valid evaluation key for this environment and application.","instance":"/runtime/api/v1/playground/pizza-pricing-calculator-180269/models/pizza_pricing/runs"}
```

**`404 page not found` as plain text.** The environment or application in the address is wrong, or the application has no key yet. A new application's first key needs about a minute.

**`404 Not Found` with `"title":"Model Not Found"`.** The blueprint name in the address is wrong, or the blueprint is not public in this release:

```json theme={null}
{"type":"about:blank","title":"Model Not Found","status":404,"detail":"Model not found: no_such_blueprint is not part of release v1","instance":"/playground/pizza-pricing-calculator-180269/models/no_such_blueprint/runs"}
```

## What to do next

* [Connect an MCP client to a release](https://docs.leapter.com/rc/user-guide/connect-mcp.md): the same blueprints as tools for an AI agent.
* [Find a run and read usage](https://docs.leapter.com/rc/user-guide/runs-and-usage.md): what the cluster recorded.


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