> For the complete documentation index, see [llms.txt](https://docs.photoroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.photoroom.com/image-editing-api-plus-plan/create-any-image.md).

# Create Any Image

## Overview

Instead of starting from an existing image (by using the parameters `imageFile` or `imageUrl`), you can choose to generate a new AI image using a prompt.

To create an AI image, use the parameter `imageFromPrompt`:

```sh
curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --form removeBackground=false \
  --form 'imageFromPrompt.prompt=three mugs on a table in a rustic coffee shop in a realistic style' \
  --form imageFromPrompt.seed=12345 \
  --output result.png
```

Result:

<figure><img src="/files/7GFVHlhow8cPJ2i7bzZ4" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Create Any Image generates an image with a background, but the API will perform a background removal by default: you can set `removeBackground=false` if you want to keep the generated background.
{% endhint %}

## Parameters

Create Any Image supports the following parameters:

### `imageFromPrompt.prompt`

Your text prompt to create the image with, for example `three coffee mugs on rustic countertop`, `a red car in a baroque style`, or `a tent on a snowy mountain`.

By default, a realistic style will be used, but you can specify the style you want in the prompt, like `in a cyberpunk style` to override it.

### `imageFromPrompt.seed` (optional)&#x20;

The seed to generate the image. The same prompt with the same seed will generate the same image.

### `imageFromPrompt.size`: (optional)&#x20;

The size and format of the generated.

The following values are supported:&#x20;

* `SQUARE_HD` (default)
* `LANDSCAPE_16_9`
* `LANDSCAPE_4_3`
* `PORTRAIT_16_9`
* `PORTRAIT_4_3`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.photoroom.com/image-editing-api-plus-plan/create-any-image.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
