A REST API service for upscaling images and generating videos using Stability AI's APIs.
Upscale an image using Stability AI's upscaling API.
Supports fast, conservative, and creative upscaling types.
Required parameters:
image
: The image file to upscale (multipart/form-data)Optional parameters:
type
: Upscale type - "fast", "conservative", or "creative" (default: "fast")prompt
: Text prompt to guide upscaling (required for "conservative" and "creative" types)negative_prompt
: Negative prompt to guide upscalingseed
: Seed for consistent resultscreativity
: Creativity level (0.1-0.5)output_format
: Output format - "png", "jpeg", or "webp" (default: "png")style_preset
: Style preset for creative upscaling (e.g., "enhance", "anime", "photographic")Poll for the result of a creative upscale request.
Replace {id}
with the ID returned from a creative upscale request.
Generate a video from an image using Stability AI's image-to-video API.
Required parameters:
image
: The image file to use as the base for video generation (multipart/form-data)motion
: The motion type to apply (e.g., "zoom", "pan", "rotate", "zoom_out", "pan_left", etc.)duration
: The duration of the video in seconds (0.5-8.0)fps
: Frames per second (1-60)Optional parameters:
prompt
: Text prompt to guide video generationnegative_prompt
: Negative prompt to guide video generationseed
: Seed for consistent resultscfg_scale
: Creativity level (0.0-1.0)resolution
: Video resolution - "512x512", "768x768", "1024x576", or "576x1024" (default: "512x512")output_format
: Output format - "mp4", "gif", or "webm" (default: "mp4")Poll for the result of a video generation request.
Replace {id}
with the ID returned from an image-to-video request.
Check the health status of the API.
This API implements multiple layers of security:
All API endpoints (except /health) require authentication using a bearer token. Include the client API key in the Authorization header:
Authorization: Bearer your_client_api_key
Note: This client API key is different from the Stability AI API key. The Stability AI key is kept secure on the server.
If configured, each request must include an approved App ID in the X-App-ID header:
X-App-ID: your_approved_app_id
The server can be configured to only accept requests from specific IP addresses.
The API implements rate limiting to prevent abuse.
Example of upscaling an image using the fast method:
curl -X POST https://stability-go.fly.dev/api/v1/upscale \ -H "Authorization: Bearer your_client_api_key" \ -H "X-App-ID: your_app_id" \ -F "image=@path/to/image.jpg" \ -F "type=fast"
Example of creative upscaling (returns an ID for polling):
curl -X POST https://stability-go.fly.dev/api/v1/upscale \ -H "Authorization: Bearer your_client_api_key" \ -H "X-App-ID: your_app_id" \ -F "image=@path/to/image.jpg" \ -F "type=creative" \ -F "prompt=high quality detailed fantasy landscape"
Polling for a creative upscale result:
curl -X GET https://stability-go.fly.dev/api/v1/upscale/result/your_id_here \ -H "Authorization: Bearer your_client_api_key" \ -H "X-App-ID: your_app_id"