Midjourney / MJ API
계획됨
구성된 경우 Midjourney 호환 제출, 조회, 이미지 및 작업 보조 경로를 사용합니다.
POST /mj/submit/imagine
Midjourney imagine 작업을 제출합니다. 예제는 선택된 최신 모델 문서 예제인 mj_imagine을 사용하며 Midjourney 요청 DTO의 모든 필드를 포함합니다.
MJ imagine 생성
curl https://www.token168.cc/mj/submit/imagine \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"prompt": "A clean product render --v 8 --ar 16:9",
"customId": "",
"botType": "MID_JOURNEY",
"notifyHook": "",
"action": "IMAGINE",
"index": 1,
"state": "client-trace-123",
"taskId": "",
"base64Array": [],
"content": "",
"maskBase64": ""
}'
POST /mj/submit/change
기존 MJ 작업에 업스케일 또는 변형 작업을 제출합니다.
MJ 변경
curl https://www.token168.cc/mj/submit/change \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"taskId": "mj_task_123",
"action": "UPSCALE",
"index": 1,
"customId": "MJ::JOB::upsample::1",
"state": "client-trace-123",
"content": ""
}'
POST /mj/submit/action 및 관련 제출 경로
Action, shorten, modal, simple-change, describe, blend, edits, video 및 upload-discord-images 경로는 같은 Midjourney 요청 형식을 공유하며 경로나 본문에서 action을 설정합니다.
MJ 제출 경로 예제
curl https://www.token168.cc/mj/submit/action \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"taskId": "mj_task_123",
"action": "VARIATION",
"index": 1,
"customId": "MJ::JOB::variation::1",
"state": "client-trace-123",
"content": ""
}'
curl https://www.token168.cc/mj/submit/shorten \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"prompt": "A long Midjourney prompt to shorten --v 8",
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
curl https://www.token168.cc/mj/submit/modal \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"taskId": "mj_task_123",
"customId": "MJ::JOB::modal",
"prompt": "Adjust the modal prompt",
"maskBase64": "",
"state": "client-trace-123"
}'
curl https://www.token168.cc/mj/submit/simple-change \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"taskId": "mj_task_123",
"action": "UPSCALE",
"index": 2,
"state": "client-trace-123"
}'
curl https://www.token168.cc/mj/submit/describe \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"base64Array": ["data:image/png;base64,..."],
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
curl https://www.token168.cc/mj/submit/blend \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"base64Array": ["data:image/png;base64,...", "data:image/png;base64,..."],
"dimensions": "SQUARE",
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
curl https://www.token168.cc/mj/submit/edits \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"prompt": "Replace the background with a clean studio wall",
"taskId": "mj_task_123",
"maskBase64": "data:image/png;base64,...",
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
curl https://www.token168.cc/mj/submit/video \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"taskId": "mj_task_123",
"prompt": "Animate this frame with a slow camera move",
"image": "https://example.com/frame.png",
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
curl https://www.token168.cc/mj/submit/upload-discord-images \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"base64Array": ["data:image/png;base64,..."],
"state": "client-trace-123",
"botType": "MID_JOURNEY"
}'
| 메서드 | 경로 | 상태 |
|---|---|---|
| POST | /mj/submit/action | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/shorten | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/modal | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/change | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/simple-change | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/describe | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/blend | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/edits | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/video | 계획됨 / 배포 설정에 따라 제한 |
| POST | /mj/submit/upload-discord-images | 계획됨 / 배포 설정에 따라 제한 |
GET /mj/task/{id}/fetch
현재 API Key 사용자의 MJ 작업 하나를 작업 ID로 조회합니다.
MJ 조회
curl https://www.token168.cc/mj/task/mj_task_123/fetch \
-H "Authorization: Bearer $TOKEN168_API_KEY"
POST /mj/task/list-by-condition
조건별로 MJ 작업을 나열합니다. 공급자 접근이 구성된 경우 대시보드 방식 폴링 또는 검색에 사용할 수 있습니다.
조건별 MJ 목록
curl https://www.token168.cc/mj/task/list-by-condition \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"mj_id": "mj_task_123",
"action": "IMAGINE",
"status": "SUCCESS"
}'
GET /mj/task/{id}/image-seed 및 GET /mj/image/{id}
MJ 경로 그룹에서 이미지 seed 및 이미지 프록시 보조 경로를 사용할 수 있습니다. 경로 매개변수와 동일한 API Key 인증을 사용합니다.
MJ 이미지 도우미
curl https://www.token168.cc/mj/task/mj_task_123/image-seed \
-H "Authorization: Bearer $TOKEN168_API_KEY"
curl https://www.token168.cc/mj/image/image_123 \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
--output mj-image.png
| 메서드 | 경로 | 상태 |
|---|---|---|
| GET | /mj/task/{id}/image-seed | 계획됨 / 배포 설정에 따라 제한 |
| GET | /mj/image/{id} | 계획됨 / 배포 설정에 따라 제한 |
POST /mj/insight-face/swap
배포에서 해당 기능을 활성화한 경우 MJ 경로 그룹을 통해 InsightFace 얼굴 교체 보조 요청을 제출합니다.
MJ InsightFace 얼굴 교체
curl https://www.token168.cc/mj/insight-face/swap \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-d '{
"sourceBase64": "data:image/png;base64,...",
"targetBase64": "data:image/png;base64,...",
"state": "client-trace-123"
}'