Aident AI

How to Generate Music With Codex and MiniMax
Codex can generate music with MiniMax through the current Music Generation Action in Aident Loadout. The safe workflow is to discover the live Action, inspect its schema, preflight one bounded instrumental request, approve that exact quote, execute once, and save the returned audio before its delivery URL expires.
This guide starts with an instrumental because it removes lyric authorship, voice, and pronunciation from the first acceptance test. You can add original lyrics later, but the first run should prove that the connection, schema, quote, output format, and review process all work.
Define the Music Before You Generate It
A vague request such as "make background music" gives neither Codex nor a reviewer a useful success condition. Write a short brief with observable constraints:
the intended use, such as a product demo, podcast intro, or private prototype;
style, mood, tempo, and important textures;
whether vocals are allowed;
the required file format, sample rate, and bitrate;
the ending you need for editing;
the destination where the approved file will be stored.
For a first test, use a prompt such as:
Do not imitate a living artist, paste copyrighted lyrics, or submit a private reference recording that you do not have permission to process. A successful API response does not decide whether you can publish or commercially use the result. Review the current provider terms, your source rights, and the rules for your market before release.
Set Up Aident Loadout in Codex
Give Codex the canonical setup instruction:
Follow https://aident.ai/SETUP.md
Then ask it to verify account authentication and Vault status. Aident Loadout supplies the managed provider connection, so the prompt should not contain a MiniMax API key.
Next, ask Codex to search the staging catalog for the public MiniMax Music Generation Action and inspect the current schema. Do not copy an internal capability identifier from this guide. Discovery is the source of truth for the Action and version available to your account.
The Action inspected on August 7, 2026 exposed separate operations for generating music and generating lyrics. Its music operation accepted a model, prompt, lyrics, streaming choice, output format, audio settings, lyric optimization, and instrumental mode. Cover generation also appeared in the schema, but it requires a separate rights review and is outside this first workflow.
Resolve the Model Name From the Live Schema
There is a useful version boundary to notice. The live Aident Action accepted music-3.0 during preflight on August 7, 2026, while the public MiniMax API reference available that day still listed music-2.6 and its free variant.
Do not resolve that discrepancy by guessing. Use the model accepted by the Action you just discovered and stop if the schema, preflight, and provider documentation conflict in a way you cannot explain. This is why a copied payload is less reliable than live schema inspection.
Preflight One Instrumental Request
Preflight validates the normalized input and shows the Aident credit estimate without dispatching MiniMax. Use a bounded request:
That request passed schema validation and quoted exactly 15 Aident credits on August 7, 2026. Treat the quote as dated evidence, not a permanent price. Stop if the current quote is unavailable, the model is rejected, the Action asks for an unexpected credential, or instrumental mode disappears from the schema.
Approve and Execute Exactly Once
After reviewing the normalized request and quote, approve one execution:
Paid media generation should not be hidden inside an automatic retry loop. A network timeout can occur after a provider accepted the request. Retrying immediately may create another charge and another asset.
This article did not execute the paid Action. The preflight is reproducible, but a human still needs to approve the exact 15-credit request before generation.
Save the Result Before the URL Expires
MiniMax documents that URL-formatted music outputs expire after 24 hours. Treat the returned URL as delivery, not storage.
Ask Codex to download the approved result into a reviewed destination, record the original prompt and normalized settings beside it, and verify the file before the delivery window closes. Do not publish the file automatically.
A valid first result has these observable properties:
the generation Action ran exactly once;
the returned file is playable from beginning to end;
the track contains no voice or lyric content;
the file is MP3 at the requested 44.1 kHz and 256 kbps settings;
the approved copy is stored at a durable location;
the prompt, model, quote, and execution time are recorded with the asset.
Listen on headphones and speakers. Check the opening, transitions, clipping, unexpected silence, and the final bars. Human review is still required even when the technical checks pass.
Change One Variable Per Revision
If the result misses the brief, do not ask for an undefined improvement. Identify one failed dimension and preflight a new request that changes only that dimension.
Examples include:
reduce the tempo while preserving instrumentation and mood;
make the ending cleaner without changing the main texture;
remove a vocal-like lead while keeping the rhythm;
increase contrast between the opening and final section.
Each revision is a new paid generation. Quote it separately, preserve the previous output, and compare both against the same acceptance checklist.
Common Failures
The Model Is Rejected
Search for the Action again and inspect its current schema. Do not replace the model with one copied from an old article or provider example. The managed Action and public documentation can update on different schedules.
The Request Requires Lyrics
Confirm that the generate-music operation has instrumental mode enabled. Keep lyric optimization off for an instrumental test. If the current schema still requires lyrics, stop and review the operation instead of sending placeholder words that could become vocals.
The Output Contains a Voice
Verify that instrumental mode was present in the normalized preflight input, not only in your prose prompt. If it was present, document the mismatch and preflight one controlled revision rather than repeatedly regenerating.
The Output URL No Longer Works
Generate again only if the asset was never saved and the original URL has expired. For future runs, make durable storage and file verification part of the immediate post-execution checklist.
The Client Times Out During Generation
Inspect the execution result and audit trail before retrying. A timeout does not prove that MiniMax rejected the request. Blind retries can create duplicate paid outputs.
The Track Sounds Good but Cannot Be Shipped
Technical quality and publication rights are separate gates. Review the current MiniMax terms, your prompt and source material, required disclosures, and any customer or platform policy before distribution.
Keep the Workflow Measurable
Use this final instruction when you are ready for the approval gate:
The success condition is not "MiniMax returned something." It is one discovered contract, one quoted and approved request, one execution, one verified durable file, and one human review.
If you are building a broader media workflow, pair this guide with AI agent cost guardrails, secure API access for agents, and video generation with Codex and Fal.
Set up Aident Loadout and preflight one music request.
Sources
Refresh this guide when the Aident Action schema or quote changes, MiniMax changes its supported music models or output lifecycle, or the managed Action and public provider documentation converge on a new model contract.



The one tool
for every tool
your agent needs.
Give any AI agent real capabilities in seconds. Connect 1,000+ tools once, skip the setup headache, and let your agents execute.
