We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic…

FLUX.2 is live! High-fidelity image generation made simple.

A short intro on running Stable Diffusion on DeepInfra
Published on 2023.03.08 by Iskren
A short intro on running Stable Diffusion on DeepInfra

Pick a model

You can browse available text-to-image models on the models page.

For example, we'll use runwayml/stable-diffusion-v1-5.

Using the API

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'
copy

And check out the output in cube.jpg.

Advanced options

You can check all the available settings on the model page or via the API documentation tab.

Related articles
FLUX.1-dev Guide: Mastering Text-to-Image AI Prompts for Stunning and Consistent VisualsFLUX.1-dev Guide: Mastering Text-to-Image AI Prompts for Stunning and Consistent VisualsLearn how to craft compelling prompts for FLUX.1-dev to create stunning images.
Function Calling for AI APIs in DeepInfra — How to Extend Your AI with Real-World Logic - Deep InfraFunction Calling for AI APIs in DeepInfra — How to Extend Your AI with Real-World Logic - Deep Infra<p>Modern large language models (LLMs) are incredibly powerful at understanding and generating text, but until recently they were largely static: they could only respond based on patterns in their training data. Function calling changes that. It lets language models interact with external logic — your own code, APIs, utilities, or business systems — while still [&hellip;]</p>
Deploy Custom LLMs on DeepInfraDeploy Custom LLMs on DeepInfraDid you just finetune your favorite model and are wondering where to run it? Well, we have you covered. Simple API and predictable pricing. Put your model on huggingface Use a private repo, if you wish, we don't mind. Create a hf access token just for the repo for better security. Create c...