---
title: "Estimate run cost"
method: POST
path: "/apps/{appId}/estimate"
tags: ["Apps"]
---

# Estimate run cost

`POST /apps/{appId}/estimate`

## Request

- Base URL: `https://app.uselamina.ai/v1`
- URL: `https://app.uselamina.ai/v1/apps/{appId}/estimate`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Estimate the credit cost and duration for running an app before committing to execution. Returns a cost breakdown by node, the expected total, and the current credit balance so agents can make informed cost/quality tradeoff decisions.

## Path parameters

- `appId` string, uuid, required

## Response `200`

Cost estimate for running this app

- object
  - `data` object, required
    - `appId` string, uuid, required
    - `name` string, required
    - `estimatedCredits` object, required
      - `expected` number, required: Expected credit cost for a single run
      - `min` number, required: Minimum cost (no retries)
      - `max` number, required: Maximum cost (with quality check retries)
    - `breakdown` object[], required
      - `nodeId` string
      - `nodeType` string
      - `credits` number
    - `currentBalance` number, required: Current workspace credit balance
    - `affordable` boolean, required: Whether the workspace can afford this run

## Other responses

- `401`: Missing or invalid API key
- `500`: Internal server error

---

[API](https://skmtc.dev/uselamina/apis/lamina-v1-api.md) · [All operations](https://skmtc.dev/uselamina/apis/lamina-v1-api/llms.txt) · [OpenAPI document](https://skmtc.dev/uselamina/apis/lamina-v1-api/revisions/73b598526531?raw)
