众扬汇 AI 开放平台 API 文档

提交edits任务(图片编辑)

接口:POST /mj/submit/edits 归属:绘图模型/Mid journey/任务提交 调用地址:Base URL https://api.allyang.cn(OpenAI 兼容前缀 https://api.allyang.cn/v1)+ 上述路径 鉴权:请求头 Authorization: Bearer <你的令牌>;令牌在控制台「令牌管理」创建 说明:下方为本接口契约。路径、字段名与枚举取值与线上接口一致;叙述文字已按本平台口径重写。价格、并发与限流等数值以控制台及实际返回为准,未确认处标注「待补」。

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /mj/submit/edits:
    post:
      summary: 提交edits任务(图片编辑)
      description: ''
      tags:
        - 绘图模型/Mid journey/任务提交
        - 任务提交
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
            default: Bearer {{YOUR_API_KEY}}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                image:
                  type: string
                maskBase64:
                  type: string
                  description: "蒙版 base64,编辑区域用透明标示,尺寸可随意调节。"
                notifyHook:
                  type: string
              required:
                - prompt
                - image
            example: >-
              // 这个示例是在原来1:1的图片基础上,编辑区域并扩充,获得9:16的结果图,下面是结果图片

              //
              https://api.allyang.cn/<外部地址已按合规要求移除>

              {
                  "prompt": "几只鸟在飞",
                  "image": "https://api.allyang.cn/<外部地址已按合规要求移除>",
                  "maskBase64": "data:image/png;base64,<base64 数据略>"
              }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/%E6%8F%90%E4%BA%A4%E7%BB%93%E6%9E%9C'
          headers: {}
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
      security: []
components:
  schemas:
    提交结果:
      type: object
      required:
        - code
        - description
      properties:
        code:
          type: integer
          format: int32
          description: "1 表示提交成功、21 表示已存在、22 表示排队中,其余取值为错误。"
          examples:
            - 1
        description:
          type: string
          description: "描述。"
          examples:
            - 提交成功
        properties:
          type: object
          description: "扩展字段。"
          properties: {}
        result:
          type: string
          description: "任务 ID。"
          examples:
            - 1320098173412546
      title: 提交结果
  securitySchemes: {}
servers: []
security: []