Stable Diffusion XL
Diffute now supports Stable Diffusion XL!
Get an API key
Before you can make requests to the Diffute API, you will need to create an API key. Create an org and a project, and then generate an API key by following the "Create API Key" link.
Use the Stable Diffusion XL 1.0 Model ID
"stabilityai/stable-diffusion-xl-base-1.0"
Simply use stabilityai/stable-diffusion-xl-base-1.0
as the value for the pretrained_model_name
key as follows in your requests:
Example of an inference request
curl --request PUT \
--url https://api.diffute.com/v1/project/<organization_id>/<project_id>/media/inference \
--header 'Content-Type: application/json' \
--header 'x-api-key: long-api-key/default' \
--data '{
"prompts": [
{
"name": "Ansel_Adams",
"prompt": "A series of black and white photographs capturing the beauty and grandeur of Yosemite National Park",
"num_images": 3,
"height": 1024,
"width": 768,
"style": "photography in the style of Ansel Adams"
},
{
"name": "Henri_Rousseau",
"prompt": "A painting of a lush jungle scene with a variety of exotic plants and animals",
"num_images": 3,
"height": 1024,
"width": 768,
"style": "painting in the style of Henri Rousseau"
},
{
"name": "Rachel_Ruysch",
"prompt": "Still life painting featuring a variety of flowers and plants found in a garden",
"num_images": 3,
"height": 1024,
"width": 768,
"style": "painting in the style of Rachel Ruysch"
}
],
"webhook" : "https://example.com/customer/12345",
"secret" : "4f986e48-0129-480e-996a-728ea57c020c",
"pretrained_model_name" : "stabilityai/stable-diffusion-xl-base-1.0",
"name" : "Houston"
}'
What's next?
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the Diffute API: