Deploy MCP Server
AI & Machine Learning API Key

Stability AI REST API

Generate and edit images with AI-powered REST API

Stability AI provides a REST API for generating, editing, and enhancing images using state-of-the-art AI models including Stable Diffusion. Developers use it to integrate text-to-image generation, image-to-image transformation, upscaling, and inpainting capabilities into applications for creative workflows, content generation, and automated design processes.

Base URL https://api.stability.ai/v1

API Endpoints

MethodEndpointDescription
POST/generation/stable-diffusion-xl-1024-v1-0/text-to-imageGenerate images from text prompts using Stable Diffusion XL
POST/generation/stable-diffusion-xl-1024-v1-0/image-to-imageTransform existing images based on text prompts
POST/generation/stable-diffusion-xl-1024-v1-0/image-to-image/upscaleUpscale images using AI-powered enhancement
POST/generation/stable-diffusion-xl-1024-v1-0/image-to-image/maskingInpaint or edit specific parts of an image using masks
GET/engines/listList all available AI generation engines and models
GET/user/accountRetrieve account information and credit balance
GET/user/balanceGet current API credit balance
POST/generation/stable-diffusion-v1-6/text-to-imageGenerate images using Stable Diffusion v1.6 model
POST/generation/esrgan-v1-x2plus/image-to-image/upscaleUpscale images by 2x using ESRGAN model
POST/generation/stable-diffusion-xl-beta-v2-2-2/text-to-imageGenerate images using SDXL Beta v2.2.2 for experimental features
POST/generation/stable-diffusion-512-v2-1/text-to-imageGenerate 512x512 images using Stable Diffusion v2.1
DELETE/generation/{generation_id}Cancel an in-progress image generation request

Code Examples

curl -X POST https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/text-to-image \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk-your-api-key-here' \
  -d '{
    "text_prompts": [
      {
        "text": "A serene landscape with mountains and lake at sunset",
        "weight": 1
      }
    ],
    "cfg_scale": 7,
    "height": 1024,
    "width": 1024,
    "steps": 30,
    "samples": 1
  }'

Connect Stability AI to AI

Deploy a Stability AI MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Stability AI through these tools:

generate_image_from_text Generate AI images from natural language descriptions using Stable Diffusion models
transform_image Modify existing images based on text prompts while preserving structure
upscale_image Enhance and upscale images using AI-powered super-resolution
inpaint_image Edit specific regions of images using masks and text prompts
list_available_models Retrieve information about available generation engines and their capabilities

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Stability AI MCP Server →

Related APIs