> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stability.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# stable-image/inpaint

> Inpaint an existing image, with or without a mask, using our latest-and-greatest inpainting model.

### Search-and-Replace Mode
This mode is ideal for individuals of all levels of skill in design. It can be used for straightforward
adjustments to images. The service will automatically mask the most appropriate object based on the contents
of the `search_prompt`, and replace it with a generated result based on the `prompt`.

**How to use:** set the `mode` parameter to `search` and provide a short description of what to
search-and-replace in the `search_prompt` parameter.

### Mask Mode
This mode allows for precise control of generative fill tasks on an image, down to the level of
individual pixels. Design professionals can provide a `mask` for the section of the image to be replaced,
and use standard image prompting to describe the full image as it should appear after the editing.
The resulting image will incorporate all of the elements described in the `prompt`.

**How to use:** set the `mode` parameter to `mask` and either pass in an `image` with an alpha channel
or provide an explicit mask image to the `mask` parameter. If both are present the `mask` parameter will
take precedence.

### Price
- Requests with `mode` set to `search` cost 4 cents.
- Requests with `mode` set to `mask` cost 3 cents.



## OpenAPI

````yaml /openapi.json post /v2alpha/generation/stable-image/inpaint
openapi: 3.0.1
info:
  version: v2beta
  title: StabilityAI REST API
  description: >-
    Welcome to the Stability Platform API. As of March 2024, we are building the
    REST v2beta API service to be the primary API service for the Stability
    Platform.

    All AI services on other APIs (gRPC, REST v1, RESTv2alpha) will continue to
    be maintained, however they will not receive

    new features or parameters.


    If you are a REST v2alpha user, we strongly recommend that you adjust the
    URL calls for the specific services that you are using over to the
    equivalent REST v2beta URL. Normally, this means simply replacing "v2alpha"
    with "v2beta". We are not deprecating v2alpha URLs at this time for users
    that are currently using them.


    #### Authentication


    You will need your [Stability API
    key](https://platform.stability.ai/account/keys) in order to make requests
    to this API.

    Make sure you never share your API key with anyone, and you never commit it
    to a public repository. Include this key in

    the `Authorization` header of your requests.


    #### Rate limiting


    This API is rate-limited to 150 requests every 10 seconds. If you exceed
    this limit, you will receive a `429` response

    and be timed out for 60 seconds. If you find this limit too restrictive,
    please reach out to us via [this
    form](https://kb.stability.ai/knowledge-base/kb-tickets/new).


    #### Support


    Please see our [FAQ](https://platform.stability.ai/faq) for answers to
    common questions. If you have any other questions or concerns,

    please reach out to us via [this
    form](https://kb.stability.ai/knowledge-base/kb-tickets/new).


    To see the health of our APIs, please check our [Status
    Page](https://stabilityai.instatus.com/).
servers:
  - url: https://api.stability.ai
security:
  - STABILITY_API_KEY: []
tags:
  - name: Edit
    description: >-
      Tools for editing your own and generated images.


      **[Erase](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1erase/post)**


      The Erase service removes unwanted objects, such as blemishes on portraits
      or items on desks, using image masks.


      **[Outpaint](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1outpaint/post)**


      The outpaint service inserts additional content in an image to fill in the
      space in any direction, allowing you to "zoom-out" of an image.


      **[Inpaint](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1inpaint/post)**


      The Inpaint service modifies images by filling in or replacing specified
      areas with new content based on the content of a "mask" image.


      **[Search and
      Replace](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1search-and-replace/post)**


      The Search and Replace service, similar to inpaint, allows to replace
      specified areas with new content, but this time with the help of a prompt
      instead of a mask. The service will automatically segment the object and
      replace it with the object requested in the prompt.


      **[Search and
      Recolor](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1search-and-recolor/post)**


      The Search and Recolor service is another derivative of the inpaint
      service and provides the ability to change the color of a specific object
      in an image using a prompt. The Search and Recolor service will
      automatically segment the object and recolor it using the colors requested
      in the prompt.


      **[Remove
      Background](/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1remove-background/post)**


      The Remove Background service accurately segments the foreground from an
      image to removes the background.
  - name: Upscale
    description: >-
      Tools for increasing the size and resolution of your existing images.


      **[Fast
      Upscaler](/docs/api-reference#tag/Upscale/paths/~1v2beta~1stable-image~1upscale~1fast/post)**


      This service enhances image resolution by 4x using predictive and
      generative AI. This lightweight and fast service (processing in ~1 second)
      is ideal for enhancing the quality of compressed images, making it
      suitable for social media posts and other applications.


      **[Conservative
      Upscaler](/docs/api-reference#tag/Upscale/paths/~1v2beta~1stable-image~1upscale~1conservative/post)**


      This service can upscale images by 20 to 40 times up to a 4 megapixel
      output image with minimal alteration to the original image. The
      Conservative Upscaler can upscale images as small as 64x64 pixels directly
      to a 4 megapixel output. Use this option if you directly need a 4
      megapixel output.


      **[Creative
      Upscaler](/docs/api-reference#tag/Upscale/paths/~1v2beta~1stable-image~1upscale~1creative/post)**


      The service can upscale highly degraded images (lower than 1 megapixel)
      with a creative twist to provide high resolution results.
  - name: Generate
    description: >-
      Tools to generate new images from text, or create variations of existing
      images. Our different services include:


      **[Stable Image
      Ultra](/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1ultra/post)**:
      Photorealistic, Large-Scale Output


      Our state of the art text to image model based on Stable Diffusion 3.5.
      Stable Image Ultra Produces the highest quality, photorealistic outputs
      perfect for professional print media and large format applications. Stable
      Image Ultra excels at rendering exceptional detail and realism.


      **[Stable Image
      Core](/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1core/post)**:
      Fast and Affordable


      Optimized for fast and aﬀordable image generation, great for rapidly
      iterating on concepts during ideation. Stable Image Core is the next
      generation model following Stable Diffusion XL.


      **[Stable Diffusion 3.5 Model
      Suite](/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1sd3/post)**:
      Stability AI's latest base models


      The different versions of our open models are available via API, letting
      you test and adjust speed and quality based on your use case. All model
      versions strike a balance between generation speed and output quality and
      are ideal for creating high-volume, high-quality digital assets like
      websites, newsletters, and marketing materials.
  - name: Control
    description: >-
      Tools for generating precise, controlled variations of existing images or
      sketches.


      **[Sketch](/docs/api-reference#tag/Control/paths/~1v2beta~1stable-image~1control~1sketch/post)**


      This service upgrades sketches to refined outputs with precise control.
      For non-sketch images, it allows detailed manipulation of the final
      appearance by leveraging the contour lines and edges within the image.


      **[Structure](/docs/api-reference#tag/Control/paths/~1v2beta~1stable-image~1control~1structure/post)**


      This service excels in generating images by maintaining the structure of
      an input image, making it especially valuable for advanced content
      creation scenarios such as recreating scenes or rendering characters from
      models.


      **[Style](/docs/api-reference#tag/Control/paths/~1v2beta~1stable-image~1control~1style/post)**


      This service extracts stylistic elements from an input image (control
      image) and uses it to guide the creation of an output image based on the
      prompt. The result is a new image in the same style as the control image.
  - name: Results
    description: Tools for fetching the results of your async generations.
  - name: Stable Audio 2
    description: >-
      Tools to generate music and sound from text or audio, or transform
      existing audio clips into new compositions. Our different services
      include:


      **Stable Audio 2.5**: Fast, Best-Quality, Long-Form Music & Audio
      Generation


      Our most advanced audio generation model, capable of generating up to
      3-minute, 44.1 kHz stereo compositions. Stable Audio 2.5 supports
      text-to-audio, audio-to-audio, and audio-inpaint workflows - allowing
      creators to upload a sound and transform it into new instruments, styles,
      or genres using natural language prompts. Ideal for music production,
      cinematic sound design, and remixing.


      **Stable Audio 2.0**: High-Quality Audio Generation


      Built for text-to-audio and audio-to-audio generation, also capable of
      generating up to 3-minute, 44.1 kHz stereo. Stable Audio 2.0 is great for
      ideation, music demos, and ambient soundscapes. It's optimized for
      creative professionals seeking detailed and extended outputs from simple
      prompts.


      Stable Audio models were exclusively trained on licensed data from the
      [AudioSparx](https://www.audiosparx.com/) music library, honoring opt-out
      requests and ensuring fair compensation for creators. Additionally, Stable
      Audio 2.5 was pre-trained on licensed data from
      [Freesound](https://freesound.org/). Read more about the model
      capabilities [here](https://stability.ai/news/stable-audio-2-0).
    x-displayName: Stable Audio 2.5
  - name: Stable Audio
    description: >-
      Tools to generate music and sound from text or audio, or transform
      existing audio clips into new compositions. Our different services
      include:


      **Stable Audio 3.0**: Fast, Best-Quality, Long-Form Music & Audio
      Generation


      Our most advanced audio generation model, capable of generating up to
      6-minute, 44.1 kHz stereo compositions. Stable Audio 3.0 supports
      text-to-audio, audio-to-audio, and audio-inpaint workflows - allowing
      creators to upload a sound and transform it into new instruments, styles,
      or genres using natural language prompts. Ideal for music production,
      cinematic sound design, and remixing.


      Stable Audio models were exclusively trained on licensed data from the
      [AudioSparx](https://www.audiosparx.com/) music library, honoring opt-out
      requests and ensuring fair compensation for creators. Additionally, Stable
      Audio 3.0 was pre-trained on licensed data from
      [Freesound](https://freesound.org/). Read more about the model
      capabilities [here](https://stability.ai/news/stable-audio-3-0).
    x-displayName: Stable Audio 3.0
paths:
  /v2alpha/generation/stable-image/inpaint:
    post:
      tags:
        - v2alpha/generation
      summary: stable-image/inpaint
      description: >-
        Inpaint an existing image, with or without a mask, using our
        latest-and-greatest inpainting model.


        ### Search-and-Replace Mode

        This mode is ideal for individuals of all levels of skill in design. It
        can be used for straightforward

        adjustments to images. The service will automatically mask the most
        appropriate object based on the contents

        of the `search_prompt`, and replace it with a generated result based on
        the `prompt`.


        **How to use:** set the `mode` parameter to `search` and provide a short
        description of what to

        search-and-replace in the `search_prompt` parameter.


        ### Mask Mode

        This mode allows for precise control of generative fill tasks on an
        image, down to the level of

        individual pixels. Design professionals can provide a `mask` for the
        section of the image to be replaced,

        and use standard image prompting to describe the full image as it should
        appear after the editing.

        The resulting image will incorporate all of the elements described in
        the `prompt`.


        **How to use:** set the `mode` parameter to `mask` and either pass in an
        `image` with an alpha channel

        or provide an explicit mask image to the `mask` parameter. If both are
        present the `mask` parameter will

        take precedence.


        ### Price

        - Requests with `mode` set to `search` cost 4 cents.

        - Requests with `mode` set to `mask` cost 3 cents.
      parameters:
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/FormDataContentType'
        - schema:
            type: string
            default: image/*
            description: >-
              Specify `image/*` to get the image bytes directly. Otherwise
              specify `application/json` to receive the image as base64 encoded
              JSON.
            enum:
              - image/*
              - application/json
          required: false
          name: accept
          in: header
      requestBody:
        content:
          multipart/form-data:
            schema:
              oneOf:
                - $ref: '#/components/schemas/InpaintingSearchModeRequestBody'
                - $ref: '#/components/schemas/InpaintingMaskingModeRequestBody'
              discriminator:
                propertyName: mode
                mapping:
                  search: '#/components/schemas/InpaintingSearchModeRequestBody'
                  mask: '#/components/schemas/InpaintingMaskingModeRequestBody'
      responses:
        '200':
          $ref: '#/components/responses/ImageInpaintSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ContentModerated'
        '500':
          $ref: '#/components/responses/InternalError'
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.post(
                f"https://api.stability.ai/v2alpha/generation/stable-image/inpaint",
                headers={
                    "authorization": f"Bearer sk-MYAPIKEY"
                },
                files={
                    "image": open("./husky-in-a-field.png", "rb")
                },
                data={
                    "prompt": "golden retriever in a field",
                    "mode": "search",
                    "search_prompt": "dog",
                    "output_format": "webp",
                },
            )

            if response.status_code == 200:
                with open("./golden-retriever-in-a-field.webp", 'wb') as file:
                    file.write(response.content)
            else:
                raise Exception(str(response.json()))
        - lang: javascript
          label: JavaScript
          source: |-
            import fs from "node:fs";
            import axios from "axios";
            import FormData from "form-data";

            const formData = {
              image: fs.createReadStream("./husky-in-a-field.png"),
              prompt: "golden retriever standing in a field",
              mode: "search",
              search_prompt: "dog",
              output_format: "webp"
            };

            const response = await axios.postForm(
              `https://api.stability.ai/v2alpha/generation/stable-image/inpaint`,
              axios.toFormData(formData, new FormData()),
              {
                validateStatus: undefined,
                responseType: "arraybuffer",
                headers: { Authorization: `Bearer sk-MYAPIKEY`, accept: "image/*" },
              },
            );

            if(response.status === 200) {
              fs.writeFileSync("./golden-retriever-in-a-field.webp", Buffer.from(response.data));
            } else {
              throw new Error(`${response.status}: ${response.data.toString()}`);
            }
        - lang: terminal
          label: cURL
          source: >-
            curl -f -sS
            "https://api.stability.ai/v2alpha/generation/stable-image/inpaint" \
              -H "authorization: Bearer sk-MYAPIKEY" \
              -H "accept: image/*" \
              -F image=@"./husky-in-a-field.png" \
              -F prompt="golden retriever in a field" \
              -F mode="search" \
              -F search_prompt="dog" \
              -F output_format="webp" \
              -o "./golden-retriever-in-a-field.webp"
components:
  parameters:
    Authorization:
      schema:
        type: string
        description: >-
          Your [Stability API key](https://platform.stability.ai/account/keys),
          used to authenticate your requests. Although you may have multiple
          keys in your account, you should use the same key for all requests to
          this API.
        minLength: 1
      required: true
      name: authorization
      in: header
    FormDataContentType:
      schema:
        type: string
        minLength: 1
        description: >-
          The content type of the request body. Do not manually specify this
          header; your HTTP client library will automatically include the
          appropriate boundary parameter.
        example: multipart/form-data
      required: true
      name: content-type
      in: header
  schemas:
    InpaintingSearchModeRequestBody:
      type: object
      properties:
        mode:
          type: string
          enum:
            - search
          description: >-
            Controls how the model decides which areas to inpaint and which
            areas to leave alone.


            Specifying `mask` requires:
              - Provide an explicit mask image in the `mask` parameter
              - Use the alpha channel of the `image` parameter as the mask

            Specifying `search` requires:
              - Provide a small description of what to inpaint in the `search_prompt` parameter
        search_prompt:
          type: string
          description: Short description of what to inpaint in the `image`.
          example: glasses
        image:
          type: string
          description: |-
            The image you wish to inpaint.

            Supported Formats:
            - jpeg
            - png
            - webp

            Validation Rules:
            - Every side must be at least 64 pixels
            - Total pixel count must be between 4,096 and 9,437,184 pixels
          format: binary
          example: ./some/image.png
        prompt:
          $ref: '#/components/schemas/Prompt'
        negative_prompt:
          $ref: '#/components/schemas/NegativePrompt'
        seed:
          $ref: '#/components/schemas/Seed'
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          default: png
          description: Dictates the `content-type` of the generated image.
      required:
        - image
        - prompt
        - mode
        - search_prompt
    InpaintingMaskingModeRequestBody:
      type: object
      properties:
        mode:
          type: string
          enum:
            - mask
          description: >-
            Controls how the model decides which areas to inpaint and which
            areas to leave alone.


            Specifying `mask` requires:
              - Provide an explicit mask image in the `mask` parameter
              - Use the alpha channel of the `image` parameter as the mask

            Specifying `search` requires:
              - Provide a small description of what to inpaint in the `search_prompt` parameter
        mask:
          type: string
          description: >-
            Controls the strength of the inpainting process on a per-pixel
            basis, either via a

            second image (passed into this parameter) or via the alpha channel
            of the `image` parameter.


            **Passing in a Mask**


            The image passed to this parameter should be a black and white image
            that represents,

            at any pixel, the strength of inpainting based on how dark or light
            the given pixel is.

            Completely black pixels represent no inpainting strength while
            completely white pixels

            represent maximum strength.


            In the event the mask is a different size than the `image`
            parameter, it will be automatically resized.


            **Alpha Channel Support**


            If you don't provide an explicit mask, one will be derived from the
            alpha channel of the `image` parameter.

            Transparent pixels will be inpainted while opaque pixels will be
            preserved.


            In the event an `image` with an alpha channel is provided along with
            a `mask`, the `mask` will take precedence.
          format: binary
          example: ./some/image.png
        image:
          type: string
          description: |-
            The image you wish to inpaint.

            Supported Formats:
            - jpeg
            - png
            - webp

            Validation Rules:
            - Every side must be at least 64 pixels
            - Total pixel count must be between 4,096 and 9,437,184 pixels
          format: binary
          example: ./some/image.png
        prompt:
          $ref: '#/components/schemas/Prompt'
        negative_prompt:
          $ref: '#/components/schemas/NegativePrompt'
        seed:
          $ref: '#/components/schemas/Seed'
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          default: png
          description: Dictates the `content-type` of the generated image.
      required:
        - image
        - prompt
        - mode
    Prompt:
      type: string
      minLength: 1
      maxLength: 10000
      description: >-
        What you wish to see in the output image. A strong, descriptive prompt
        that clearly defines

        elements, colors, and subjects will lead to better results.


        To control the weight of a given word use the format `(word:weight)`,

        where `word` is the word you'd like to control the weight of and
        `weight`

        is a value between 0 and 1. For example: `The sky was a crisp (blue:0.3)
        and (green:0.8)`

        would convey a sky that was blue and green, but more green than blue.
    NegativePrompt:
      type: string
      maxLength: 10000
      description: >-
        A blurb of text describing what you **do not** wish to see in the output
        image.

        This is an advanced feature.
    Seed:
      type: number
      minimum: 0
      maximum: 4294967294
      default: 0
      description: >-
        A specific value that is used to guide the 'randomness' of the
        generation. (Omit this parameter or pass `0` to use a random seed.)
    ImageBinaryResponse:
      type: string
      description: |-
        The bytes of the generated image.

        The `finish-reason` and `seed` will be present as headers.
      format: binary
    ImageJSONResponse:
      type: object
      properties:
        image:
          type: string
          description: The generated image, encoded to base64.
          example: AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1...
        seed:
          allOf:
            - $ref: '#/components/schemas/Seed'
            - description: The seed used as random noise for this generation.
              example: 343940597
        finish_reason:
          type: string
          enum:
            - SUCCESS
            - CONTENT_FILTERED
          description: >-
            The reason the generation finished.


            - `SUCCESS` = successful generation.

            - `CONTENT_FILTERED` = successful generation, however the output
            violated our content moderation

            policy and has been blurred as a result.
          example: SUCCESS
      required:
        - image
        - finish_reason
    Error:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: >-
            A unique identifier associated with this error. Please include this
            in any [support
            tickets](https://kb.stability.ai/knowledge-base/kb-tickets/new)

            you file, as it will greatly assist us in diagnosing the root cause
            of the problem.
          example: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
        name:
          type: string
          minLength: 1
          description: >-
            Short-hand name for an error, useful for discriminating between
            errors with the same status code.
          example: bad_request
        errors:
          type: array
          items:
            type: string
          minItems: 1
          description: One or more error messages indicating what went wrong.
          example:
            - 'some-field: is required'
      required:
        - id
        - name
        - errors
    ContentModerationResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: >-
            A unique identifier associated with this error. Please include this
            in any [support
            tickets](https://kb.stability.ai/knowledge-base/kb-tickets/new)

            you file, as it will greatly assist us in diagnosing the root cause
            of the problem.
          example: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
        name:
          type: string
          minLength: 1
          description: >-
            Our content moderation system has flagged some part of your request
            and subsequently denied it.  You were not charged for this request. 
            While this may at times be frustrating, it is necessary to maintain
            the integrity of our platform and ensure a safe experience for all
            users.


            If you would like to provide feedback, please use the [Support
            Form](https://kb.stability.ai/knowledge-base/kb-tickets/new).
          enum:
            - content_moderation
        errors:
          type: array
          items:
            type: string
          minItems: 1
          description: One or more error messages indicating what went wrong.
          example:
            - 'some-field: is required'
      required:
        - id
        - name
        - errors
      description: Your request was flagged by our content moderation system.
      example:
        id: ed14db44362126aab3cbd25cca51ffe3
        name: content_moderation
        errors:
          - >-
            Your request was flagged by our content moderation system, as a
            result your request was denied and you were not charged.
  responses:
    ImageInpaintSuccess:
      description: Inpainting was successful.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestID'
        content-type:
          description: |-
            The format of the generated image.

             To receive the bytes of the image directly, specify `image/*` in the accept header. To receive the bytes base64 encoded inside of a JSON payload, specify `application/json`.
          examples:
            jpeg:
              description: raw bytes
              value: image/jpeg
            jpegJSON:
              description: base64 encoded
              value: application/json; type=image/jpeg
            png:
              description: raw bytes
              value: image/png
            pngJSON:
              description: base64 encoded
              value: application/json; type=image/png
            webp:
              description: raw bytes
              value: image/webp
            webpJSON:
              description: base64 encoded
              value: application/json; type=image/webp
          schema:
            type: string
        finish-reason:
          $ref: '#/components/headers/ImageFinishReason'
        seed:
          $ref: '#/components/headers/Seed'
      content:
        image/jpeg:
          example: The bytes of the generated jpeg
          schema:
            $ref: '#/components/schemas/ImageBinaryResponse'
        application/json; type=image/jpeg:
          schema:
            $ref: '#/components/schemas/ImageJSONResponse'
        image/png:
          example: The bytes of the generated png
          schema:
            $ref: '#/components/schemas/ImageBinaryResponse'
        application/json; type=image/png:
          schema:
            $ref: '#/components/schemas/ImageJSONResponse'
        image/webp:
          example: The bytes of the generated webp
          schema:
            $ref: '#/components/schemas/ImageBinaryResponse'
        application/json; type=image/webp:
          schema:
            $ref: '#/components/schemas/ImageJSONResponse'
    BadRequest:
      description: Invalid parameter(s), see the `errors` field for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentModerated:
      description: Your request was flagged by our content moderation system.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ContentModerationResponse'
    InternalError:
      description: >-
        An internal error occurred. If the problem persists [contact
        support](https://kb.stability.ai/knowledge-base/kb-tickets/new).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            id: 2a1b2d4eafe2bc6ab4cd4d5c6133f513
            name: internal_error
            errors:
              - An unexpected server error has occurred, please try again later.
  headers:
    RequestID:
      description: A unique identifier for this request.
      schema:
        type: string
    ImageFinishReason:
      schema:
        type: string
        enum:
          - SUCCESS
          - CONTENT_FILTERED
      description: >-
        Indicates the reason the generation finished.


        - `SUCCESS` = successful generation.

        - `CONTENT_FILTERED` = successful generation, however the output
        violated our content moderation

        policy and has been blurred as a result.


        > **NOTE:** This header is absent on JSON encoded responses because it
        is present in the body as `finish_reason`.
    Seed:
      description: >-
        The seed used as random noise for this generation.


        > **NOTE:** This header is absent on JSON encoded responses because it
        is present in the body as `seed`.
      example: '343940597'
      schema:
        type: string
  securitySchemes:
    STABILITY_API_KEY:
      type: apiKey
      name: authorization
      in: header
      description: >-
        Use your [Stability API key](https://platform.stability.ai/account/keys)
        to authentication requests to this App.

````