众扬汇 AI 开放平台 API 文档

绘图变化(UPSCALE; VARIATION; REROLL)

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: "本页接口说明详见下方接口定义;参数取值与返回以本平台实测为准。"
  version: 1.0.0
paths:
  /mj/submit/change:
    post:
      summary: 绘图变化(UPSCALE; VARIATION; REROLL)
      deprecated: true
      description: "该接口即将废弃,建议改用「执行动作」接口(功能更全、对接更简单)"
      operationId: changeUsingPOST
      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:
                action:
                  type: string
                  description: "操作类型:UPSCALE 放大、VARIATION 变换、REROLL 重新生成"
                  enum:
                    - UPSCALE
                    - VARIATION
                    - REROLL
                  examples:
                    - UPSCALE
                index:
                  type: integer
                  format: int32
                  description: "序号,取值 1–4;action 为 UPSCALE 或 VARIATION 时必传"
                  minimum: 1
                  maximum: 4
                  examples:
                    - 1
                notifyHook:
                  type: string
                  description: "回调地址,留空时使用全局 notifyHook"
                taskId:
                  type: string
                  description: "本次操作的标识,由平台生成"
                  examples:
                    - '9f2c1a4b7d0e5a83'
              required:
                - action
                - taskId
      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:
        - action
        - taskId
      properties:
        action:
          type: string
          description: "操作类型:UPSCALE 放大、VARIATION 变换、REROLL 重新生成"
          enum:
            - UPSCALE
            - VARIATION
            - REROLL
          examples:
            - UPSCALE
        index:
          type: integer
          format: int32
          description: "序号,取值 1–4;action 为 UPSCALE 或 VARIATION 时必传"
          minimum: 1
          maximum: 4
          examples:
            - 1
        notifyHook:
          type: string
          description: "回调地址,留空时使用全局 notifyHook"
        state:
          type: string
          description: "调用方透传的自定义参数"
        taskId:
          type: string
          description: "本次操作的标识,由平台生成"
          examples:
            - '9f2c1a4b7d0e5a83'
      title: 变化任务提交参数
    提交结果:
      type: object
      required:
        - code
        - description
      properties:
        code:
          type: integer
          format: int32
          description: "'状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)'"
          examples:
            - 1
        description: "该字段的取值与含义以本平台实际返回为准。"
          type: string
          description: "说明文字"
          examples:
            - 提交成功
        properties:
          type: object
          description: "扩展字段"
          properties: {}
        result:
          type: string
          description: "本次操作的标识,由平台生成"
          examples:
            - 9f2c1a4b7d0e5a83
      title: 提交结果
  securitySchemes: {}
servers: []
security: []

使用提示:本页接口的 Base URL 为 https://api.allyang.cn,请求头需携带 Authorization: Bearer <令牌>(令牌在控制台「令牌管理」中创建)。示例中的任务 ID、时间戳与文件地址均为示意值,实际以平台返回为准。

模型名请在「模型广场」复制后填入,不要手输;计费、限流与在售清单以平台实测为准(部分数值待补)。