> ## Documentation Index
> Fetch the complete documentation index at: https://docs.legnext.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bring Your Own Account (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.

## What is BYOK?

BYOK lets you bind your own Discord account (with an active paid Midjourney subscription) to your Legnext account. While bound:

* **Fast-mode image tasks** — `imagine`, `variation`, `upscale`, `reroll`, `blend`, `describe` — execute on **your own Midjourney account** and consume **no platform credits** per task.
* **Everything else** — video and edit/enhance tools — keeps running on the platform pool and is billed per task as usual. Your API calls don't change either way.
* **Rent**: BYOK costs **20,000 credits/month** ($20 at $1 = 1,000 credits), charged from your credit balance. The first month is charged when you bind; renewals are attempted automatically starting 3 days before each due date.

## Before you bind

1. The Discord account has an **active paid Midjourney subscription**.
2. The account has **sent at least one DM to the Midjourney bot** (Discord requires an existing DM channel for the engine to deliver commands).
3. You have the account's **Discord token**: log in to discord.com in your browser → DevTools (F12) → Network → filter by `api` → click any request → copy the `Authorization` request header value.

<Warning>
  A Discord token grants **full control** of the Discord account — never share it with anyone. Automating a user account may violate Discord's Terms of Service and can lead to the account being **permanently banned**. We strongly recommend using a dedicated account rather than your main one.
</Warning>

## Bind, manage, unbind

Everything lives in the dashboard under **My MJ Account** (`/app/byok`):

* **Bind**: paste the Discord token. Your balance must cover the first month's rent.
* **Status**: the page shows the live state of your account (active, session expired, fast hours exhausted, etc.) pulled from the engine in real time, including operator guidance when something is wrong.
* **Update token**: if Discord invalidates your session (status `cookie_expired`), paste a fresh token to recover — the account resumes automatically.
* **Unbind**: returns you to pure pay-as-you-go. Rent already charged is not refunded; rebinding starts a new billing cycle.

## Multiple accounts (pool)

You can bind **more than one Midjourney account**. Each bound account is billed its own **20,000 credits/month** — rent scales linearly per account.

* Tasks are routed to the **least-busy healthy account** in your pool (engine status `active` and rent current). If no account is usable, fast-mode image tasks fail with a 400 that names the most actionable fix (top up for a rent-due account, or update the token of an expired one) — they never silently fall back to platform-credit billing.
* Your effective fast-image concurrency scales with the pool: `max(6, min(account concurrency limit, 3 × usable accounts))`.

## Billing states

| State         | What it means                                                                | What to do                                                                                                   |
| ------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Active        | Rent paid, tasks pinned to your account                                      | —                                                                                                            |
| Rent due soon | Renewal failed (balance too low) inside the 3-day window before the due date | Top up; renewal retries hourly                                                                               |
| Suspended     | Due date passed without a successful charge                                  | Tasks are paused (400 "rent due"); your binding is kept — top up and it resumes automatically within an hour |

## Failure states of your Midjourney account

| Engine status       | Meaning                                                                                    | Recovery                                                                                                                                       |
| ------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `cookie_expired`    | Discord invalidated the login session (401 on all endpoints)                               | Paste a fresh token on the BYOK page                                                                                                           |
| `captcha_required`  | Discord asks for a captcha                                                                 | Log in to discord.com, complete verification, then update the token                                                                            |
| `credits_exhausted` | Your Midjourney fast hours are spent                                                       | Renew your MJ subscription or wait for the next billing cycle                                                                                  |
| `banned`            | Account banned by Discord/Midjourney (permanent)                                           | Unbind and bind a different account                                                                                                            |
| `disabled`          | Token works but Midjourney refuses it (e.g. app authorization revoked, Discord code 20064) | Follow the remedy shown on the BYOK page — typically someone must sign in and re-authorize the Midjourney app; a new token alone will not help |

While your account is in any non-active state, fast-mode image tasks are rejected with a clear 400 — they never silently fall back to platform-credit billing.

## FAQ

<AccordionGroup>
  <Accordion title="Do I need to change my API integration?">
    No. Endpoints, parameters, and your API key stay the same. Binding only changes where fast-mode image tasks execute and how they're billed.
  </Accordion>

  <Accordion title="What happens when my account is busy?">
    Tasks queue engine-side and wait for your account (up to 1 hour). They are never moved to another account or the platform pool.
  </Accordion>

  <Accordion title="Can I bind more than one account?">
    Yes. Each account is billed 20,000 credits/month separately, and fast-mode image tasks are routed to the least-busy healthy account in your pool. See "Multiple accounts (pool)" above.
  </Accordion>

  <Accordion title="Can I still use the platform pool while bound?">
    Yes for everything outside the BYOK domain: video and edit tools bill normally from your credit balance. Fast-mode image tasks always run on your own account while bound — unbind if you want them back on the pool.
  </Accordion>
</AccordionGroup>
