# Estimate a price

The exact price of a request before you spend anything.

`POST /v1/estimate` takes the same body as a generation and charges nothing. It answers with the price the request starts at, the most it can cost, and whether your balance covers it.

Request:

```sh
curl "https://api.opengrid.one/v1/estimate" \
  -H "Authorization: Bearer $OPENGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "nano-banana-pro",
  "variant": "2k",
  "quantity": 1,
  "input": {
    "prompt": "A paper boat drifting down a rain gutter, golden hour",
    "aspect_ratio": "16:9"
  }
}'
```

200 OK:

```json
{
  "model": "nano-banana-pro",
  "variant": "2k",
  "quantity": 1,
  "unit": "per_image",
  "routing": "balanced",
  "fallback": true,
  "runnable": true,
  "price_usd": 0.141225,
  "max_price_usd": 0.1575,
  "providers": 2,
  "eta_seconds": 21.5,
  "currency": "USD",
  "balance_usd": 20,
  "affordable": true
}
```

## The reply

| Field | Meaning |
|---|---|
| `price_usd` | What you pay if the first provider finishes the job. |
| `max_price_usd` | What is held when the job starts, and the most you can be charged. It is above `price_usd` only when a fallback provider costs more. |
| `runnable` | `false` comes with a `reason`: nothing can run the request as sent. |
| `providers` | How many providers are in the plan for this request. |
| `eta_seconds` | The typical time recent runs took on the first provider, or `null` when there is not enough history. |
| `affordable` | Whether `balance_usd` covers `max_price_usd`. |

Source: https://opengrid.one/docs/estimate
