> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.ai.GenerateImage

- Component: `appmixer.utils.ai.GenerateImage`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.ai 1.1.4](https://connectors.appmixer.com/connector/appmixer.utils.ai/1.1.4.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.ai/1.1.4/component/appmixer.utils.ai.GenerateImage>

Generates an image from a text prompt.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Prompt (`prompt`) | textarea | - |
| Size (`size`) | select | - |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | string | - |
| Prompt (`prompt`) | string | - |
| Size (`size`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.ai.GenerateImage",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Generates an image from a text prompt.",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "inspector": {
        "inputs": {
          "prompt": {
            "label": "Prompt",
            "type": "textarea",
            "index": 1
          },
          "size": {
            "label": "Size",
            "type": "select",
            "defaultValue": "1024x1024",
            "options": [
              {
                "label": "1024x1024",
                "value": "1024x1024"
              },
              {
                "label": "1792x1024",
                "value": "1792x1024"
              },
              {
                "label": "1024x1792",
                "value": "1024x1792"
              }
            ],
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "File ID",
          "value": "fileId",
          "schema": {
            "type": "string",
            "format": "appmixer-file-id",
            "example": "a1686006-35c8-4ffc-b23e-d687858cd418"
          }
        },
        {
          "label": "Prompt",
          "value": "prompt",
          "schema": {
            "type": "string",
            "example": "A watercolor painting of a lighthouse at sunset"
          }
        },
        {
          "label": "Size",
          "value": "size",
          "schema": {
            "type": "string",
            "example": "1024x1024"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
