Image Generation

Generate Images

post

Generates images based on provided text prompts. The response contains URLs to the generated images.

Authorizations
Body

Request parameters for image generation

modelstringOptional

The model ID to use for image generation. If not provided, the system default will be used.

promptstringRequired

The text prompt to generate images from

sizestringOptional

Size of the generated image in the format "widthxheight", e.g., "1024x1024"

Example: 512x512
ninteger ยท min: 1Optional

Number of images to generate

Default: 1
negative_promptstringOptional

Text prompt of what to exclude from the generated image

Responses
200
Successfully generated images
application/json
post
curl -X POST "https://app.morphware.com/images/api/v1/generations" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -d '{
    "prompt": "A beautiful sunset over the mountains",
    "size": "1024x1024",
    "n": 1,
    "negative_prompt": "blurry, low quality"
  }'
[
  {
    "url": "/cache/image/generations/abc123.png"
  },
  {
    "url": "/cache/image/generations/def456.png"
  }
]

Last updated