---
title: "Price an influencer"
description: "What a new influencer's first look costs and what the workspace can spend. Nothing is charged."
url: "https://docs.layo.co/reference/prices/influencer"
---

> 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 influencer

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

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

What a new influencer's first look costs and what the workspace can spend. Nothing is charged.

## Request

### curl

```bash
curl -X POST https://layo.co/v1/prices/influencers \
  -H "Authorization: Bearer $LAYO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A trail runner in her late twenties with short copper hair."}'
```

### TypeScript

```ts
const response = await fetch("https://layo.co/v1/prices/influencers", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.LAYO_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({"prompt":"A trail runner in her late twenties with short copper hair."}),
});
const data = await response.json();
```

### Python

```python
import os
import requests

response = requests.post(
    "https://layo.co/v1/prices/influencers",
    headers={"Authorization": f"Bearer {os.environ['LAYO_API_KEY']}"},
    json={"prompt":"A trail runner in her late twenties with short copper hair."},
)
data = response.json()
```

## Body

- `prompt` (`string`, required, `1 <= length`): Who they are and how they look.
- `photos` (`object[]`, `items <= 8`): Photos of the person, by link. In ChatGPT, the photos the person attached. Up to 8 photos in all, with `photoIds`.
  - `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.
- `photoIds` (`string<uuid>[]`, `items <= 8`): Photos you uploaded with create_upload and complete_upload. Up to 8 in all, with `photos`.

## Response

- `credits` (`number`, required, `x >= 0`): What this costs, from the rate card.
- `balance` (`number`, required): Credits the workspace can spend now. Negative while it owes credits.
- `photos` (`integer`, required, `x >= 0`): How many of the person's photos the look would be made from. 0: from the description alone.

## 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.
- `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,
  "photos": 1
}
```

### 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."
  }
}
```

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