Stability AI Outpaint API

Extend the boundaries of an image by generating new content that seamlessly continues the existing scene in any direction.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Generative Media AE-110.20

Operations 1

POST /v2beta/stable-image/edit/outpaint Extend an image beyond its boundaries #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stability-ai:stability-ai-outpaint-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stability-ai-outpaint-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stability AI Stable Image Edit Outpaint API
  description: The Stability AI Stable Image Edit API provides image editing capabilities including inpainting, outpainting, object erasing, background removal, and search-and-replace functionality. Developers can use natural language prompts to modify existing images, fill in masked regions, extend image boundaries, or replace specific objects within a scene. These tools enable advanced image manipulation workflows without requiring traditional image editing expertise.
  version: v2beta
  contact:
    name: Stability AI Support
    url: https://platform.stability.ai
  termsOfService: https://stability.ai/terms-of-service
servers:
- url: https://api.stability.ai
  description: Production Server
security:
- bearerAuth: []
tags:
- name: Outpaint
  description: Extend the boundaries of an image by generating new content that seamlessly continues the existing scene in any direction.
paths:
  /v2beta/stable-image/edit/outpaint:
    post:
      operationId: editImageOutpaint
      summary: Extend an image beyond its boundaries
      description: Extends an image by generating new content beyond its current boundaries. Specify the number of pixels to extend in each direction and optionally provide a text prompt to guide the content of the extended regions. The generated content seamlessly continues the existing scene.
      tags:
      - Outpaint
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OutpaintRequest'
      responses:
        '200':
          description: Successfully outpainted image
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                $ref: '#/components/schemas/EditImageResponse'
        '400':
          description: Bad request due to invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized due to missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden due to content moderation or insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    OutpaintRequest:
      type: object
      required:
      - image
      properties:
        image:
          type: string
          format: binary
          description: The source image to extend.
        prompt:
          type: string
          maxLength: 10000
          description: Optional text describing what should appear in the extended regions.
        left:
          type: integer
          minimum: 0
          description: Number of pixels to extend to the left.
        right:
          type: integer
          minimum: 0
          description: Number of pixels to extend to the right.
        up:
          type: integer
          minimum: 0
          description: Number of pixels to extend upward.
        down:
          type: integer
          minimum: 0
          description: Number of pixels to extend downward.
        seed:
          type: integer
          minimum: 0
          maximum: 4294967294
          default: 0
          description: A value to control randomness in generation.
        output_format:
          type: string
          enum:
          - jpeg
          - png
          - webp
          default: png
          description: The output format of the edited image.
    ErrorResponse:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error instance.
        name:
          type: string
          description: The error type name.
        message:
          type: string
          description: A human-readable description of the error.
    EditImageResponse:
      type: object
      properties:
        image:
          type: string
          description: Base64-encoded image data when Accept header is set to application/json.
        finish_reason:
          type: string
          enum:
          - SUCCESS
          - CONTENT_FILTERED
          description: The reason the edit finished.
        seed:
          type: integer
          description: The seed used for generation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Pass your Stability AI API key as a Bearer token in the Authorization header.
externalDocs:
  description: Stability AI API Documentation
  url: https://platform.stability.ai/docs/api-reference