---
title: "Price the design again"
method: POST
path: "/estimates/{estimate}/regenerate"
tags: ["Estimates"]
---

# Price the design again

`POST /estimates/{estimate}/regenerate`

## Request

- Base URL: `https://api.getfacade.ai/api/v1`
- URL: `https://api.getfacade.ai/api/v1/estimates/{estimate}/regenerate`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.getfacade.ai/oauth/authorize`, token URL `https://api.getfacade.ai/oauth/token`, scopes: `agent`)

A fresh generation of the same estimate from its renders, at the current prices. Costs
the same as ordering one. An estimate carrying manual line edits answers 409
`COST_ESTIMATE_OVERWRITE_REQUIRED` unless `confirm_overwrite` is true, so a stray call
never discards hand-tuned numbers.

## Path parameters

- `estimate` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `data` object
    - `type` 'estimate'
    - `attributes` object
      - `confirm_overwrite` boolean: Required to overwrite an estimate with manual line edits.

## Response `202`

A JSON:API document

- object
  - `data` Resource: JSON:API resource. `id` is a top-level field, never inside `attributes`.
    - `type` string, required
    - `id` string, required
    - `attributes` object
    - `relationships` object

## Other responses

- `402`: Admission refused before any work was queued. `AGENT_KEY_CAP_REACHED` — this key has spent its cap, issue a new one or raise it. `AGENT_CREDITS_EXHAUSTED` — the account has no `api`-scope credits left. Neither is retryable: back off and report the `detail` text as it stands.
- `409`: `COST_ESTIMATE_OVERWRITE_REQUIRED` — the estimate has manual edits; repeat with `confirm_overwrite: true` to discard them. `IDEMPOTENCY_IN_PROGRESS` — the first call under this `Idempotency-Key` has not answered yet.
- `422`: The request was understood and refused. The message is the API's own text; show it unchanged. `IDEMPOTENCY_KEY_REQUIRED` — a paid call from an agent key with no `Idempotency-Key` header; nothing was queued, send it again with one. `IDEMPOTENCY_KEY_REUSED` — that header value already names a different request; a new order needs a new value.
- `429`: Rate limited on this key's own bucket, separate from the human sessions of the same account. Refusal is deliberately cheap: back off, do not retry in a tight loop.

---

[API](https://skmtc.dev/getfacade/apis/getfacade-agent-api.md) · [All operations](https://skmtc.dev/getfacade/apis/getfacade-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getfacade/apis/getfacade-agent-api/revisions/2b52eda7362c?raw)
