Skip to content

Midjourney Proxy API 接口文档

前提条件

  • 提交任务时,必须携带header Authorization: Bearer sk-xxx替换为你在API.72Live.com的令牌/Key
  • 接口Base地址为:https://api.72live.com

提交Blend任务

接口地址:/mj/submit/blend

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

javascript
{
  "base64Array": [
    "data:image/png;base64,xxx1",
    "data:image/png;base64,xxx2"
  ],
  "dimensions": "SQUARE",
  "notifyHook": "",
  "state": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
blendDTOblendDTObodytrueBlend提交参数Blend提交参数
  base64Array图片base64数组truearraystring
  dimensions比例: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2),可用值:PORTRAIT,SQUARE,LANDSCAPEfalsestring
  notifyHook回调地址, 为空时使用全局notifyHookfalsestring
  state自定义参数falsestring

响应状态:

状态码说明schema
200OK提交结果
201Created
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
code状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)integer(int32)integer(int32)
description描述string
properties扩展字段object
result任务IDstring

响应示例:

javascript
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}

绘图变化

接口地址:/mj/submit/change

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

javascript
{
  "action": "UPSCALE",
  "index": 1,
  "notifyHook": "",
  "state": "",
  "taskId": "1320098173412546"
}

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
changeDTOchangeDTObodytrue变化任务提交参数变化任务提交参数
  actionUPSCALE(放大); VARIATION(变换); REROLL(重新生成),可用值:UPSCALE,VARIATION,REROLLtruestring
  index序号(1~4), action为UPSCALE,VARIATION时必传falseinteger(int32)
  notifyHook回调地址, 为空时使用全局notifyHookfalsestring
  state自定义参数falsestring
  taskId任务IDtruestring

响应状态:

状态码说明schema
200OK提交结果
201Created
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
code状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)integer(int32)integer(int32)
description描述string
properties扩展字段object
result任务IDstring

响应示例:

javascript
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}

提交Describe任务

接口地址:/mj/submit/describe

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

javascript
{
  "base64": "data:image/png;base64,xxx",
  "notifyHook": "",
  "state": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
describeDTOdescribeDTObodytrueDescribe提交参数Describe提交参数
  base64图片base64truestring
  notifyHook回调地址, 为空时使用全局notifyHookfalsestring
  state自定义参数falsestring

响应状态:

状态码说明schema
200OK提交结果
201Created
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
code状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)integer(int32)integer(int32)
description描述string
properties扩展字段object
result任务IDstring

响应示例:

javascript
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}

提交Imagine任务

接口地址:/mj/submit/imagine

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

javascript
{
  "base64Array": [],
  "notifyHook": "",
  "prompt": "Cat",
  "state": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
imagineDTOimagineDTObodytrueImagine提交参数Imagine提交参数
  base64Array垫图base64数组falsearraystring
  notifyHook回调地址, 为空时使用全局notifyHookfalsestring
  prompt提示词truestring
  state自定义参数falsestring

响应状态:

状态码说明schema
200OK提交结果
201Created
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
code状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)integer(int32)integer(int32)
description描述string
properties扩展字段object
result任务IDstring

响应示例:

javascript
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}

绘图变化-simple

接口地址:/mj/submit/simple-change

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

javascript
{
  "content": "1320098173412546 U2",
  "notifyHook": "",
  "state": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
simpleChangeDTOsimpleChangeDTObodytrue变化任务提交参数-simple变化任务提交参数-simple
  content变化描述: ID $action$indextruestring
  notifyHook回调地址, 为空时使用全局notifyHookfalsestring
  state自定义参数falsestring

响应状态:

状态码说明schema
200OK提交结果
201Created
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
code状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)integer(int32)integer(int32)
description描述string
properties扩展字段object
result任务IDstring

响应示例:

javascript
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}

任务查询

指定ID获取任务

接口地址:/mj/task/{id}/fetch

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
id任务IDpathfalsestring

响应状态:

状态码说明schema
200OK任务
401Unauthorized
403Forbidden
404Not Found

响应参数:

参数名称参数说明类型schema
action可用值:IMAGINE,UPSCALE,VARIATION,REROLL,DESCRIBE,BLENDstring
description任务描述string
failReason失败原因string
finishTime结束时间integer(int64)integer(int64)
id任务IDstring
imageUrl图片urlstring
progress任务进度string
prompt提示词string
promptEn提示词-英文string
startTime开始执行时间integer(int64)integer(int64)
state自定义参数string
status任务状态,可用值:NOT_START,SUBMITTED,IN_PROGRESS,FAILURE,SUCCESSstring
submitTime提交时间integer(int64)integer(int64)

响应示例:

javascript
{
    "action"
:
    "",
        "description"
:
    "",
        "failReason"
:
    "",
        "finishTime"
:
    0,
        "id"
:
    "",
        "imageUrl"
:
    "",
        "progress"
:
    "",
        "prompt"
:
    "",
        "promptEn"
:
    "",
        "startTime"
:
    0,
        "state"
:
    "",
        "status"
:
    "",
        "submitTime"
:
    0
}