POST
/
v1
/
images
/
generations
curl --request POST \
  --url https://api.taam.cloud/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A beautiful sunset over a calm ocean",
  "n": 1,
  "size": "1024x1024",
  "model": "dall-e-3"
}'
{
  "created": 123,
  "data": [
    {
      "revised_prompt": "<string>",
      "url": "<string>"
    }
  ]
}

The Image Generation endpoint allows you to create images from text descriptions using various AI models.

Authentication Required

Learn how to get your API key to use this endpoint

Models

Available models:

  • dall-e-3
  • dall-e-2
  • stable-diffusion-xl

Parameters

prompt
string
required

Text description of the desired image

n
integer
default:"1"

Number of images to generate

size
string
default:"1024x1024"

Size of the generated images. Options: 1024x1024, 1024x1792, 1792x1024

quality
string
default:"standard"

Image quality. Options: standard, hd

style
string
default:"natural"

Image style. Options: natural, vivid

Example Request

curl --location 'https://api.taam.cloud/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "prompt": "a white siamese cat",
    "n": 1,
    "size": "1024x1024",
    "model": "dall-e-3",
    "quality": "standard",
    "style": "natural"
}'

Example Response

{
    "created": 1737411800,
    "data": [
        {
            "revised_prompt": "Visualize a Siamese cat with a predominantly white coat...",
            "url": "https://example.com/image.png"
        }
    ]
}

Authorizations

Authorization
string
header
required

Enter your API key prefixed with 'Bearer '

Body

application/json
prompt
string
required

Text description of the desired image

n
integer
default:1

Number of images to generate

size
enum<string>
default:1024x1024
Available options:
1024x1024,
1024x1792,
1792x1024
model
enum<string>
default:dall-e-3
Available options:
dall-e-3
quality
enum<string>
default:standard
Available options:
standard,
hd
style
enum<string>
default:natural
Available options:
natural,
vivid

Response

200 - application/json
Generated images
created
integer
data
object[]