Create Task Stability AI/Stable Diffusion

official文档: https://replicate.com/stability-ai/stable-diffusion

Endpoint

POST http://v98store.com/replicate/v1/predictions

cURL Command

curl -X POST 'http://v98store.com/replicate/v1/predictions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -d '{ "version": "stability-ai/stable-diffusion:ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4", "input": { "width": 768, "height": 768, "prompt": "an astronaut riding a horse on mars, hd, dramatic lighting", "scheduler": "K_EULER", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 50 } }'

Parameters

NameInDescriptionRequired
AuthorizationheaderNo

Request Body

Example

{
  "version": "stability-ai/stable-diffusion:ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4",
  "input": {
    "width": 768,
    "height": 768,
    "prompt": "an astronaut riding a horse on mars, hd, dramatic lighting",
    "scheduler": "K_EULER",
    "num_outputs": 1,
    "guidance_scale": 7.5,
    "num_inference_steps": 50
  }
}

Responses

200 -

Example

{
  "created": 1589478378,
  "data": [
    {
      "url": "https://..."
    },
    {
      "url": "https://..."
    }
  ]
}