Skip to main content
POST
/
api
/
py
/
flux-schnell
/
generate
Generate Image from Text
curl --request POST \
  --url https://www.unitedcompute.ai/api/py/flux-schnell/generate \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "prompt": "a beautiful landscape painting with mountains and a lake"
}
'
{
  "status": "completed",
  "request_id": "12345",
  "result_url": "https://unitedcompute.s3.amazonaws.com/united-compute-20250720171426-61ua.png"
}

Authorizations

X-API-Key
string
header
required

Body

application/json
prompt
string
required

The text description of the image you want to generate

Required string length: 3 - 4096
Example:

"a beautiful landscape painting with mountains and a lake"

Response

Image generation completed successfully

status
enum<string>
required

Generation completed successfully

Available options:
completed
Example:

"completed"

request_id
string
required

Unique identifier for this generation task

Example:

"12345"

result_url
string<uri>
required

Direct download URL for the generated image

Example:

"https://unitedcompute.s3.amazonaws.com/united-compute-20250720171426-61ua.png"