提交Imagine任务(文生图、文图生图)
接口:POST /mj/submit/imagine 归属:绘图模型/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/imagine:
post:
summary: 提交Imagine任务(文生图、文图生图)
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:
base64Array:
type: array
description: "垫图 base64 数组。"
items:
type: string
refType: string
prompt:
type: string
description: "提示词。"
examples:
- Cat
required:
- prompt
examples: {}
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:
Imagine提交参数:
type: object
required:
- prompt
properties:
base64Array:
type: array
description: "垫图 base64 数组。"
items:
type: string
refType: string
notifyHook:
type: string
description: "回调地址,留空则走全局 notifyHook。"
prompt:
type: string
description: "提示词。"
examples:
- Cat
state:
type: string
description: "自定义参数。"
title: Imagine提交参数
提交结果:
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: []