Stable Diffusion 3.5
Generate using Stable Diffusion 3.5 models, Stability AI latest base model:
-
Stable Diffusion 3.5 Large: At 8 billion parameters, with superior quality and prompt adherence, this base model is the most powerful in the Stable Diffusion family. This model is ideal for professional use cases at 1 megapixel resolution.
-
Stable Diffusion 3.5 Large Turbo: A distilled version of Stable Diffusion 3.5 Large. SD3.5 Large Turbo generates high-quality images with exceptional prompt adherence in just 4 steps, making it considerably faster than Stable Diffusion 3.5 Large.
-
Stable Diffusion 3.5 Medium: With 2.5 billion parameters, the model delivers an optimal balance between prompt accuracy and image quality, making it an efficient choice for fast high-performance image generation.
-
Stable Diffusion 3.5 Flash: A distilled version of Stable Diffusion 3.5 Medium. SD3.5 Flash generates high-quality images with a 4 step process instead of 40, making it faster than Stable Diffusion 3.5 Medium.
Read more about the model capabilities here.
As of April 17, 2025, we have deprecated the Stable Diffusion 3.0 APIs and will be automatically re-routing calls to Stable Diffusion 3.0 models to Stable Diffusion 3.5 APIs at no extra cost. You can read more in the release notes.
Try it out
Grab your API key and head over to
How to use
Please invoke this endpoint with a POST request.
The headers of the request must include an API key in the authorization field. The body of the request must be
multipart/form-data. The accept header should be set to one of the following:
image/*to receive the image in the format specified by theoutput_formatparameter.application/jsonto receive the image encoded as base64 in a JSON response.
Generating with a prompt
Commonly referred to as text-to-image, this mode generates an image from text alone. While the only required
parameter is the prompt, it also supports an aspect_ratio parameter which can be used to control the
aspect ratio of the generated image.
Generating with a prompt and an image
Commonly referred to as image-to-image, this mode also generates an image from text but uses an existing image as the starting point. The required parameters are:
prompt- text to generate the image fromimage- the image to use as the starting point for the generationstrength- controls how much influence theimageparameter has on the output imagemode- must be set toimage-to-image
Note: maximum request size is 10MiB.
Optional Parameters:
Both modes support the following optional parameters:
model- the model to use (SD 3.5 Large, SD 3.5 Large Turbo, SD 3.5 Medium, SD 3.5 Flash)output_format- the format of the output imageseed- the randomness seed to use for the generationnegative_prompt- keywords of what you do not wish to see in the output imagecfg_scale- controls how strictly the diffusion process adheres to the prompt textstyle_preset- guides the image model towards a particular style
Note: for more details about these parameters please see the request schema below.
Output
The resolution of the generated image will be 1MP. The default resolution is 1024x1024.
Credits
- SD 3.5 Large: Flat rate of 6.5 credits per successful generation.
- SD 3.5 Large Turbo: Flat rate of 4 credits per successful generation.
- SD 3.5 Medium: Flat rate of 3.5 credits per successful generation.
- SD 3.5 Flash: Flat rate of 2.5 credits per successful generation.
As always, you will not be charged for failed generations.
Authorizations
Use your Stability API key to authentication requests to this App.
Headers
Your Stability API key, used to authenticate your requests. Although you may have multiple keys in your account, you should use the same key for all requests to this API.
1The content type of the request body. Do not manually specify this header; your HTTP client library will automatically include the appropriate boundary parameter.
1"multipart/form-data"
Specify image/* to receive the bytes of the image directly. Otherwise specify application/json to receive the image as base64 encoded JSON.
image/*, application/json The name of your application, used to help us communicate app-specific debugging or moderation issues to you.
256"my-awesome-app"
A unique identifier for your end user. Used to help us communicate user-specific debugging or moderation issues to you. Feel free to obfuscate this value to protect user privacy.
256"DiscordUser#9999"
The version of your application, used to help us communicate version-specific debugging or moderation issues to you.
256"1.2.1"
Body
What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.
1 - 10000Controls whether this is a text-to-image or image-to-image generation, which affects which parameters are required:
- text-to-image requires only the
promptparameter - image-to-image requires the
prompt,image, andstrengthparameters
text-to-image, image-to-image The image to use as the starting point for the generation.
Supported formats:
- jpeg
- png
- webp
Supported dimensions:
- Every side must be at least 64 pixels
Important: This parameter is only valid for image-to-image requests.
Sometimes referred to as denoising, this parameter controls how much influence the
image parameter has on the generated image. A value of 0 would yield an image that
is identical to the input. A value of 1 would be as if you passed in no image at all.
Important: This parameter is only valid for image-to-image requests. For SD 3.5 Flash, the best results for image-to-image generation are achieved with a
strengthbetween .94 - .97.
0 <= x <= 1Controls the aspect ratio of the generated image. Defaults to 1:1.
Important: This parameter is only valid for text-to-image requests.
21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21 The model to use for generation.
sd3.5-largerequires 6.5 credits per generationsd3.5-large-turborequires 4 credits per generationsd3.5-mediumrequires 3.5 credits per generationsd3.5-flashrequires 2.5 credits per generation- As of the April 17, 2025,
sd3-large,sd3-large-turboandsd3-mediumare re-routed to theirsd3.5-[model version]equivalent, at the same price.
sd3.5-large, sd3.5-large-turbo, sd3.5-medium A specific value that is used to guide the 'randomness' of the generation. (Omit this parameter or pass 0 to use a random seed.)
0 <= x <= 4294967294Dictates the content-type of the generated image.
png, jpeg, webp Guides the image model towards a particular style.
enhance, anime, photographic, digital-art, comic-book, fantasy-art, line-art, analog-film, neon-punk, isometric, low-poly, origami, modeling-compound, cinematic, 3d-model, pixel-art, tile-texture Keywords of what you do not wish to see in the output image. This is an advanced feature.
10000How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt). The Large and Medium models use a default of 4. The Turbo and Flash model uses a default of 1.
1 <= x <= 10Response
Generation was successful.
The bytes of the generated image.
The finish-reason and seed will be present as headers.