6
Today, we are pleased to announce the availability of Stable Diffusion 3 and Stable Diffusion 3 Turbo on the Stability AI Developer Platform API.
We have partnered with @FireworksAI_HQ , the fastest and most reliable API platform in the market, to deliver these models.
In… pic.twitter.com/4q4wUf870Q
— Stability AI (@StabilityAI) April 17, 2024
The SD3 way
How to Run SD3 Via API
pip install requests
import requests response = requests.post( f"https://api.stability.ai/v2beta/stable-image/generate/sd3", headers={ "authorization": f"PUT YOUR API KEYS HERE", "accept": "image/*" }, files={"none": ''}, data={ "prompt": "YOUR PROMPT HERE", "model": "sd3", "aspect_ratio": "16:9" }, ) if response.status_code == 200: with open("./SD3Output.jpeg", 'wb') as file: file.write(response.content) else: raise Exception(str(response.json()))