Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt

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

Midjourney API

Most Midjourney integrations are straightforward at the submit step and messy after the first result comes back. This page is meant to reduce that confusion. If you are starting from a text prompt, use Imagine. If you already have a finished grid and want to keep working from it, use Action. If the workflow starts from several source images, use Blend. If you need to change only one part of an image, use Inpaint. On TTAPI, those workflows live under one Midjourney API family, with Fetch handling the async part in the middle.

Get Started

Key Features

Start from text, then keep the workflow alive

Midjourney Imagine is the normal starting point. It creates the initial grid and gives you the job handle you need for everything that follows. In practice, that means your app can treat Imagine as the “create” step and Fetch or Action as the “continue” step.

Async handling that matches real product flows

Midjourney generation is asynchronous. You submit the job, store the returned identifier, then poll Midjourney Fetch or use a hookUrl. This matters because most product bugs around Midjourney are not prompt bugs, they are state-management bugs: missing job storage, polling the wrong id, or trying to trigger follow-up actions before the first grid is done.

Action-based continuation after the first grid

Once a job completes, Midjourney Action lets you continue from that result instead of starting over. That is where upscales, variations, rerolls, pan, and zoom belong. If your product has U/V-style controls or “make this one stronger” buttons, Action is usually the endpoint behind them.

Multiple entry points for non-standard workflows

Not every Midjourney integration starts from a clean text prompt. Blend is useful when the user begins with multiple reference images. Describe helps when the user has an image but not a usable prompt yet. Seed is practical for prompt testing and reproducibility. Inpaint is the right choice when you want to preserve most of the image and only regenerate a selected area.

Authentication And Base URL

All Midjourney API requests on TTAPI use the same gateway and auth pattern.
  • Base URL: https://api.ttapi.io
  • Header: TT-API-KEY: YOUR_API_KEY
  • Content-Type: application/json
The most common production path looks like this:
  1. Submit POST /midjourney/v1/imagine.
  2. Save the returned job identifier as soon as the request succeeds.
  3. Poll GET /midjourney/v1/fetch?jobId=... until the job finishes.
  4. Read components, output image URLs, and other metadata from the fetch payload.
  5. If the user wants to continue from the completed result, call Midjourney Action.
One detail that trips teams up: the submit response returns a job_id field inside data, but the polling endpoint expects that same value as the jobId query parameter. Store it once, then reuse it consistently.

Example Request

curl --request POST 'https://api.ttapi.io/midjourney/v1/imagine' \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: YOUR_TTAPI_KEY' \
  --data-raw '{
    "prompt": "cinematic portrait of an astronaut in neon rain",
    "mode": "fast"
  }'

Example Fetch

curl --request GET 'https://api.ttapi.io/midjourney/v1/fetch?jobId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'TT-API-KEY: YOUR_TTAPI_KEY'
When Fetch succeeds, the payload can include the final image URLs, the list of executable components, and metadata like seed. That is usually enough to drive the next UI state without another custom lookup layer.

Use Cases

  • Creative review tools that generate a first grid, then let users request variations or upscales on demand
  • Campaign or catalog workflows where teams iterate through several prompt directions before choosing one branch to continue
  • Moodboard or art-direction tools that start from multiple reference images through Blend
  • Prompt-research workflows that use Describe and Seed to make outputs easier to analyze and repeat
  • Visual editing tools that need selective repainting instead of full regeneration through Inpaint

Core Endpoints

Use caseBest page
Start a new prompt-based jobMidjourney Imagine API
Continue a completed resultMidjourney Action API
Combine several source imagesMidjourney Blend API
Turn an image into prompt textMidjourney Describe API
Look up the seed from a finished jobMidjourney Seed API
Regenerate only one part of an imageMidjourney Inpaint API
Poll task status and outputsMidjourney Fetch API

FAQ

Which Midjourney endpoint should I start with?

If the user is starting from a fresh prompt, start with Midjourney Imagine. That is the normal entry point for a new generation.

When should I use Action instead of Inpaint?

Use Midjourney Action when you want to continue a completed result with built-in follow-up operations like upscale, variation, reroll, pan, or zoom. Use Midjourney Inpaint when you want to keep most of the image and only change a selected area with a mask.

How do I get task results reliably?

Store the job identifier from the initial submit call immediately, then use Midjourney Fetch with that same value. In most apps, losing the job id is a bigger operational problem than the generation itself.

Do I need Blend or Describe for a normal text-to-image flow?

No. For a standard prompt-first workflow, Imagine plus Fetch is enough. Use Blend or Describe only when the workflow starts from images rather than text.
Last modified on April 20, 2026