Legnext.ai
AIDrive Midjourney image and video generation over REST through Legnext.ai, with no Discord account required. Agents generate and iterate on visual assets inside the workflow that needs them.
What This Integration Enables
Legnext.ai is not a new model. It is a route to an existing one. The connector drives Midjourney image and video generation over REST with no Discord account required, and that single fact is what makes it usable in an agent workflow at all. Everything a design team does in a Midjourney session has an action here: submit a prompt with flags inline, upscale one image out of the four-image grid, riff a variation off a pick, reroll for a fresh set, pan the canvas in one direction, outpaint in every direction at once, inpaint a masked region under a new prompt, or blend up to five sources into one composition. Describe Image reads an existing asset and writes four prompts that would plausibly have produced it, which is how a house style gets reverse-engineered from work you already own.
Every operation is asynchronous and returns a job ID, and two clocks start when it does. Delivery URLs last at most 30 days and Legnext warns they can disappear sooner. Follow-up actions such as Upscale Image and Create Variation are only valid for three days after the parent task was created. Save Task Output exists because of this: it downloads the finished files and stores them in FlowRunner file storage, returning durable URLs your workspace owns. Treat it as part of completed-task processing rather than an optional archive step. Several of the editing operations, including Inpaint Image, Remix Image, Retexture Image, Remove Background and the Edit actions, are restricted to whitelisted accounts and return a 403 otherwise, and Enhance And Upscale Image may return 503 while its upstream provider is suspended. Design the flow to handle those responses rather than assume them away.
Without FlowRunner
With FlowRunner
Use Case Scenarios
Campaign concept board from an approved brief
A brand agent picks up an approved concept line from the campaign record. It calls Get Active Tasks first to confirm the account is not already at its concurrency ceiling, then submits Generate Image with the aspect ratio and stylize flags written into the prompt string. It polls Get Task until the status reads completed, runs Save Task Output to pull the grid into workspace storage, and posts the four candidates to the design channel in Slack. The art director replies with an index. The agent runs Upscale Image on that index with the Subtle setting to keep the original detail, then writes the durable URL back to the campaign record in Notion.
One approved image, six placements
An approved square render needs to run as a wide banner, a tall story frame and a standard post. Rather than regenerating and getting three images that do not match, the agent works from the single approved parent. Pan Image extends the canvas in one direction for the banner. Outpaint Image zooms out in every direction for the frame that needs breathing room. Edit Image repositions the render on a custom canvas and repaints the newly exposed sides under a prompt. The composition the client signed off on stays intact across all three, and the flow keeps the parent job ID because every one of these follow-ups depends on it.
Reverse-engineering a house style
A new account arrives with a body of existing artwork and no documented visual language. The agent feeds representative assets through Describe Image, which returns four candidate prompts per image, then runs the recurring phrases through Shorten Prompt to strip the tokens that are not doing any work. What comes back is a compact prompt vocabulary grounded in work the client already approved, rather than a style guide someone wrote from memory. The agent tests the distilled prompt with Generate Image and puts the result next to the source assets for a human to judge.
Human-in-Loop Highlight
The irreversibility on this connector is not a destructive write. It is an expiring option. A completed generation gives you four images and a set of follow-up moves, and those moves are only valid for three days after the parent task was created. Upscale Image, Create Variation, Reroll Task, Pan Image and Outpaint Image all die with that window. After it closes, the grid can only be recreated from scratch, and Midjourney will not hand back the same four images. So the agent does not quietly pick an index to save time, and it does not sit on a finished grid waiting for someone to notice. It calls Save Task Output the moment the task completes so the files survive independently of the vendor's 30 day delivery URLs, then posts to the design channel with the clock attached: "Grid ready for the Q3 concept. U1 through U4 are available until Thursday 18:40. After that this grid can only be regenerated, not upscaled. Which index goes to full resolution?" The art director makes a creative call. The agent handles the deadline, the archive and the render.
Agent Capabilities
25 actionsGeneration
3- Generate Image Submits a Midjourney text-to-image task and returns a job ID immediately. Flags are written inline in the prompt, for example an aspect ratio and stylize value appended to the description, and which flags a model version accepts is documented in the Legnext image parameters reference. Poll Get Task until the status is completed, at which point the output carries a grid image plus the four individual image URLs, or supply a callback URL to have the finished task posted to your own endpoint.
- Reroll Task Re-runs a completed generation with the same prompt to produce an entirely new four-image grid. The quickest way to get more options without retyping a prompt that already works.
- Blend Images Combines between two and five source images into a single new composition, letting the model find a shared style and subject across them. No prompt is involved; the output aspect ratio is the only creative control.
Grid Follow-ups
5- Upscale Image Renders one image out of a completed four-image grid at full resolution. Subtle keeps the original detail closely while Creative adds new detail. Valid only for three days after the parent task was created.
- Create Variation Generates a fresh four-image grid riffing on one image of a completed grid. Subtle keeps the composition close to the original while Strong departs from it, and an optional prompt steers the direction.
- Pan Image Extends a completed image in a single direction, generating new content in the added space while leaving the original untouched. The scale factor controls how far the canvas grows, and an optional prompt guides what appears there.
- Outpaint Image Zooms out from a completed image, expanding the canvas in every direction at once and filling the new border with content that continues the scene. The scale factor sets how much wider the frame becomes.
- Enhance Draft Image Promotes one image from a draft-mode grid to full quality. The parent generation must have been created with the draft flag, and on a 24-image draft grid only the first four images can be enhanced. Restricted to whitelisted accounts.
Editing and Compositing
7- Inpaint Image Regenerates only the masked regions of a completed image from a new prompt, leaving everything outside the mask untouched. Supply the mask as the URL of a mask image or as a list of rectangular areas. Restricted to whitelisted accounts, and rejects images that were not generated on the official provider.
- Remix Image Reinterprets one image of a completed grid under a new prompt, keeping the original composition as a starting point. Strong departs further from the source than Subtle. Restricted to whitelisted accounts.
- Retexture Image Reskins an image with new materials and surface treatments while keeping its underlying structure and composition intact. Suits product colorways and material studies. Restricted to whitelisted accounts.
- Remove Background Cuts the subject out of an image and returns a clean cutout with the background removed. Restricted to whitelisted accounts.
- Edit Image Repositions a generated image on a custom canvas and repaints it under a new prompt, optionally masking which regions may change. Used when the target framing differs from the source, for example placing a square render into a wide banner and generating the sides. Restricted to whitelisted accounts.
- Edit Uploaded Image Places an image you supply by URL onto a custom canvas and repaints the masked regions from a prompt. Unlike Edit Image this needs no parent Legnext task, so it is the route for editing artwork that arrived from elsewhere. Restricted to whitelisted accounts.
- Enhance And Upscale Image Runs a content-aware upscale on an image, taking it up to 12K with optional face enhancement, aspect ratio conversion and format control. The source can be a direct image URL or a grid image from a previous task. Legnext currently reports this endpoint as suspended while the upstream provider is unavailable, in which case it returns a 503.
Prompt Tools
2- Describe Image Reads an image and writes four prompt suggestions that would plausibly have produced it. Used to reverse-engineer a look or to seed a house style from an existing asset. Poll Get Task for the resulting text prompts.
- Shorten Prompt Analyses a long prompt, highlights the tokens actually doing the work and returns tighter alternatives. Used to trim prompts that have grown unwieldy and to understand which words are influencing a result.
Video
3- Generate Video Submits a Midjourney video task in either of two modes. For image to video, pass the parent image task's job ID and the index of the grid image to animate. For text to video, pass a motion prompt that begins with an init image URL followed by the motion description. Output is 480p by default or 720p on request.
- Extend Video Continues one video from a completed video task with additional motion described by a prompt. This is how a longer sequence gets built out of a short clip.
- Upscale Video Renders one video from a completed video task at a higher resolution. The final step before a clip is delivered.
Tasks and Account
5- Get Task Retrieves the state and result of any task. Status runs through pending, staged behind the account's concurrency limit, processing and retry, ending at completed or failed. Image tasks return a grid URL plus individual image URLs, video tasks return video URLs, and describe or shorten tasks return text prompts. Task lookup is available for three days after creation, and the job ID acts as a capability token, so keep it server side.
- Save Task Output Downloads the finished files of a completed task and stores them in FlowRunner file storage, returning durable URLs your workspace owns. Legnext keeps delivery URLs for no more than 30 days and warns they can disappear sooner, so persisting output is the documented practice rather than relying on the original links. Set Grid Only to store just the composite, or leave it off to store every file the task produced.
- Get Account Balance Reports the account balance in US dollars alongside available credits and points, and whether the low balance alert has tripped. Used to guard a batch of generations before it starts.
- Get Account Info Returns the account profile, current plan, wallet and the breakdown of any credit packs held. The API key list is deliberately withheld from this response. Used as a connection check or to record which plan a run was billed against.
- Get Active Tasks Returns the tasks currently staged, pending or processing on the account, grouped by model with a count per state. Used to respect the concurrency limit before submitting more work, or to show live queue depth.
Frequently Asked Questions
What can FlowRunner do with Legnext.ai?
FlowRunner agents can run Generate Image, Upscale Image, and Create Variation in Legnext.ai, plus 22 more actions.
Does connecting Legnext.ai to FlowRunner require OAuth?
No. Legnext.ai connects to FlowRunner with an API key, no OAuth flow required.
Can Legnext.ai trigger a FlowRunner workflow automatically?
Legnext.ai doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.
Start building with Legnext.ai
$100 in credits. No card required. Connect in minutes.