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

# images.edit（OpenAI 兼容）

> 与 `POST https://api.openai.com/v1/images/edits` 完全对齐（`multipart/form-data`）；同步返回图片结果。



## OpenAPI

````yaml POST /openai/v1/images/edits
openapi: 3.0.0
info:
  title: Openai AI
  description: API documentation for Openai AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: openai
    description: ''
  - name: openai-compat
    description: ''
paths:
  /openai/v1/images/edits:
    post:
      tags:
        - openai-compat
      summary: OpenAI images.edit 兼容
      description: >-
        与 `POST https://api.openai.com/v1/images/edits`
        完全对齐（`multipart/form-data`）；同步返回图片结果。
      operationId: OpenaiCompatController_edit
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenaiImageResponseDto'
      security:
        - bearerAuth: []
components:
  schemas:
    OpenaiImageResponseDto:
      type: object
      properties:
        created:
          type: number
          description: 创建时间（unix 秒）
        data:
          description: 图片列表
          type: array
          items:
            $ref: '#/components/schemas/OpenaiImageItemDto'
        background:
          type: string
          enum:
            - transparent
            - opaque
        output_format:
          type: string
          enum:
            - png
            - webp
            - jpeg
        quality:
          type: string
          enum:
            - low
            - medium
            - high
        size:
          type: string
        usage:
          $ref: '#/components/schemas/OpenaiImageUsageDto'
      required:
        - created
        - data
    OpenaiImageItemDto:
      type: object
      properties:
        url:
          type: string
          description: 图片 URL（如果 response_format=url）
        b64_json:
          type: string
          description: base64 编码（如果 response_format=b64_json）
        revised_prompt:
          type: string
          description: 模型改写后的 prompt
    OpenaiImageUsageDto:
      type: object
      properties:
        input_tokens:
          type: number
          description: prompt 中所有 token 数（含图 + 文本）
        input_tokens_details:
          $ref: '#/components/schemas/OpenaiImageUsageDetailsDto'
        output_tokens:
          type: number
          description: 模型生成的 token 数
        total_tokens:
          type: number
          description: 总 token 数
    OpenaiImageUsageDetailsDto:
      type: object
      properties:
        image_tokens:
          type: number
        text_tokens:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````