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-imageBody
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::6644b0c5ec3658a8e38d951b2:36644b0c5ec3658a8e38d951c1:16644b0c5ec3658a8e38d951d3:2
styleId(string, optional): The ID of the image style. The following styles IDs are accepted::6644b0c5ec3658a8e38d94ecPhoto6644b0c5ec3658a8e38d94edDigital Art6644b0c5ec3658a8e38d94ee3D6644b0c5ec3658a8e38d94efPainting6644b0c5ec3658a8e38d94f0Low Poly6644b0c5ec3658a8e38d94f1Pixel Art6644b0c5ec3658a8e38d94f2Anime6644b0c5ec3658a8e38d94f3Cyberpunk6644b0c5ec3658a8e38d94f4Comic6644b0c5ec3658a8e38d94f5Vintage6644b0c5ec3658a8e38d94f6Cartoon6644b0c5ec3658a8e38d94f7Vector6644b0c5ec3658a8e38d94f8Studio Shot6644b0c5ec3658a8e38d94f9Dark6644b0c5ec3658a8e38d94faSketch6644b0c5ec3658a8e38d94fbMockup6644b0c5ec3658a8e38d94fc2000s Phone6644b0c5ec3658a8e38d94fd70s Vibe6644b0c5ec3658a8e38d94feWatercolor6644b0c5ec3658a8e38d94ffArt Nouveau6644b0c5ec3658a8e38d9500Origami6644b0c5ec3658a8e38d9501Surreal6644b0c5ec3658a8e38d9502Fantasy6644b0c5ec3658a8e38d9503Traditional Japan
cameraId(string, optional): The ID of the camera style. The following camera IDs are accepted::6644b0c5ec3658a8e38d952cPortrait6644b0c5ec3658a8e38d952dClose Up6644b0c5ec3658a8e38d952eCinematic6644b0c5ec3658a8e38d952fPanoramic6644b0c5ec3658a8e38d9530Low Angle6644b0c5ec3658a8e38d9531Symmetry6644b0c5ec3658a8e38d9532Mid Shot6644b0c5ec3658a8e38d9533Full Body6644b0c5ec3658a8e38d9534Fish Eye6644b0c5ec3658a8e38d9535First Person6644b0c5ec3658a8e38d9536High Angle
colorId(string, optional): The ID of the color style. The following color IDs are accepted::6644b0c5ec3658a8e38d9502Sepia6644b0c5ec3658a8e38d9503Black and White6644b0c5ec3658a8e38d9504Red and Blue6644b0c5ec3658a8e38d9505Autumn6644b0c5ec3658a8e38d9506Burgundy and Blue6644b0c5ec3658a8e38d9507Pastel6644b0c5ec3658a8e38d9508Vibrant6644b0c5ec3658a8e38d9509Pastel Pink6644b0c5ec3658a8e38d950aCold Neon6644b0c5ec3658a8e38d950bDeep Teal6644b0c5ec3658a8e38d950cMuted Green6644b0c5ec3658a8e38d950dTerracotta and Teal6644b0c5ec3658a8e38d950eDramatic6644b0c5ec3658a8e38d950fFilm Filter6644b0c5ec3658a8e38d9510Split6644b0c5ec3658a8e38d9511Electric6644b0c5ec3658a8e38d9512Duotone
lightingId(string, optional): The ID of the lighting style. The following lighting IDs are accepted::6644b0c5ec3658a8e38d9538Studio6644b0c5ec3658a8e38d9539Warm6644b0c5ec3658a8e38d953aCinematic6644b0c5ec3658a8e38d953bVolumetric6644b0c5ec3658a8e38d953cGolden Hour6644b0c5ec3658a8e38d953dLong Exposure6644b0c5ec3658a8e38d953eCold6644b0c5ec3658a8e38d953fIridescent6644b0c5ec3658a8e38d9540Dramatic6644b0c5ec3658a8e38d9541Hard Light6644b0c5ec3658a8e38d9542Redscale6644b0c5ec3658a8e38d9543Indoor 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>"
}