> For the complete documentation index, see [llms.txt](https://docs.claid.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claid.ai/image-generation-api/image-generation-i-o.md).

# Image Generation I/O

### Intro

The Image Generation Endpoint enables you to generate unique images based on text descriptions (prompts). The generated images have a size of 1024x1024 pixels. You can further improve their resolution and quality using our Image Editing API (see the Resizing and Upscale sections).

### Input

Our image generation API accepts text prompts as inputs. The prompt must be between 3 and 1024 characters.

{% hint style="info" %}
Provide a detailed prompt to increase the likelihood of achieving the desired result.
{% endhint %}

```json
{
    "input": "A delicious ceviche cheesecake slice"
}
```

#### Limitations

Our system has a built-in filter that removes NSFW content. If you receive a plain black image as an output, it's possible that the content filter detected an NSFW result. If you believe this was a mistake, you can try adjusting the prompt.

### Output

Configuring output is optional. You may configure the output or omit it for default settings. If you omit the output, the API stores the result in a temporary bucket for 24 hours and provides you with a public URL to the image.

#### Connected storage

Alternatively, you can use a connected Cloud Storage. Once connected, you can refer to the storage directory as an output path. The output path must always end with a <mark style="color:purple;">`/`</mark> character.

{% hint style="info" %}
Currently, our API supports AWS S3 and Google Cloud Storage.
{% endhint %}

```json
{
    "output": "storage://storage-name/path/"
}
```


---

# 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.claid.ai/image-generation-api/image-generation-i-o.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.
