메인 콘텐츠로 건너뛰기

개요

Midjourney는 현재 가장 인기 있는 AI 이미지 생성 도구 중 하나입니다. Ace Data Cloud는 이미지 생성, 편집, 설명, 비디오 등 기능을 지원하는 완전한 Midjourney API를 제공합니다.

API 엔드포인트

엔드포인트기능
POST /midjourney/imagine이미지 생성(주요 엔드포인트)
POST /midjourney/edits이미지 편집
POST /midjourney/describe이미지 설명
POST /midjourney/videos이미지에서 비디오 생성
POST /midjourney/seedSeed 값 가져오기
POST /midjourney/translate프롬프트 번역
POST /midjourney/tasks작업 상태 조회

기본 이미지 생성

import requests

response = requests.post(
    "https://api.acedata.cloud/midjourney/imagine",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A serene Japanese garden with cherry blossoms, ultra detailed --ar 16:9",
        "action": "generate",
        "mode": "fast",
    },
)
result = response.json()
print(result)

이미지 편집

업스케일(Upscale)

response = requests.post(
    "https://api.acedata.cloud/midjourney/imagine",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "action": "upscale",
        "image_id": "your-image-id",
    },
)

변형(Variation)

response = requests.post(
    "https://api.acedata.cloud/midjourney/imagine",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "action": "variation",
        "image_id": "your-image-id",
    },
)

이미지 설명

이미지에서 텍스트 설명 생성:
response = requests.post(
    "https://api.acedata.cloud/midjourney/describe",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "image_url": "https://example.com/your-image.jpg",
    },
)

프롬프트 팁

  • --ar 16:9를 사용하여 가로 세로 비율 제어
  • --q 2를 사용하여 품질 향상
  • --style raw를 사용하여 더 사실적인 효과 획득
  • translation: true 설정 시 중국어 프롬프트를 자동으로 영어로 번역

비동기 콜백

이미지 생성에는 시간이 걸리므로 콜백 URL 사용 권장:
response = requests.post(
    "https://api.acedata.cloud/midjourney/imagine",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A futuristic cityscape at night",
        "callback_url": "https://your-server.com/webhook",
    },
)

요약

Midjourney API는 Ace Data Cloud를 통해 완전한 이미지 생성 및 편집 기능을 제공합니다. 간단한 텍스트 기반 이미지 생성부터 복잡한 편집 작업까지 표준 REST API로 구현할 수 있습니다. platform.acedata.cloud에서 회원가입 후 체험해 보세요.