POST /replicate/v1/predictions
Method: POSTEndpoint: /replicate/v1/predictions
https://replicate.com/stability-ai/sdxl This section contains endpoint-specific behavior, parameters, or usage notes for this API.
Request Parameters
Header Parameters
text
Content-Type
string
Required
Example:
application/json
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
version
string
Required
input
object
Required
seed
integer
Required
image
string
Required
steps
integer
Required
prompt
string
Required
cfg_scale
integer
Required
scheduler
string
Required
sampler_name
string
Required
negative_prompt
string
Required
denoising_strength
number
Required
outpaint_direction
string
Required
overlay_original_img
boolean
Required
Example
{
"version"
:
"7762fd07cf82c948538e41f63f77d685e02b063e37e496e96eefd46c929f9bdc"
,
"input"
:
{
"width"
:
768
,
"height"
:
768
,
"prompt"
:
"An astronaut riding a rainbow unicorn, cinematic, dramatic"
,
"refine"
:
"expert_ensemble_refiner"
,
"scheduler"
:
"K_EULER"
,
"lora_scale"
:
0.6
,
"num_outputs"
:
1
,
"guidance_scale"
:
7.5
,
"apply_watermark"
:
false
,
"high_noise_frac"
:
0.8
,
"negative_prompt"
:
""
,
"prompt_strength"
:
0.8
,
"num_inference_steps"
:
25
}
}Example Request
Shell
bash
curl --location --request POST '/replicate/v1/predictions' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"version": "7762fd07cf82c948538e41f63f77d685e02b063e37e496e96eefd46c929f9bdc",
"input": {
"width": 768,
"height": 768,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
}'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
objectExample
json
{}