Image Generation
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
sizestringOptionalExample:
Size of the generated image in the format "widthxheight", e.g., "1024x1024"
512x512
ninteger ยท min: 1OptionalDefault:
Number of images to generate
1
negative_promptstringOptional
Text prompt of what to exclude from the generated image
Responses
200
Successfully generated images
application/json
400
Bad request or generation error
application/json
401
Not authenticated
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