curl --request POST \
--url https://{controlPlaneURL}/api/llm/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<string>",
"background": "<string>",
"model": "<string>",
"moderation": "<string>",
"n": 1,
"output_compression": 123,
"output_format": "<string>",
"partial_images": 0,
"quality": "<string>",
"response_format": "url",
"size": "<string>",
"stream": false,
"style": "<string>",
"user": "<string>"
}'
{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}
Creates an image given a prompt.
curl --request POST \
--url https://{controlPlaneURL}/api/llm/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<string>",
"background": "<string>",
"model": "<string>",
"moderation": "<string>",
"n": 1,
"output_compression": 123,
"output_format": "<string>",
"partial_images": 0,
"quality": "<string>",
"response_format": "url",
"size": "<string>",
"stream": false,
"style": "<string>",
"user": "<string>"
}'
{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successfully generated images
The response is of type object
.
Was this page helpful?