메인 콘텐츠로 건너뛰기
POST
/
mj
/
submit
/
imagine
Create a Midjourney imagine task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/imagine \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a paper boat floating on calm water at sunrise --v 6.1"
}
'
{
  "code": 1,
  "description": "提交成功",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}
이 엔드포인트를 사용해 Midjourney의 기본 워크플로를 시작합니다. 이후의 모든 단계(업스케일, variation, custom zoom 포함)는 성공적인 imagine 작업에서 시작됩니다.

첫 번째 응답에서 제공되는 정보

  • result는 다음에 폴링할 task id입니다
  • description는 래퍼 메시지이며 현지화될 수 있습니다
  • code는 HTTP 스타일의 200이 아니어도 성공 코드일 수 있습니다

핵심 워크플로

1

imagine 작업 제출

프롬프트를 전송하고 반환된 task id를 저장합니다.
2

작업이 완료될 때까지 폴링

작업이 SUCCESS, MODAL, 또는 FAILURE에 도달할 때까지 Fetch Single Task를 사용합니다.
3

후처리 계속 진행

버튼이 표시되면 업스케일, variation, reroll, zoom 및 유사한 후속 작업을 위해 Action을 사용합니다.

선택적 비디오 프롬프트 패턴

원본 이미지에서 모션을 만들고 싶다면, 프롬프트에 이미지 URL과 --video, --motion 같은 Midjourney 비디오 플래그를 함께 추가하세요.
2026-03-12의 실시간 검증에서 FAST imagine 요청이 즉시 task id를 반환했고, 이후 fetch 요청이 imageUrl과 9개의 action 버튼이 포함된 SUCCESS 상태에 도달한 것이 확인되었습니다.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

application/json
prompt
string
필수

Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.

예시:

"a paper boat floating on calm water at sunrise --v 6.1"

botType
enum<string>
기본값:MID_JOURNEY

Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.

사용 가능한 옵션:
MID_JOURNEY,
NIJI_JOURNEY
accountFilter
object

Filter which Midjourney account modes may be used for this task.

base64Array
string[]

Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

응답

200 - application/json

Task accepted.

code
integer
필수
description
string
필수
result
string
필수

Task id returned after submission.

properties
object