메인 콘텐츠로 건너뛰기
POST
/
mj
/
submit
/
action
Create a Midjourney follow-up action task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/action \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customId": "MJ::JOB::variation::3::example",
  "taskId": "1773314942177684"
}
'
{
  "code": 123,
  "description": "<string>",
  "result": "<string>",
  "properties": {
    "numberOfQueues": 123,
    "discordInstanceId": "<string>",
    "discordChannelId": "<string>"
  }
}
이 엔드포인트는 Midjourney 작업이 액션 버튼을 반환한 뒤에 사용합니다. 업스케일, variation, reroll, zoom, pan 같은 새로운 후속 작업을 시작합니다.

필요한 값 두 가지

  • 원래 또는 가장 최근의 Midjourney 작업에서 받은 taskId
  • 단일 작업 가져오기에서 반환된 최신 buttons 배열의 customId
customId는 고정된 값이 아닙니다. 절대 하드코딩하지 마세요. 항상 최신 폴링 응답에서 읽어오세요.

자주 사용하는 액션

  • U1부터 U4까지: 그리드에서 이미지 하나를 업스케일
  • V1부터 V4까지: 특정 이미지 위치를 기준으로 variation 생성
  • Reroll: 전체 그리드를 다시 생성
  • Zoom 및 Pan: 기존 구도를 확장

액션 제출 후

1

후속 작업 생성

taskIdcustomId를 전송한 다음, 새로 반환된 작업 id를 저장합니다.
2

새 작업 폴링

액션이 완료될 때까지 단일 작업 가져오기를 다시 조회합니다.
3

모달 전용 액션 처리

새 작업이 MODAL 상태에 도달하면 Modal로 계속 진행하여 추가 입력을 제공합니다.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

application/json
customId
string
필수

Action id taken from the latest buttons array returned by the fetch endpoint.

taskId
string
필수

Midjourney task id you want to continue from.

state
string

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

enableRemix
boolean

Whether to force remix mode when the current action supports it.

chooseSameChannel
boolean

Whether to prefer the same channel account used by the current task.

응답

200 - application/json

Action task accepted.

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

New Midjourney task id created for the action.

properties
object