CLAUDE.md — Legnext API Docs
Guidance for working in this repository.What this is
The public API documentation for Legnext (the Midjourney API platform).- Tooling: Mintlify — config in
docs.json(thememint), content in.mdx. - Published to:
https://docs.legnext.ai - Repo:
github.com/legnext-ai/docs(origin/main). Mintlify auto-deploys on push tomain. - ⚠️ This is the only live docs repo.
github.com/leggiemint/docs(local~/projects/API/docs) is a stale abandoned clone — do not edit it.
Structure
getting-started/— overview, quickstart, models, image-parameters, video-parameters, output-storage, noticeapi-reference/— one.mdxper endpoint (image-generation, video-generation, enhancement, task-management, account-management)sdk/— per-language guides (csharp, go, java, javascript, php, python, ruby, rust)integrations/— make, n8n, postmanchangelog.mdx,docs.json(navigation — nav is explicit; a file not listed here is not linked)
Preview & deploy
main (Mintlify picks it up). Per global rules: don’t auto-push; prefer a new commit over amend.
Sources of truth (do not guess — verify)
- Parameter / version / model behavior → the backend:
~/projects/API/Legnext-backend/internal/task/mj_task/(e.g.version.gofor which flags each MJ version accepts) and the provider code underinternal/standalone_server/mj/provider/. - Midjourney’s own semantics → local mirror of MJ official docs at
~/projects/saas/midjourney/midjourney-official-docs/(API-relevant articles only; local reference, not published, not a git repo). Refresh via its scrape script.
Known gotchas / lessons
--crefis NOT a v7+ parameter. It only works on v6 / v6.1 / niji 6. v7 replaced it with Omni Reference (--oref/--ow); v8.1 drops omni too. Our docs historically mislabeled this (v7 marked ✓ for--cref), which caused a real support ticket — keep the version-support matrix accurate against the backend + MJ official docs.- The default model version is v7 (no
--v→ runs as v7). A param valid only on v6.x will fail upstream with an opaqueInvalid prompt formatunless the user pins--v 6.1. - Keep
--orefnaming consistent (MJ calls it Omni Reference); avoid the old “Object Reference” / inconsistent “Universal Reference” labels.