Hi-res Fix
You can use our in-house enhancement workflow
to make the image better and scale by 2x.
All you need to do is add "hires": true
to your params.
Tip
- Supports only 1 image generation per API call; Keep samples as 1
- Supports only sd 1.5 endpoints text2image, image2image, controlnet and inpainting
- With hires fix
- Without hires fix
https://api.imagepipeline.io/sd/text2image/v1
API-Key
{
"seed": 568878,
"width": 512,
"height": 512,
"prompt": "a blonde woman wearing a swimsuit on the beach, ultrarealistic, highly detailed, 8k",
"samples": 1,
"model_id": "0b397287-3449-4801-9a86-536465f6189f",
"scheduler": "EulerDiscreteScheduler",
"guidance_scale": 7,
"negative_prompt": "deformed anatomy",
"num_inference_steps": 20,
"hires": true
}
https://api.imagepipeline.io/sd/text2image/v1
API-Key
{
"seed": 568878,
"width": 512,
"height": 512,
"prompt": "a blonde woman wearing a swimsuit on the beach, ultrarealistic, highly detailed, 8k",
"samples": 1,
"model_id": "0b397287-3449-4801-9a86-536465f6189f",
"scheduler": "EulerDiscreteScheduler",
"guidance_scale": 7,
"negative_prompt": "deformed anatomy",
"num_inference_steps": 20,
"hires": false
}
JSON Parameters
Parameter | Permissible values | Notes |
---|---|---|
model_id | str | model_id can be found in models page. Filter by SD-1.5 models |
prompt | str, 75 tokens | Check our Prompt Guide for tips |
negative_prompt | str, 75 tokens | Check our Prompt Guide for tips |
num_inference_steps | int, [1-100] | Noise is removed with each step, resulting in a higher-quality image over time. Ideal value 20-30 |
samples | int, [1-4] | Generates a maximum of 4 samples per API call |
guidance_scale | float, [1-20] | Higher guidance scale prioritizes text prompt relevance but sacrifices image quality. Ideal value 7.5-12.5 |
width | int | Width in pixels. Lower than or equal to 512 for best results |
height | int | Height in pixels. Lower than or equal to 512 for best results |
hires | bool | Set to true for better image quality and 2x upscaling, but samples generated will be 1 |
Status
Your response will include a status
.
- If the
status
=SUCCESS
, you will also havedownload_urls
that will have the links to your generated image based on the number of samples you have entered. The maximum number of samples that can be generated is 4. - If the
status
=PENDING
, you will receive aid
. You can use the status endpoint to fetch your image using theid
. - If the
status
=FAILURE
, you will receive only an error message.
Endpoint: [GET]
https://api.imagepipeline.io/sd/text2image/v1/status/{{id}}
Pass the API-Key as the authorization in the header.