Published on 2023.03.08 by Iskren
You can browse available text-to-image models on the models page.
For example, we'll use runwayml/stable-diffusion-v1-5
.
curl -X POST \
-d '{"prompt": "A photo of a cube floating in space"}' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer YOUR_API_KEY" \
-o cube.jpg \
'https://api.deepinfra.com/v1/inference/runwayml/stable-diffusion-v1-5'
And check out the output in cube.jpg
.
You can check all the available settings on the model page or via the API documentation tab.