---
title: "Generate one marketing image (ad creative, thumbnail, hero, social graphic) and return a public URL"
method: POST
path: "/api/mcp/tools/generate_image"
tags: ["tools"]
---

# Generate one marketing image (ad creative, thumbnail, hero, social graphic) and return a public URL

`POST /api/mcp/tools/generate_image`

## Request

- Base URL: `https://finestructure.ai`
- URL: `https://finestructure.ai/api/mcp/tools/generate_image`
- Auth: HTTP bearer

Generate one marketing image (ad creative, thumbnail, hero, social graphic) and return a public URL. Free plans burn one of their monthly free images; paid plans spend 1 platform credit. Optionally pass a reference image to keep a person, product, place, or brand consistent.

## Request body

- object
  - `prompt` string, required: What to draw. Up to 4500 chars.
  - `language` string: Language of any text in the image. ISO code such as 'en' or 'he'. Defaults to 'en'.
  - `reference_image_url` string: Public https URL of a reference image, or one of this account's own finestructure.ai uploads.
  - `reference_image_data_url` string: Reference image inline as a data:image/... URL. Prefer reference_image_url for large files.
  - `reference_image_data_urls` string[]: Up to 6 extra reference images as data:image/... URLs.
  - `notify_by_email` boolean: Email the account owner the finished image. Default false so batch runs do not spam.

## Response `200`

Tool executed successfully

- ToolResult
  - `ok` boolean, required
  - `tool` string, required
  - `result` object, required

## Other responses

- `400`: Invalid arguments for this tool
- `401`: Missing or invalid bearer token
- `402`: Not enough credits on the account
- `403`: Token scope does not permit this tool
- `404`: Unknown tool name
- `429`: Rate limit exceeded, retry after the indicated delay
- `500`: Internal error while executing the tool

---

[API](https://skmtc.dev/finestructure/apis/fine-structure-api.md) · [All operations](https://skmtc.dev/finestructure/apis/fine-structure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finestructure/apis/fine-structure-api/revisions/02c50ed5fd70?raw)
