Skip to main content
POST
cURL
이 엔드포인트를 사용해 Midjourney의 메인 워크플로를 시작합니다. 업스케일, variation, custom zoom을 포함한 이후의 모든 단계는 성공적인 imagine 작업에서 시작됩니다.

첫 번째 응답에서 제공되는 내용

  • result는 다음에 폴링할 task id입니다
  • code는 HTTP 스타일의 200이 아닐 때도 여전히 성공 코드일 수 있습니다

핵심 워크플로

1

imagine 작업 제출

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

작업이 완료될 때까지 폴링

작업이 SUCCESS, MODAL, 또는 FAILURE에 도달할 때까지 단일 작업 가져오기를 사용합니다.
3

후처리 계속 진행

버튼이 나타나면 Action을 사용해 upscale, variation, reroll, zoom 및 이와 유사한 후속 작업을 수행합니다.

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

소스 이미지에서 모션을 만들고 싶다면 프롬프트에 이미지 URL과 --video, --motion 같은 Midjourney 비디오 플래그를 추가하세요.

인증

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
필수

Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.

description
string
필수
result
string
필수

Task id returned after submission.

properties
object