메인 콘텐츠로 건너뛰기
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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

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

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

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

핵심 워크플로

1

imagine 작업 제출

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

작업이 완료될 때까지 폴링

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

후처리 계속 진행

버튼이 나타나면 업스케일, variation, reroll, zoom 및 유사한 후속 작업에 Action을 사용합니다.

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

원본 이미지에서 모션을 만들고 싶다면 프롬프트에 이미지 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
필수
description
string
필수
result
string
필수

Task id returned after submission.

properties
object