Skip to main content
POST
Generate a post image

Authorizations

api_key
string
header
required

Personal API key.

Path Parameters

post_id
string
required

ID of the post, as returned in the content plan. Must be a UUID.

app_id
string
required

ID of the app.

Body

application/json
image_prompt
string
required

Prompt to generate the image from. Used only when the post carries no image_prompt of its own, which is the prompt the plan generated for it. Send the post's own image_prompt back if you want to be sure of what is used.

Maximum string length: 2000
Example:

"A freelancer closing a laptop at a tidy desk, warm morning light"

refinement_instruction
string | null

What to change about the existing image. Sending this regenerates the image even when the post already has one. The first 300 characters are used.

Maximum string length: 500
Example:

"Make the lighting cooler and remove the coffee cup."

Response

The image URL, and the content plan with the image saved on the post.

image_url
string | null

URL of the post image.

Example:

"https://storage.base44.com/virality/3f2504e0.png"

plan
ContentPlan · object | null

The content plan, with this post's image_url set.