POST
v1
/
replicate
/
imagegeneration
curl --request POST \
  --url http://localhost:9000/api/v1/replicate/imagegeneration \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=<string>' \
  --form width=123 \
  --form height=123 \
  --form num_outputs=123 \
  --form 'negative_prompt=<string>' \
  --form num_inference_steps=123 \
  --form 'scheduler=<string>' \
  --form guidance_scale=123 \
  --form prompt_strength=123 \
  --form lora_scale=123

Query

model
string
default:
"playgroundai/playground-v2.5-1024px-aesthetic"
required

The image model to be used;

Body

prompt
string
required

Input prompt

width
int
default:
"1024"

Width of output image. Recommended 1024 or 1280

height
int
default:
"1024"

Height of output image. Recommended 1024 or 1280

num_outputs
int
default:
"1"

Number of images to output.

negative_prompt
string

Negative Input prompt

num_inference_steps
int
default:
"25"

Number of denoising steps. 4 for best results

scheduler
string
default:
"DPMSolver++"

Scheduler. DPMSolver++ or DPM++2MKarras is recommended for most cases

guidance_scale
float
default:
"3.0"

Scale for classifier-free guidance

prompt_strength
float
default:
"0.8"

Prompt strength when using img2img / inpaint. 1.0 corresponds to full destruction of information in image

lora_scale
float
default:
"0.6"

LoRA additive scale. Only applicable on trained models.

image
file

Input image for img2img or inpaint mode

mask
file

Input image for img2img or inpaint mode