Skip to main content

Midjourney API Quickstart

Use this guide when you want to go from API key to your first working Midjourney API integration on TTAPI.

What You Will Build

This quickstart covers the core Midjourney flow:
  1. Submit an image generation request
  2. Poll the task status
  3. Continue the workflow with an action such as upscale or variation

Step 1: Generate An Image

Start with the Midjourney Imagine API. This is the main entry point for prompt-based image generation.
curl --request POST \
  --url https://api.ttapi.io/midjourney/v1/imagine \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: YOUR_API_KEY' \
  --data '
{
  "prompt": "cinematic portrait of an astronaut in neon rain",
  "mode": "fast",
  "hookUrl": "https://your-domain.com/webhook"
}
'

Step 2: Fetch The Result

Midjourney jobs are asynchronous. After you receive a jobId, poll the Midjourney Fetch API.
curl --request GET \
  --url "https://api.ttapi.io/midjourney/v1/fetch?jobId=YOUR_JOB_ID" \
  --header 'TT-API-KEY: YOUR_API_KEY'

Step 3: Continue The Workflow

Once the initial grid is ready, use the Midjourney Action API for operations such as:
  • Upscale
  • Variation
  • Reroll
  • Pan
  • Zoom
GoalRecommended path
Prompt to imageImagine -> Fetch
Continue a strong resultImagine -> Fetch -> Action
Blend multiple sourcesBlend -> Fetch
Edit part of an imageInpaint -> Fetch
Last modified on April 14, 2026