# AI: analyze a product image

> Eto API reference for `POST /api/v1/ai/analyze-image`. Base URL `https://eto.tools/api/v1/`. Authenticate with the `X-Eto-API-Key` header.

Part of the [Eto API reference](https://eto.tools/dev/docs/). The full reference in one file is at [llms-full.txt](https://eto.tools/dev/docs/llms-full.txt); the machine-readable schema is at [openapi.json](https://eto.tools/dev/docs/openapi.json).

## POST /api/v1/ai/analyze-image

AI: analyze a product image

- Operation ID: `ai_analyze_image`
- Slug: `ai-analyze-image`
- Category: AI Studio
- Authentication: API key only. Reads or writes data Eto holds for your own account.
- HTML: https://eto.tools/dev/docs/#ep-ai-analyze-image
- Markdown: https://eto.tools/dev/docs/ai-studio/ai-analyze-image.md

Analyze a product image and return a description suitable for an Etsy listing.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `image` | body | `object` | yes | Object with "data" (base64) and "mimeType" (e.g. image/png) |
| `prompt` | body | `string` | no | Optional instruction (default describes the product image) |

### Request

```bash
curl -X POST "https://eto.tools/api/v1/ai/analyze-image" \
  -H "X-Eto-API-Key: eto_your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "image": {}
}'
```

```python
import requests

url = "https://eto.tools/api/v1/ai/analyze-image"
headers = {"X-Eto-API-Key": "eto_your_key"}
payload = {
    "image": {}
}

response = requests.post(url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())
```

```javascript
const url = "https://eto.tools/api/v1/ai/analyze-image";
const payload = {
  "image": {}
};

const response = await fetch(url, {
  method: "POST",
  body: JSON.stringify(payload),
  headers: {
    "X-Eto-API-Key": "eto_your_key",
    "Content-Type": "application/json",
  },
});
if (!response.ok) throw new Error(`Eto API ${response.status}`);
const data = await response.json();
```

### Response

`application/json`. This endpoint has no worked response example in the registry yet; the [HTML reference](https://eto.tools/dev/docs/#ep-ai-analyze-image) shows the fields it returns.

### Errors

Failures answer with the shared error body described in the Errors section: `{"error": {"code", "status", "message", "hint", "docs"}}`. Branch on `code`, not on the message.
