# Legnext AI > Unofficial Midjourney REST API for image and video generation — production-ready, no Discord or Midjourney account required. Base URL: `https://api.legnext.ai/api` Auth: `x-api-key` on submit and account requests; `GET /v1/job/{job_id}` uses its UUID as a private capability token Get a key: https://legnext.ai/dashboard Current pricing: https://legnext.ai/#pricing ## Start here - [Integrate with an AI coding agent](https://docs.legnext.ai/getting-started/ai-agents): Give Claude Code, Cursor, Codex, or another coding agent the Legnext integration playbook. - [First API request](https://docs.legnext.ai/getting-started/quickstart): Submit an image task, wait for completion, and save the output. - [Bring Your Own Account (BYOK)](https://docs.legnext.ai/getting-started/byok): Host your own Midjourney subscription: fast-mode image tasks run on your own account for a flat monthly credit rent, with zero per-task platform credits. - [Prompting Basics](https://docs.legnext.ai/getting-started/prompting-basics): How to write effective Midjourney prompts through the Legnext API — wording, structure, and where parameters go. - [Advanced Prompting](https://docs.legnext.ai/getting-started/prompting-advanced): Multi-prompts and weights, permutations, negative prompting, and rendered text — prompt-language features beyond the basics. ## API basics - [Authentication](https://docs.legnext.ai/getting-started/authentication): Authenticate server-side requests with a Legnext API key. - [Task lifecycle](https://docs.legnext.ai/getting-started/task-lifecycle): Integrate Legnext's asynchronous submit, wait, and persist workflow safely. - [Errors & recovery](https://docs.legnext.ai/api-reference/errors): Decide whether to fix, wait, retry, or escalate a Legnext API failure. - [Output Storage](https://docs.legnext.ai/getting-started/output-storage): Persist generated files before delivery URLs and follow-up actions expire. ## Reference - [Models](https://docs.legnext.ai/getting-started/models): Supported Midjourney model versions and the compatibility choices that affect an API integration. - [Image Parameters](https://docs.legnext.ai/getting-started/image-parameters): Generated compatibility matrix for Midjourney image parameters by model version. - [Video Parameters](https://docs.legnext.ai/getting-started/video-parameters): Prompt parameters accepted by the video generation endpoints. - [SDKs & client libraries](https://docs.legnext.ai/sdks): Maintained clients, generated libraries, and the OpenAPI source for agent-generated clients. ## Platform integrations - [n8n](https://docs.legnext.ai/integrations/n8n): Import the Legnext starter workflow and configure its API request nodes. - [Postman](https://docs.legnext.ai/integrations/postman): Fork the Legnext collection, configure one API key, and test the asynchronous task flow. - [Make](https://docs.legnext.ai/integrations/make): Connect Make HTTP modules to Legnext and handle asynchronous generation tasks. ## API reference ### Image Generation - [Text to Image](https://docs.legnext.ai/api-reference/image-generation/diffusion): Create a Midjourney image-generation task from a prompt. - [Variation](https://docs.legnext.ai/api-reference/image-generation/variation): Create subtle or strong variations of one image in a completed grid. - [Upscale](https://docs.legnext.ai/api-reference/image-generation/upscale): Upscale one image from a completed Midjourney grid. - [Reroll](https://docs.legnext.ai/api-reference/image-generation/reroll): Generate a new result from a completed parent task. - [Blend](https://docs.legnext.ai/api-reference/image-generation/blend): Combine two to five source images into a new Midjourney image. - [Describe](https://docs.legnext.ai/api-reference/image-generation/describe): Create prompt suggestions from a public image URL. - [Shorten](https://docs.legnext.ai/api-reference/image-generation/shorten): Turn a long prompt into shorter Midjourney prompt suggestions. - [Pan](https://docs.legnext.ai/api-reference/image-generation/pan): Extend a completed image in one direction. - [Outpaint](https://docs.legnext.ai/api-reference/image-generation/outpaint): Expand the canvas around a completed image. - [Inpaint](https://docs.legnext.ai/api-reference/image-generation/inpaint): Regenerate selected regions of a completed image. - [Remix](https://docs.legnext.ai/api-reference/image-generation/remix): Create a new variation while changing the prompt. - [Edit](https://docs.legnext.ai/api-reference/image-generation/edit): Edit a public image with a prompt and region geometry. - [Upload paint](https://docs.legnext.ai/api-reference/image-generation/upload-paint): Edit an uploaded image with canvas, mask, and prompt data. - [Retexture](https://docs.legnext.ai/api-reference/image-generation/retexture): Apply a new material or visual treatment to a public image. - [Remove Background](https://docs.legnext.ai/api-reference/image-generation/remove-background): Remove the background from a public image. - [Midjourney Enhance](https://docs.legnext.ai/api-reference/image-generation/enhance): Apply the Midjourney Enhance follow-up action to a completed image. ### Video Generation - [Video Diffusion](https://docs.legnext.ai/api-reference/video-generation/video-diffusion): Create a Midjourney video task from a prompt or existing image. - [Extend Video](https://docs.legnext.ai/api-reference/video-generation/extend-video): Extend one video from a completed video task. - [Video Upscale](https://docs.legnext.ai/api-reference/video-generation/video-upscale): Upscale one video from a completed video task. ### Task Management - [Get Task](https://docs.legnext.ai/api-reference/task-management/get-task): Retrieve the current state and result of an asynchronous task. ### Account Management - [Get Account Balance](https://docs.legnext.ai/api-reference/account-management/get-balance): Read the current account balance and available usage units. ## Updates - [Changelog](https://docs.legnext.ai/changelog): Track updates, new features, and improvements to the Legnext AI API ## Optional - [OpenAPI Spec (YAML)](https://docs.legnext.ai/openapi.yaml): Machine-readable API spec - [Pricing](https://legnext.ai/#pricing): Current credit pricing - [Dashboard](https://legnext.ai/dashboard): Manage API keys and billing - [Support](mailto:support@legnext.ai): Email us with questions or feedback