---
title: "Generate an image with AI"
method: POST
path: "/api/generate_image_with_ai"
---

# Generate an image with AI

`POST /api/generate_image_with_ai`

## Request

- Base URL: `https://social.recurpost.com`
- URL: `https://social.recurpost.com/api/generate_image_with_ai`
- Auth: none declared

Generates an image from a text prompt. The response's image_url field contains the generated image URL, usable in image_url arrays for posting endpoints.

## Request body

- GenerateImageRequest
  - `emailid` string, email, required: RecurPost account email address
  - `pass_key` string, required: API Password Key from Account Settings (NOT the login password)
  - `prompt_text` string, required: Detailed description of the image to generate

## Response `200`

Generated image

- object
  - `image_url` string, uri: URL of the generated image

## Other responses

- `400`: Missing or invalid parameters
- `401`: Invalid emailid or pass_key

---

[API](https://skmtc.dev/recurpost/apis/recurpost-public-api.md) - [All operations](https://skmtc.dev/recurpost/apis/recurpost-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/recurpost/apis/recurpost-public-api/revisions/c8e270a283a1?raw)
