Created
April 17, 2024 18:59
-
-
Save ttulttul/3d02a35c69b34d4cc7d083465290ea5f to your computer and use it in GitHub Desktop.
Bash script to use the Stable Diffusion 3 API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Assumes that your Stability API key is in STABILITY_KEY | |
PROMPT="$1" | |
DATE=$(date +%Y-%m-%d-%H%M%S) | |
curl -f -sS "https://api.stability.ai/v2beta/stable-image/generate/sd3" \ | |
-H "authorization: Bearer $STABILITY_KEY" \ | |
-H "accept: image/*" \ | |
-F prompt="$PROMPT" \ | |
-F output_format="jpeg" \ | |
-o "./sd3-$DATE.jpeg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment