跳转到主要内容
文生图,文图生图

Endpoint

POST /v1/mj/submit/imagine
分组: 图片 / midjourney

Headers

  • Content-Type: 必填 示例: application/json
  • Authorization: 可选 示例: Bearer $API_KEY

Request example

{
  "botType": "MID_JOURNEY",
  "prompt": "Cat",
  "base64Array": [

  ],
  "accountFilter": {
    "channelId": "",
    "instanceId": "",
    "modes": [

    ],
    "remark": "",
    "remix": true,
    "remixAutoConsidered": true
  },
  "notifyHook": "",
  "state": ""
}

Responses

  • 200: 成功

OpenAPI specification

openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/mj/submit/imagine:
    post:
      summary: 图片生成(Imagine)
      deprecated: false
      description: 文生图,文图生图
      tags:
        - 图片/midjourney
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer $API_KEY
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                botType:
                  type: string
                  description: >-
                    bot类型,mj(默认)或niji,可用值:MID_JOURNEY,NIJI_JOURNEY,示例值(MID_JOURNEY)
                prompt:
                  type: string
                  description: 提示词
                base64Array:
                  type: array
                  items:
                    type: string
                  description: 垫图base64数组(可以在上面的prompt里面 使用图片url+prompt的形式达到图文生图的效果)
                model:
                  type: string
                  description: mj-fast或mj-relax,默认mj-fast
              required:
                - botType
                - prompt
                - base64Array
                - model
              x-apifox-orders:
                - model
                - botType
                - prompt
                - base64Array
            example:
              botType: MID_JOURNEY
              prompt: Cat
              base64Array: []
              accountFilter:
                channelId: ''
                instanceId: ''
                modes: []
                remark: ''
                remix: true
                remixAutoConsidered: true
              notifyHook: ''
              state: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: '状态码: 1(提交成功), 22(排队中), other(错误)'
                  description:
                    type: string
                    description: 描述
                  properties:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: 扩展字段
                  result:
                    description: 任务id
                    type: integer
                required:
                  - code
                  - description
                  - properties
                  - result
                x-apifox-orders:
                  - code
                  - description
                  - properties
                  - result
              example:
                code: 1
                description: 提交成功
                properties: {}
                result: 12463258
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 图片/midjourney
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282827563-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []