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

# Codex

> Set up VidJutsu in Codex: connect the MCP server, sign in, install the /vidjutsu-edit skill and edit your first video.

Codex edits video once it has the VidJutsu tools. They come from the hosted MCP server at `https://api.vidjutsu.ai/mcp`: there is nothing to install or run besides one `codex mcp add`.

## Before you start

* The [Codex CLI](https://developers.openai.com/codex) installed and signed in.
* Node.js 22 or later, for the one-line skill install (`npx`).
* A VidJutsu account, or an email address to make one. Codex can make it for you.

## The fast way

Paste this into Codex:

```
set up vidjutsu - https://docs.vidjutsu.ai/llms.txt
```

It installs the VidJutsu skills and runs `vidjutsu-setup`, which asks only what it needs (your account, a browser sign-in or an API key, what you make, and whether your agent runs on your computer or in a cloud sandbox), connects the tools, hands you a link to start the free trial and checks that it all works. The rest of this page is the same thing by hand.

## Set it up by hand

**1. Add the server**

> [tab] Sign in with your browser
>
> ```sh theme={null}
> codex mcp add vidjutsu --url https://api.vidjutsu.ai/mcp
> ```
>
> Codex sees that the server signs in with OAuth and prints a sign-in link right away (it opens your browser when it can). Sign in or sign up on the VidJutsu page, and Codex saves the sign-in. To sign in again later: `codex mcp login vidjutsu`.

> [tab] With an API key
>
> For Codex running unattended, or where there is no browser. Get a key with [two calls](https://docs.vidjutsu.ai/authentication.md) or `vidjutsu login` and put it in an environment variable that the shell running Codex sets:
>
> ```sh theme={null}
> export VIDJUTSU_API_KEY=vj_live_...
> codex mcp add vidjutsu --url https://api.vidjutsu.ai/mcp --bearer-token-env-var VIDJUTSU_API_KEY
> ```
>
> Codex stores the variable's name, not the key, so the key never sits in `~/.codex/config.toml`. The command writes:
>
> ```toml theme={null}
> [mcp_servers.vidjutsu]
> url = "https://api.vidjutsu.ai/mcp"
> bearer_token_env_var = "VIDJUTSU_API_KEY"
> ```
>
> Never paste a key into a chat with any agent.

**2. Check it**

Run `codex mcp list`: `vidjutsu` should be there, with **Auth** showing your sign-in (OAuth) or `Bearer token`. Start a new Codex session and ask "what's my VidJutsu account status?". Codex calls `account`; that call is the real test of the sign-in or the key.

**3. Start the trial or the plan**

Ask Codex to start your free trial. It calls `start_trial` and gives you a Stripe link where you add a card; you are never charged for the trial. To go straight to the monthly plan, ask for checkout instead. See [Pricing](https://docs.vidjutsu.ai/pricing.md).

**4. Install the /vidjutsu-edit skill**

```sh theme={null}
npx skills add https://vidjutsu.ai -a codex -g
```

It installs `vidjutsu-edit` and the recipes it uses: `vidjutsu-clean-cut`, `vidjutsu-motion-graphics`, `vidjutsu-style` (saves your brand look for every edit) and `vidjutsu-schedule` (posts finished videos to TikTok, Instagram and YouTube on a calendar you approve first). They go into `~/.agents/skills/`, where Codex reads skills. Leave out `-g` to install them in the current project only. The source is open on GitHub at [Blurware/vidjutsu-skills](https://github.com/Blurware/vidjutsu-skills). See [the skill](https://docs.vidjutsu.ai/skill.md).

**5. Edit a video**

Hand over a raw take:

```
/vidjutsu-edit ~/Movies/raw-take.mov
/vidjutsu-edit ~/Movies/podcast-ep12.mp4 into 5 clips for TikTok
```

Codex uploads the file, transcribes it, cuts it, renders, and gives you a `watch_url`: a page that plays the video in any browser. Short clips and long videos work the same way.

## Good to know

* **Local files.** Codex reads files on your machine and uploads them itself with a [direct upload](https://docs.vidjutsu.ai/guides/uploads.md#direct-uploads). For a file already online, give it the https link and it uses `ingest`.
* **Sandbox.** Uploads go to `api.vidjutsu.ai` and its file host. If your Codex sandbox blocks the network, allow it for the session or the upload can't start.
* **Review.** Ask for a review link. You comment on a word or a moment in the browser, and Codex reads the comments and fixes them. See [Edit with agents](https://docs.vidjutsu.ai/guides/agents.md).
* **Keys.** Give an unattended key only the [scopes](https://docs.vidjutsu.ai/authentication.md#key-scopes) the job needs.

## If something's off

| What you see | What to do |
| - | - |
| `codex mcp add` waits after printing a link | It's waiting for you to sign in. Open the link, or stop it and use the API key setup. |
| The tools don't appear | Codex reads its config when a session starts. Start a new one. |
| **Auth** says `Not logged in` | Run `codex mcp login vidjutsu`. |
| 401 `unauthenticated` with a key | `VIDJUTSU_API_KEY` isn't set in the shell Codex runs in, or the key was revoked. |
| `/vidjutsu-edit` isn't recognised | Run the `npx skills add` line again and start a new session. `npx skills list -g` shows what's installed. |
| 402 `upgrade_required` | You hit a trial limit. Open the `upgrade_url` Codex gives you. |
| `payment_required` | The account has no plan yet. Ask Codex for the trial or checkout link. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.