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

# Stable Image Ultra

> Our most advanced text to image generation service, Stable Image Ultra creates the highest quality images
with unprecedented prompt understanding. Ultra excels in typography, complex compositions, dynamic lighting, 
vibrant hues, and overall cohesion and structure of an art piece. Made from the most advanced models,
including Stable Diffusion 3, Ultra offers the best of the Stable Diffusion ecosystem.

### Try it out
Grab your [API key](https://platform.stability.ai/account/keys) and head over to [![Open Google Colab](https://platform.stability.ai/svg/google-colab.svg)](https://colab.research.google.com/github/stability-ai/stability-sdk/blob/main/nbs/Stable_Image_API_Public.ipynb#scrollTo=yXhs626oZdr1)

### How to use
Please invoke this endpoint with a `POST` request.

The headers of the request must include an API key in the `authorization` field. The body of the request must be
`multipart/form-data`.  The accept header should be set to one of the following:
- `image/*` to receive the image in the format specified by the `output_format` parameter.
- `application/json` to receive the image in the format specified by the `output_format` parameter, but encoded to base64 in a JSON response.

The only required parameter is the `prompt` field, which should contain the text prompt for the image generation.

> **Note:** for the full list of optional parameters, please see the request schema below.

### Output
The resolution of the generated image will be 1 megapixel. The default resolution is 1024x1024.

### Credits
The Ultra service uses 8 credits per successful result. You will not be charged for failed results.



## OpenAPI

````yaml /en/api-reference/openapi.json post /sd/v2beta/stable-image/generate/ultra
openapi: 3.0.1
info:
  title: MaxAPI Model API
  description: >-
    APIs for text, image, video, audio, and music models available through
    MaxAPI.
  version: 1.0.0
servers:
  - url: https://api.maxapi.ai
    description: MaxAPI production
security: []
tags:
  - name: 模型接口
  - name: 模型接口/绘图模型
  - name: 模型接口/绘图模型/OpenAI Dall-e 格式
  - name: 模型接口/绘图模型/Flux系列
  - name: 模型接口/绘图模型/Flux系列/OpenAI Dalle 格式
  - name: 模型接口/绘图模型/Z-image
  - name: 模型接口/绘图模型/Banana生图异步格式(未来可能兼容其他模型)
  - name: 模型接口/聊天接口（Chat）
  - name: 模型接口/视频模型
  - name: 模型接口/视频模型/谷歌veo
  - name: 模型接口/视频模型/谷歌veo/VertexAI-VEO官方格式
  - name: 模型接口/视频模型/谷歌veo/VertexAI-VEO官方格式/视频生成
  - name: 模型接口/视频模型/谷歌veo/VertexAI-VEO官方格式/任务查询
  - name: 模型接口/视频模型/谷歌veo/AIStudio-VEO官方格式
  - name: 模型接口/视频模型/谷歌veo/AIStudio-VEO官方格式/视频生成
  - name: 模型接口/视频模型/谷歌veo/AIStudio-VEO官方格式/任务查询
  - name: 模型接口/视频模型/谷歌veo/AIStudio-VEO官方格式/下载视频(只有aistudio有这个动作)
  - name: 模型接口/视频模型/谷歌veo/GCP异步任务接口
  - name: 模型接口/视频模型/谷歌veo/官网逆向接口格式
  - name: 模型接口/视频模型/谷歌veo/官网逆向接口格式/视频生成
  - name: 模型接口/视频模型/谷歌veo/官网逆向接口格式/OpenAI官方视频格式(适配 newapi)
  - name: 模型接口/视频模型/Wan阿里万象(官方格式)
  - name: 模型接口/视频模型/豆包seedance(官方格式)
  - name: 模型接口/视频模型/Vidu官方格式
  - name: 模型接口/视频模型/Vidu官方格式/视频生成
  - name: 模型接口/视频模型/Vidu官方格式/图像生成
  - name: 模型接口/视频模型/Vidu官方格式/音频生成
  - name: 模型接口/视频模型/Vidu官方格式/其他功能
  - name: 模型接口/视频模型/Vidu官方格式/任务管理
  - name: 模型接口/视频模型/MiniMax-Hailuo官方格式
  - name: 模型接口/视频模型/MiniMax-Hailuo官方格式/视频生成
  - name: 模型接口/视频模型/MiniMax-Hailuo官方格式/任务管理
  - name: 模型接口/视频模型/MiniMax-Hailuo-OpenAI-Sora兼容格式
  - name: 模型接口/视频模型/MiniMax-Hailuo-OpenAI-Sora兼容格式/视频生成
  - name: 模型接口/视频模型/Sora-2-官方格式
  - name: 模型接口/视频模型/Sora-2-官方格式/创建角色接口
  - name: 模型接口/视频模型/Sora-2026-01-07新格式
  - name: 模型接口/自动补全接口（Completions）
  - name: 模型接口/图像接口（Images）
  - name: 模型接口/向量生成接口（Embeddings）
  - name: 模型接口/音频接口（Audio）
  - name: 模型接口/MJ图像(视频)接口
  - name: 模型接口/MJ图像(视频)接口/InsightFace任务提交
  - name: 模型接口/MJ图像(视频)接口/任务提交
  - name: 模型接口/MJ图像(视频)接口/任务查询
  - name: 模型接口/MJ图像(视频)接口/MJ视频相关
  - name: 模型接口/Suno音乐接口
  - name: 模型接口/Suno音乐接口/GoAmzAI格式
  - name: 模型接口/Suno音乐接口/GoAmzAI格式/v3.5
  - name: 模型接口/Suno音乐接口/GoAmzAI格式/v3.0
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/所有接口
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/场景1 生成自定义音乐(带歌词)
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/场景 2 通过提示词直接生成音乐(带歌词)
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/场景 4 通过提示词直接生成音乐(纯音乐)
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/场景3 生成自定义音乐(纯音乐)
  - name: 模型接口/Suno音乐接口/官网原生格式(v2)/场景 5 上传自定义音频并续写
  - name: 模型接口/Suno音乐接口/生成歌词
  - name: 模型接口/Suno音乐接口/NewAPI兼容格式
  - name: 模型接口/Luma视频接口
  - name: 模型接口/Luma视频接口/GoAmzAI格式
  - name: 模型接口/Luma视频接口/GoAmzAI格式/付费版
  - name: 模型接口/Luma视频接口/GoAmzAI格式/免费版
  - name: 模型接口/Luma视频接口/官网原生格式(v2)
  - name: 模型接口/SD图像接口
  - name: 模型接口/SD图像接口/SD3
  - name: 模型接口/SD图像接口/SDXL
  - name: 模型接口/Fish Audio
  - name: 模型接口/统一视频接口
  - name: 模型接口/统一视频接口/阿里Wan(万相视频
  - name: 模型接口/统一视频接口/Sora2视频
  - name: 模型接口/统一视频接口/Seedance(即梦视频
  - name: 模型接口/统一视频接口/Google-Veo
  - name: 历史接口
  - name: 历史接口/PPT类接入
  - name: 历史接口/请求示例
  - name: 历史接口/原始接口（参数需要定义后才能发送请求）
  - name: 佐糖API
  - name: MewXAI星月熊开放API
  - name: MewXAI星月熊开放API/开放API接口
  - name: MewXAI星月熊开放API/示例
  - name: Ideogram（绘画）
  - name: 可灵API
  - name: RunWay官方API
  - name: 视频生成
  - name: 任务查询
  - name: Wan官方格式
  - name: 图像生成
  - name: 音频生成
  - name: 其他功能
  - name: 任务管理
  - name: InsightFace任务提交
  - name: 任务提交
  - name: Generate
  - name: SDXL & SD1.6
paths:
  /sd/v2beta/stable-image/generate/ultra:
    post:
      tags:
        - MaxAPI endpoints
      summary: Stable Image Ultra
      description: >-
        Our most advanced text to image generation service, Stable Image Ultra
        creates the highest quality images

        with unprecedented prompt understanding. Ultra excels in typography,
        complex compositions, dynamic lighting, 

        vibrant hues, and overall cohesion and structure of an art piece. Made
        from the most advanced models,

        including Stable Diffusion 3, Ultra offers the best of the Stable
        Diffusion ecosystem.


        ### Try it out

        Grab your [API key](https://platform.stability.ai/account/keys) and head
        over to [![Open Google
        Colab](https://platform.stability.ai/svg/google-colab.svg)](https://colab.research.google.com/github/stability-ai/stability-sdk/blob/main/nbs/Stable_Image_API_Public.ipynb#scrollTo=yXhs626oZdr1)


        ### How to use

        Please invoke this endpoint with a `POST` request.


        The headers of the request must include an API key in the
        `authorization` field. The body of the request must be

        `multipart/form-data`.  The accept header should be set to one of the
        following:

        - `image/*` to receive the image in the format specified by the
        `output_format` parameter.

        - `application/json` to receive the image in the format specified by the
        `output_format` parameter, but encoded to base64 in a JSON response.


        The only required parameter is the `prompt` field, which should contain
        the text prompt for the image generation.


        > **Note:** for the full list of optional parameters, please see the
        request schema below.


        ### Output

        The resolution of the generated image will be 1 megapixel. The default
        resolution is 1024x1024.


        ### Credits

        The Ultra service uses 8 credits per successful result. You will not be
        charged for failed results.
      parameters:
        - name: authorization
          in: header
          description: ''
          required: true
          example: ''
          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
        - name: content-type
          in: header
          description: ''
          required: true
          example: ''
          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
        - name: accept
          in: header
          description: ''
          required: true
          example: ''
          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:
              - application/json
              - image/*
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                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.
                  example: ''
                negative_prompt:
                  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.
                  example: ''
                aspect_ratio:
                  type: string
                  enum:
                    - '16:9'
                    - '1:1'
                    - '21:9'
                    - '2:3'
                    - '3:2'
                    - '4:5'
                    - '5:4'
                    - '9:16'
                    - '9:21'
                  default: '1:1'
                  description: Controls the aspect ratio of the generated image.
                  example: '1:1'
                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.)
                  example: ''
                output_format:
                  type: string
                  enum:
                    - jpeg
                    - png
                    - webp
                  default: png
                  description: Dictates the `content-type` of the generated image.
                  example: png
              required:
                - prompt
            example:
              prompt: ''
              negative_prompt: ''
              aspect_ratio: '1:1'
              seed: ''
              output_format: png
      responses:
        '200':
          description: Request succeeded.
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: object
                properties:
                  image:
                    type: string
                    format: byte
                    description: Base64 编码的图片。
                  finish_reason:
                    type: string
                  seed:
                    type: integer
        '400':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: >-
                      A unique identifier associated with this error. Please
                      include this in any [support
                      tickets](https://stabilityplatform.freshdesk.com/support/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
        '403':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentModerationResponse'
        '413':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: >-
                      A unique identifier associated with this error. Please
                      include this in any [support
                      tickets](https://stabilityplatform.freshdesk.com/support/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
                example:
                  id: 4212a4b66fbe1cedca4bf2133d35dca5
                  name: payload_too_large
                  errors:
                    - 'body: payloads cannot be larger than 10MiB in size'
        '422':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: >-
                      A unique identifier associated with this error. Please
                      include this in any [support
                      tickets](https://stabilityplatform.freshdesk.com/support/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
                example:
                  id: ff54b236a3acdde1522cb1ba641c43ed
                  name: invalid_language
                  errors:
                    - English is the only supported language for this service.
        '429':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: >-
                      A unique identifier associated with this error. Please
                      include this in any [support
                      tickets](https://stabilityplatform.freshdesk.com/support/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
                example:
                  id: rate_limit_exceeded
                  name: rate_limit_exceeded
                  errors:
                    - >-
                      You have exceeded the rate limit of 150 requests within a
                      10 second period, and have been timed out for 60 seconds.
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: >-
                      A unique identifier associated with this error. Please
                      include this in any [support
                      tickets](https://stabilityplatform.freshdesk.com/support/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
                example:
                  id: 2a1b2d4eafe2bc6ab4cd4d5c6133f513
                  name: internal_error
                  errors:
                    - >-
                      An unexpected server error has occurred, please try again
                      later.
      deprecated: false
      security: []
components:
  schemas:
    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://stabilityplatform.freshdesk.com/support/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://stabilityplatform.freshdesk.com/support/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.

````