Midjourney has no public API. To generate images from code, n8n, or an AI agent through an official, documented route, use Ideogram's API, MCP server, or CLI.

Midjourney: Does Midjourney have an official API?

No. Midjourney makes images in its web app and its Discord bot, and both are built for a person typing prompts, not for software sending requests.

What Midjourney offers, and what it says about API access
What Midjourney offers What it says
Web app and Discord bot The two supported ways to make images, on a paid plan.
Midjourney's Community Guidelines "Midjourney does not provide an API," apart from a few rare exceptions it explicitly grants. Automating the service is prohibited, and accounts that do it may be blocked.
Terms of Service You may not use automated tools to access the service or generate images through it.
Enterprise API application Midjourney said it was starting to investigate an Enterprise API and asked companies to apply. No API, pricing, or documentation has followed.

So when you search for Midjourney API documentation, there's nothing official to find. Midjourney's help center lists no endpoints, no keys, and no developer pricing.

For how the two tools compare on the images themselves, including text, editing, cost, and privacy, see our side-by-side comparison of Ideogram and Midjourney.

Midjourney: Is there a Midjourney API key, and what does it cost?

There's no official Midjourney API key and no official per-image price. Any key or price you find comes from a third-party service, not from Midjourney.

Those services usually charge per task, and they don't always say how many finished images one task returns. Compare them on what you actually get back, not the headline price.

What these services ask for: some run jobs through your own Midjourney account, which means giving them your Discord token. That token is a login to your Discord account. Others run your prompts through a pool of their own Midjourney accounts, which you never see.

Midjourney: What is Midjourney's MCP test?

It's a small, invite-only test of a Midjourney MCP server, the kind of connection that lets an assistant like Claude call a tool directly. In its announcement on X, Midjourney says the test is "not for Midjourney in SaaS products" and is meant for artistic and creative work.

For anyone building a product or an automated workflow, that rules it out today:

  • You have to apply and be picked.
  • It's scoped to creative experiments, not commercial software.
  • Midjourney hasn't published the tools, limits, or prices, and its help center has no MCP page.

Until Midjourney publishes docs and terms for business use, you can't build on it.

Midjourney: Are unofficial Midjourney APIs safe to use?

No. They put a REST endpoint in front of a Midjourney account and send your prompts through it, the way a person would in Discord or the web app. That's exactly the kind of automation Midjourney's terms prohibit.

How they work: your request goes to the provider, the provider sends it to Midjourney through an account, waits for the result, and passes it back to you as JSON. You poll for the result or wait for a webhook while the job runs.

What can go wrong:

  • The account behind the requests can be blocked, and with it every job queued on it.
  • Jobs break when Midjourney changes its interface, until the provider patches around it.
  • The provider can stop. PiAPI's Midjourney page now says it no longer provides the service, and useapi.net says its Midjourney support has been discontinued.

If you've already built on one of these, plan your way off it now: your workflow stops the day the provider shuts its Midjourney service or the account behind it is blocked.

Ideogram: What an AI agent needs from an image API

Before you connect an image tool to an agent, check it for these five things:

  • A sign-in or key you're allowed to automate. No Discord tokens, no shared accounts.
  • A price before the job runs. An agent that can check the cost first can stop before running a 500-image batch you didn't budget for.
  • Exact text. Ads, labels, and posters carry words. If the model misspells the headline, the agent has to pass the job back to a person, so test text rendering before you build on a model.
  • Edits without starting over. Changing one word or one detail should take one request, not a new image.
  • Files the agent can use. Results that land in your account, your chat, or a folder on disk, with a path the next step can pick up.

Ideogram: Ideogram's API, MCP server, and CLI: an official route for code and agents

Ideogram offers all three, built and documented by Ideogram. The MCP server signs in with your Ideogram account, so there's no API key to manage, and a dry run returns the exact price of a request without generating or billing anything.

Our test: one brand, three placements, inside Claude

We made up a premium cold brew brand, HALDEN, and gave Claude one brief per placement through Ideogram's MCP server, on Ideogram 4.6 at medium quality. Before each image, Claude asked Ideogram for a quote. Each came back the same: $0.06 (6 credits), marked exact.

This was the brief for the Instagram feed ad, as we sent it:

Try this prompt

Premium editorial Instagram ad for HALDEN, a fictional small-batch cold brew brand. A slim amber glass bottle with a minimal cream label sits on a travertine stone pedestal, hard late-afternoon sunlight casting a long crisp shadow across a warm cream backdrop, a few clear ice cubes beside it. Generous negative space, asymmetrical magazine layout. Top left, brand name in thin, widely spaced sans serif: "HALDEN". Large elegant serif headline, espresso brown: "Slow Made. Served Cold." Small line under the headline in thin sans serif: "Small-batch cold brew, steeped 18 hours". Bottom right, a slim brushed-brass outline button with the text "Order Now" and beside it "$6". Palette: espresso brown, warm cream, brushed brass. Shot like a luxury magazine still life, photorealistic.

HALDEN Instagram feed ad made with Ideogram 4.6: an amber bottle on a travertine block in late sun, with the headline "Slow Made. Served Cold." and an "Order Now $6" button
Full-size close-up of the HALDEN feed ad text: "HALDEN", "Slow Made. Served Cold.", and "Small-batch cold brew, steeped 18 hours"

Every line came back as written: the brand name, the two-line headline, the subline, "Order Now," and "$6." Ideogram also printed "HALDEN / COLD BREW · 355 ml" on the bottle label, spelled correctly, though we hadn't asked for label text.

We sent two more briefs in the same brand: a Story with the headline "The 18-Hour Brew" and the line "Smooth, low-acid, never bitter," and a website banner reading "Cold Brew, Taken Seriously" with "Single-origin beans. Steeped 18 hours. Bottled by hand." and a "Shop the Collection" button. All of that text came back spelled exactly as written. We wrote a separate brief for each size; if you'd rather start from one finished ad, Ad Resizer re-lays out the same ad for each placement.

HALDEN Instagram Story ad made with Ideogram 4.6: cold brew pouring into a crystal glass of ice beside a labeled bottle, with the headline "The 18-Hour Brew"
HALDEN website banner made with Ideogram 4.6: three amber bottles on a travertine shelf, with the headline "Cold Brew, Taken Seriously" and a "Shop the Collection" button
Full-size close-up of the HALDEN banner text: "Cold Brew, Taken Seriously" above "Single-origin beans. Steeped 18 hours. Bottled by hand." and the "Shop the Collection" button

Two edits, one request each: the Story brief only asked for a "minimal cream label," so the bottle came back with a plain one, and we wanted the brand on it. On the banner, we wanted the labels to carry the brand name alone. We made both changes with Precise Edit, which changes only what the instruction names. For the Story, the instruction was: "On the blank cream label of the amber bottle, print the brand name "HALDEN" in thin, widely spaced espresso-brown sans serif, and below it in very small caps "COLD BREW". Keep the label's size, the bottle, the glass, the pour, the text at the top, the button, the lighting and everything else exactly as it is." The label now reads HALDEN / COLD BREW, and the pour, the glass, and the headline are untouched. Each edit was quoted at $0.06 first.

Before and after: the HALDEN Story bottle with the plain label we asked for, and the same bottle after one Precise Edit, labeled "HALDEN / COLD BREW"

The same brief in a regular Claude chat: last, we opened a new chat on claude.ai with the Ideogram connector added and sent the feed brief again, this time asking Claude to quote first. Claude replied, "The price is $0.06 (6 credits) for one 4:5 image at medium quality on Ideogram 4.6. Generating it now," and the finished ad appeared in the conversation with every line spelled as written.

A Claude chat showing Ideogram's price quote for the HALDEN ad, followed by Claude's reply confirming $0.06 for one image
The HALDEN feed ad shown inside the Claude chat after Ideogram generated it

Three ads, two edits, and the repeat run in claude.ai cost $0.36 in total, and we knew each price before the image was made.

Which Ideogram route fits your setup

Pick by where the request comes from:

  • You ask in a chat or an editor (Claude, Cursor, or a ChatGPT Business, Enterprise, or Edu workspace): use the Ideogram MCP server. In Claude, go to Customize → Connectors, choose Add custom connector, and paste https://mcp.ideogram.ai/mcp. In Claude Code, run claude mcp add --transport http ideogram https://mcp.ideogram.ai/mcp. You sign in with your Ideogram account the first time, and requests spend your Ideogram credits, which you can buy pay as you go with no subscription. Our guide to image generation in Claude walks through the setup step by step.
  • You or a coding agent work in a terminal (Claude Code, Codex, Cursor): use the Ideogram CLI. Install it with uv tool install ideogram-cli, run ideogram login, and add a short note to your CLAUDE.md, AGENTS.md, or Cursor rules telling the agent to use the ideogram command for images and to run ideogram guide first. Each command prints one JSON object with the saved file paths, and no command stops to ask a question. It runs on macOS and Linux.
  • Your own software or an n8n flow sends the request: call the Ideogram API with an API key, billed per image. Our step-by-step guide to connecting Ideogram to n8n covers the request, the price check, and saving the file. For hundreds of images from a spreadsheet, see our guide to bulk image generation.

Check the price first: in a chat, ask for a quote before the image ("Quote this first, then generate it"). In the CLI, add --set dry_run=true. Our Ideogram API pricing guide lists the rate for every model and tool.

Reference: Are there alternatives to the Midjourney API?

Yes. Besides Ideogram, OpenAI, Google, Black Forest Labs, and Recraft sell official API access, each with its own docs and pricing, and none of them asks you to automate a consumer account. If you're choosing a provider for a product, our roundup of image generation APIs for enterprise teams compares the main ones, and our list of Midjourney alternatives we tested runs Midjourney, Ideogram, and three free apps through the same test.

Reference: FAQs

Is there official Midjourney API documentation?
No. Midjourney publishes no endpoints, keys, or developer pricing, because it has no API. Any "Midjourney API documentation" you find belongs to a third-party service that automates Midjourney accounts.
How much does the Midjourney API cost?
There's no official price, since there's no official API. Third-party services set their own prices, usually per task, and they don't always say how many finished images a task returns.
Is it against Midjourney's rules to use an unofficial API?
Yes. Midjourney's Terms of Service bar automated tools from accessing the service or generating images through it, and its Community Guidelines say accounts that automate may be blocked.
Is there a Midjourney MCP server for Claude?
Not one you can use for work. Midjourney is testing an MCP server with a small group it accepts by application, for creative work only and not for software products. The "Midjourney MCP servers" listed in directories are third-party bridges that automate an account. For an official MCP server you can add to Claude today, use Ideogram's.
Can I use Midjourney in n8n or Make?
Only through a third-party service that automates a Midjourney account, which Midjourney's terms prohibit. For an official route, call an image API with an n8n HTTP Request node. Our n8n guide shows the full flow with Ideogram.
How can I access the Midjourney API for my project?
You can't: Midjourney has no API to sign up for. Its Enterprise API form collects interest from companies, and nothing has shipped from it. If your project needs images from code today, use an official API. Ideogram's API, MCP server, and CLI are all official, and each can quote the price of a request before it runs.