---
title: "Price an image"
description: "What this image costs, what the workspace can spend, and whether it can start: what would stop it. Nothing is charged, and linked images aren't fetched."
url: "https://docs.layo.co/reference/prices/image"
---

> For agents: every page is listed at https://docs.layo.co/llms.txt. Search the docs over MCP at https://docs.layo.co/mcp, no sign-in needed.

# Price an image

`POST https://layo.co/v1/prices/images`

Needs the `generate` scope. No charge. MCP tool: `get_image_price`.

What this image costs, what the workspace can spend, and whether it can start: what would stop it. Nothing is charged, and linked images aren't fetched.

## Request

### curl

```bash
curl -X POST https://layo.co/v1/prices/images \
  -H "Authorization: Bearer $LAYO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"influencer":"c41b8e2f-9d07-4a63-8e15-0b7f2c9d6a54","prompt":"A ceramic mug on a linen table, morning light.","model":"nano-banana","aspect":"3:4"}'
```

### TypeScript

```ts
const response = await fetch("https://layo.co/v1/prices/images", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.LAYO_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({"influencer":"c41b8e2f-9d07-4a63-8e15-0b7f2c9d6a54","prompt":"A ceramic mug on a linen table, morning light.","model":"nano-banana","aspect":"3:4"}),
});
const data = await response.json();
```

### Python

```python
import os
import requests

response = requests.post(
    "https://layo.co/v1/prices/images",
    headers={"Authorization": f"Bearer {os.environ['LAYO_API_KEY']}"},
    json={"influencer":"c41b8e2f-9d07-4a63-8e15-0b7f2c9d6a54","prompt":"A ceramic mug on a linen table, morning light.","model":"nano-banana","aspect":"3:4"},
)
data = response.json()
```

## Body

- `influencer` (`string<uuid>`): An influencer with a chosen look, when the image is of them. Leave it out to make it from the prompt and your images alone.
- `prompt` (`string`, required, `1 <= length`): What the image shows. Up to 4,000 characters.
- `model` (`enum<string>`, one of `nano-banana`, `seedream-5.5`, `seedream-5-pro`, `gpt-image-2.5`): Leave it out for nano-banana. Each one's price is in list_models. nano-banana makes 2 images for its price, to choose from.
- `aspect` (`enum<string>`, one of `3:4`, `1:1`, `9:16`, `16:9`): The shape. Leave it out for 3:4.
- `images` (`object[]`, `items <= 8`): Images to work from, by link: a product, a place, a person. In ChatGPT, the images the person attached. Up to 8 in all, with `imageIds`.
  - `download_url` (`string<uri>`, required, `length <= 4096`): A public https link to a JPEG, PNG or WebP photo. Layo fetches it once, when the request is made; a price read doesn't fetch it.
  - `file_id` (`string`, required, `1 <= length <= 200`): Your name for this photo. Send the same one when you repeat a request: it's how a repeat knows the photo, even if the link changed.
  - `mime_type` (`string`, `length <= 100`): Ignored: Layo reads the format from the file.
  - `file_name` (`string`, `length <= 255`): Ignored.
- `imageIds` (`string<uuid>[]`, `items <= 8`): Images you uploaded with create_upload and complete_upload. Up to 8 in all, with `images`.

## Errors

- `invalid_input` (400): Something in this request wasn't valid. Check it and try again.
- `invalid_api_key` (401): This key isn't valid. Make a new one at layo.co/api-keys.
- `insufficient_scope` (403): This key can't do that. Use a key with the scope this endpoint needs.
- `forbidden` (403): You don't have access to that in this workspace.
- `not_found` (404): Nothing with that id in this workspace.
- `rate_limited` (429): Too many requests. Wait a moment and try again.
- `unavailable` (503): Layo had a problem. Try again shortly.

## Examples

### 200

```json
{
  "credits": 4,
  "balance": 1250,
  "outcome": "ready",
  "findings": [],
  "adjustments": []
}
```

### 400 `invalid_input`

```json
{
  "error": {
    "code": "invalid_input",
    "message": "Something in this request wasn't valid. Check it and try again."
  }
}
```

### 401 `invalid_api_key`

```json
{
  "error": {
    "code": "invalid_api_key",
    "message": "This key isn't valid. Make a new one at layo.co/api-keys."
  }
}
```

### 403 `insufficient_scope`

```json
{
  "error": {
    "code": "insufficient_scope",
    "message": "This key can't do that. Use a key with the scope this endpoint needs."
  }
}
```

### 403 `forbidden`

```json
{
  "error": {
    "code": "forbidden",
    "message": "You don't have access to that in this workspace."
  }
}
```

### 404 `not_found`

```json
{
  "error": {
    "code": "not_found",
    "message": "Nothing with that id in this workspace."
  }
}
```

### 429 `rate_limited`

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Wait a moment and try again."
  }
}
```

### 503 `unavailable`

```json
{
  "error": {
    "code": "unavailable",
    "message": "Layo had a problem. Try again shortly."
  }
}
```

The whole API as OpenAPI: https://docs.layo.co/openapi.json
