Create Image generation
Image generation is used to obtain a proposal of 4 images based on a description and various parameters.
Create an image generation
prompt string · max: 4096 required
additionalPrompt string · max: 1024
Additional Prompt, not affected by optimization if enabled. Added at the beginning
optimizePrompt boolean
Optimize description for image generation
metaData object
Pass on metadata to a ImageGeneration
mode string · enum required
Options: simple
, advanced
processMode string · enum · default: fast
Mode of the image generation (only for "Dedicated" user)
Options: relax
, fast
Copy curl -L \
--request POST \
--url '/v1/image-generations' \
--header 'api-key: text' \
--header 'Content-Type: application/json' \
--data '{
"name": "text",
"prompt": "text",
"additionalPrompt": "text",
"optimizePrompt": true,
"metaData": {},
"mode": "simple",
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"tags": [
"text"
]
}'
Copy {
"id": "text",
"name": "text",
"prompt": "text",
"nbImages": 1,
"metaData": {},
"createdAt": "2025-02-28T07:10:40.666Z",
"status": 0,
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"images": [
{
"id": "text",
"url": "text",
"urlFull": "text",
"validate": true,
"free": true,
"titles": {}
}
],
"tags": [
"text"
]
}
Update Image Generation
An image generation can only be updated if it is not in "Pending" or "In Progress" status. You can only specify the values to be modified in the request.
Update an image generation
put
/v1/image-generations/{printId}
additionalPrompt string · max: 1024
Additional Prompt, not affected by optimization if enabled. Added at the beginning
optimizePrompt boolean
Optimize description for image generation
metaData object
Pass on metadata to a ImageGeneration
mode string · enum
Options: simple
, advanced
processMode string · enum · default: fast
Mode of the image generation (only for "Dedicated" user)
Options: relax
, fast
Copy curl -L \
--request PUT \
--url '/v1/image-generations/{printId}' \
--header 'api-key: text' \
--header 'Content-Type: application/json' \
--data '{
"name": "text",
"prompt": "text",
"additionalPrompt": "text",
"optimizePrompt": true,
"metaData": {},
"mode": "simple",
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"tags": [
"text"
]
}'
Copy {
"id": "text",
"name": "text",
"prompt": "text",
"nbImages": 1,
"metaData": {},
"createdAt": "2025-02-28T07:10:40.666Z",
"status": 0,
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"images": [
{
"id": "text",
"url": "text",
"urlFull": "text",
"validate": true,
"free": true,
"titles": {}
}
],
"tags": [
"text"
]
}
Retry Image Generation
If a generation is in error, it can be restarted (after modifying the description, for example).
Find Image Generations
Retrieves a list of all image generations.
Copy curl -L \
--url '/v1/image-generations' \
--header 'api-key: text'
Copy {
"filteredResults": 1,
"prints": [
{
"id": "text",
"name": "text",
"prompt": "text",
"nbImages": 1,
"metaData": {},
"createdAt": "2025-02-28T07:10:40.666Z",
"status": 0,
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"images": [
{
"id": "text",
"url": "text",
"urlFull": "text",
"validate": true,
"free": true,
"titles": {}
}
],
"tags": [
"text"
]
}
]
}
Get Image Generation
Retrieves an image generation from its ID.
get
/v1/image-generations/{imageGenerationId}
imageGenerationId string required
Copy curl -L \
--url '/v1/image-generations/{imageGenerationId}' \
--header 'api-key: text'
Copy {
"id": "text",
"name": "text",
"prompt": "text",
"nbImages": 1,
"metaData": {},
"createdAt": "2025-02-28T07:10:40.666Z",
"status": 0,
"processMode": "fast",
"params": [
{
"value": "text",
"name": "sujetMode"
}
],
"images": [
{
"id": "text",
"url": "text",
"urlFull": "text",
"validate": true,
"free": true,
"titles": {}
}
],
"tags": [
"text"
]
}
Delete Image Generation(s)
Delete one or more image generations.
Copy curl -L \
--request DELETE \
--url '/v1/image-generations' \
--header 'api-key: text' \
--header 'Content-Type: application/json' \
--data '{
"printIds": [
"text"
]
}'
Last updated 8 months ago