Make sure you add your s3 details for realtime server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after 24hours
Text to image endpoint result

Request

Make a POST request to below endpoint and pass the required parameters as a request body.
curl
--request POST 'https://modelslab.com/api/v1/enterprise/realtime/text2img' \

Body

{  
  "key" : "",  
  "prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner))",  
  "negative_prompt": "bad quality",  
  "width": "512",  
  "height": "512",  
  "safety_checker": false,  
  "seed": null,  
  "samples":1,  
  "base64":false,  
  "webhook": null,  
  "track_id": null
}

Body Attributes

key
string
required
Your API Key used for request authorization.
prompt
string
required
Text prompt with description of the things you want in the image to be generated.
negative_prompt
string
Items you don’t want in the image.
width
integer
default:"512"
Width of the image (max 1024).
height
integer
default:"512"
Height of the image (max 1024).
samples
integer
default:"1"
Number of images to be returned in response. Maximum is 4.
safety_checker
boolean
default:"true"
A checker for NSFW images. If such an image is detected, it will be replaced by a blank image.
seed
integer
Seed is used to reproduce results. Same seed will give you the same image again. Pass null for a random number.
instant_response
boolean
default:"false"
Queue response instantly before processing finishes. Options: true/false.
base64
boolean
default:"false"
Get response as base64 string. Options: true/false.
webhook
string
Set a URL to get a POST API call once the image generation is complete.
track_id
integer
This ID is returned in the response to the webhook API call. It will be used to identify the webhook request.
enhance_prompt
boolean
default:"true"
Enhance prompts for better results. Options: true/false.