Text to Image
The Text to Image Generation API provides a simple yet powerful interface for converting text into amazing images.
Endpoint
POST /image/v1/text-to-image
Body
prompt
(string
, required): The text input to be converted into speech.numberOfResults
(number
, required): The number of images to generate [1-10].imageSizeId
(string
, optional): The ID of the image size. The following size IDs are accepted::6644b0c5ec3658a8e38d951b
2:36644b0c5ec3658a8e38d951c
1:16644b0c5ec3658a8e38d951d
3:26644b0c5ec3658a8e38d951e
4:36644b0c5ec3658a8e38d951f
3:46644b0c5ec3658a8e38d9520
16:96644b0c5ec3658a8e38d9521
9:166644b0c5ec3658a8e38d9522
20:96644b0c5ec3658a8e38d9523
9:206644b0c5ec3658a8e38d9524
2:16644b0c5ec3658a8e38d9525
1:26644b0c5ec3658a8e38d9526
5:46644b0c5ec3658a8e38d9527
4:5
styleId
(string
, optional): The ID of the image style. The following styles IDs are accepted::6644b0c5ec3658a8e38d94ec
Photo6644b0c5ec3658a8e38d94ed
Digital Art6644b0c5ec3658a8e38d94ee
3D6644b0c5ec3658a8e38d94ef
Painting6644b0c5ec3658a8e38d94f0
Low Poly6644b0c5ec3658a8e38d94f1
Pixel Art6644b0c5ec3658a8e38d94f2
Anime6644b0c5ec3658a8e38d94f3
Cyberpunk6644b0c5ec3658a8e38d94f4
Comic6644b0c5ec3658a8e38d94f5
Vintage6644b0c5ec3658a8e38d94f6
Cartoon6644b0c5ec3658a8e38d94f7
Vector6644b0c5ec3658a8e38d94f8
Studio Shot6644b0c5ec3658a8e38d94f9
Dark6644b0c5ec3658a8e38d94fa
Sketch6644b0c5ec3658a8e38d94fb
Mockup6644b0c5ec3658a8e38d94fc
2000s Phone6644b0c5ec3658a8e38d94fd
70s Vibe6644b0c5ec3658a8e38d94fe
Watercolor6644b0c5ec3658a8e38d94ff
Art Nouveau6644b0c5ec3658a8e38d9500
Origami6644b0c5ec3658a8e38d9501
Surreal6644b0c5ec3658a8e38d9502
Fantasy6644b0c5ec3658a8e38d9503
Traditional Japan
cameraId
(string
, optional): The ID of the camera style. The following camera IDs are accepted::6644b0c5ec3658a8e38d952c
Portrait6644b0c5ec3658a8e38d952d
Close Up6644b0c5ec3658a8e38d952e
Cinematic6644b0c5ec3658a8e38d952f
Panoramic6644b0c5ec3658a8e38d9530
Low Angle6644b0c5ec3658a8e38d9531
Symmetry6644b0c5ec3658a8e38d9532
Mid Shot6644b0c5ec3658a8e38d9533
Full Body6644b0c5ec3658a8e38d9534
Fish Eye6644b0c5ec3658a8e38d9535
First Person6644b0c5ec3658a8e38d9536
High Angle
colorId
(string
, optional): The ID of the color style. The following color IDs are accepted::6644b0c5ec3658a8e38d9502
Sepia6644b0c5ec3658a8e38d9503
Black and White6644b0c5ec3658a8e38d9504
Red and Blue6644b0c5ec3658a8e38d9505
Autumn6644b0c5ec3658a8e38d9506
Burgundy and Blue6644b0c5ec3658a8e38d9507
Pastel6644b0c5ec3658a8e38d9508
Vibrant6644b0c5ec3658a8e38d9509
Pastel Pink6644b0c5ec3658a8e38d950a
Cold Neon6644b0c5ec3658a8e38d950b
Deep Teal6644b0c5ec3658a8e38d950c
Muted Green6644b0c5ec3658a8e38d950d
Terracotta and Teal6644b0c5ec3658a8e38d950e
Dramatic6644b0c5ec3658a8e38d950f
Film Filter6644b0c5ec3658a8e38d9510
Split6644b0c5ec3658a8e38d9511
Electric6644b0c5ec3658a8e38d9512
Duotone
lightingId
(string
, optional): The ID of the lighting style. The following lighting IDs are accepted::6644b0c5ec3658a8e38d9538
Studio6644b0c5ec3658a8e38d9539
Warm6644b0c5ec3658a8e38d953a
Cinematic6644b0c5ec3658a8e38d953b
Volumetric6644b0c5ec3658a8e38d953c
Golden Hour6644b0c5ec3658a8e38d953d
Long Exposure6644b0c5ec3658a8e38d953e
Cold6644b0c5ec3658a8e38d953f
Iridescent6644b0c5ec3658a8e38d9540
Dramatic6644b0c5ec3658a8e38d9541
Hard Light6644b0c5ec3658a8e38d9542
Redscale6644b0c5ec3658a8e38d9543
Indoor Light
Example
Request
POST /image/v1/text-to-image
Content-Type: application/json
x-access-key: YOUR_ACCESS_KEY
{
"prompt": "<Input text>",
"dimensionsId": "<one of the dimensions IDs>",
"numberOfResults": <Number of images to generate 1-10>,
"styleId": "<one of the styles IDs>"
}
Response
Success
HTTP/1.1 200 OK
{
"data": [{"base64": <base64 image>}],
"success": true,
"message": "<process success message>"
}
Error
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"success": false,
"message": "<An error message containg the details>"
}