Generate Images
Generate images based on the provided prompt and model parameters.
Body Required
-
The ID of the model to use for image generation.
-
A text description of the desired image(s).
-
n integer
The number of images to generate.
Minimum value is
1
, maximum value is10
. Default value is1
. -
size string
The size of the generated images.
Values are
1024x1024
,512x512
, or256x256
. Default value is1024x1024
. -
response_format string
The format in which the generated images are returned.
Values are
url
orb64_json
. Default value isurl
. -
user string
A unique identifier representing your end-user, which can help the API to monitor and detect abuse.
-
discord_webhook_url string(uri)
Optional Discord webhook URL for notifications.
POST /v1/images/generations
curl \
-X POST https://api.rimunace.xyz/v1/images/generations \
-H "Authorization: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"string","prompt":"string","n":1,"size":"1024x1024","response_format":"url","user":"string","discord_webhook_url":"https://example.com"}'
Request examples
{
"model": "string",
"prompt": "string",
"n": 1,
"size": "1024x1024",
"response_format": "url",
"user": "string",
"discord_webhook_url": "https://example.com"
}
Response examples (200)
{
"created": 42,
"data": [
{
"url": "string",
"b64_json": "string"
}
]
}
Response examples (400)
{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}
Response examples (401)
{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}
Response examples (429)
{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}