メインコンテンツへ移動

CodexでAI動画を作る

CodexをYohにつなげば、ターミナルやエディタから動画ストーリーを制作できます。脚本、キャスト、クリップ、声、字幕から最終的な書き出しまで。有料の操作はすべて、先に価格を見せて承認を得てから進みます。

いちばん簡単:AIにセットアップを任せるプロンプトを1つ、Claude Code、Codex、Cursorにコピーするだけ。Yohをインストールし、サインインまで案内します。macOS、Linux、Windowsに対応しています。

Codexを接続

  1. サーバーを追加してサインイン

    Codex CLI、IDE拡張機能、ChatGPTデスクトップアプリで使えます。開いたブラウザでYohにサインインしてください。

    codex mcp add yoh --url https://www.yoh.app/api/mcp
    codex mcp login yoh
  2. 時間のかかる処理に余裕を持たせる

    Yohの処理には数分かかるものがあります。ツールのタイムアウトを300秒に設定し、Codexを再起動してください。

    ~/.codex/config.toml
    [mcp_servers.yoh]
    url = "https://www.yoh.app/api/mcp"
    tool_timeout_sec = 300
    startup_timeout_sec = 20
  3. Yohスキルを追加(推奨)

    このスキル(SKILL.mdと参照ファイル、補助スクリプトを1つのフォルダーとしてインストール)は、Yohのストーリーをうまく作る方法をエージェントに教えます。シリーズの中で始める、使う前に見積もる、クリップを見てから判断する、といった内容です。サーバーに合わせて常に更新されます。Codexでは $yoh で呼び出します。

    (
      set -eu
      skill_dir="$HOME/.agents/skills/yoh"
      if [ -e "$skill_dir" ]; then
        printf '%s\n' 'Yoh skill already exists. Use the setup prompt to check or update it.' >&2
        exit 1
      fi
      mkdir -p "$skill_dir/references" "$skill_dir/scripts"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/SKILL.md' --output "$skill_dir/SKILL.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/browser-workflow.md' --output "$skill_dir/references/browser-workflow.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/checking-clips.md' --output "$skill_dir/references/checking-clips.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/common-jobs.md' --output "$skill_dir/references/common-jobs.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/editing-clips.md' --output "$skill_dir/references/editing-clips.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/errors-and-refusals.md' --output "$skill_dir/references/errors-and-refusals.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/generation-and-pricing.md' --output "$skill_dir/references/generation-and-pricing.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/gotchas.md' --output "$skill_dir/references/gotchas.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/hires-ads-publishing.md' --output "$skill_dir/references/hires-ads-publishing.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/lines-and-voices.md' --output "$skill_dir/references/lines-and-voices.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/looks-and-assets.md' --output "$skill_dir/references/looks-and-assets.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/mcp-tool-index.md' --output "$skill_dir/references/mcp-tool-index.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/recipes.md' --output "$skill_dir/references/recipes.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/setup-and-clients.md' --output "$skill_dir/references/setup-and-clients.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/stories-and-scripts.md' --output "$skill_dir/references/stories-and-scripts.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/timeline-analysis.md' --output "$skill_dir/references/timeline-analysis.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/timeline-and-edit-mode.md' --output "$skill_dir/references/timeline-and-edit-mode.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/upload-and-cut.md' --output "$skill_dir/references/upload-and-cut.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/references/writing-clips.md' --output "$skill_dir/references/writing-clips.md"
      curl --fail --show-error --location 'https://www.yoh.app/skills/yoh/scripts/download_timeline_analysis.py' --output "$skill_dir/scripts/download_timeline_analysis.py"
    )
  4. 接続を確認

    エージェントに get_credits を実行するよう頼んでください。Yohのクレジット残高が返ってくれば成功です。Claude Code や Codex で /mcp を実行すると、サーバーの状態を確認できます。

あとは頼むだけ

  • “幽霊の声が聞こえる夜勤の看護師の、60秒のストーリーを作って。”
  • “この脚本を5話のシリーズにして。絵を描く前にキャストを見せて。”
  • “第3話を詰めて。無音の間をカットして、字幕をビートに合わせてから、書き出しの見積もりを出して。”
  • “クリップ4の主役を私のキャラクターに替えて、そのクリップの動画だけ作り直して。”

使いやすい理由

承認なしに課金されることはありません

閲覧と編集は無料です。クレジットを使う操作(画像の生成、クリップ動画の生成、書き出し)は、まず価格を返します。エージェントがそれを見せ、あなたが承認してから進みます。同じ承認で二重に課金されることもありません。

シェル履歴にキーが残らない

codex mcp login でYohにサインインします。CIでは、代わりに環境変数に入れたAPIキーを使ってください(bearer_token_env_var = "YOH_API_KEY")。

アプリと同じストーリー、同じルール

エージェントが扱うのは、yoh.appで見ているのと同じストーリー、クリップ、タイムラインです。ルールもエディタと同じ。ターミナルからの編集は、ブラウザでドラッグしたのとまったく同じ位置に反映され、開いているページも数秒で更新されます。

ブラウザで結果を確認

ChatGPTデスクトップアプリでは、Codexが変更したyoh.appのページを内蔵ブラウザで開き、画面で結果を確認できます。

よくある質問

Codexで動画は作れますか?

はい、Yoh MCPサーバーをつなげば作れます。CodexがYohのツールを呼び出してストーリーを書き、各クリップを生成し、Yohアカウントで最終動画を書き出します。

どのCodexクライアントに対応していますか?

Codex CLI、Codex IDE拡張機能、ChatGPTデスクトップアプリのCodexです。いずれも ~/.codex/config.toml を共有します。

CIでヘッドレス実行できますか?

できます。Settings → API keys でAPIキーを作成し、YOH_API_KEY としてエクスポートして、[mcp_servers.yoh] に bearer_token_env_var = "YOH_API_KEY" を設定します。有料の操作には、引き続き見積もりに対する明示的な承認トークンが必要です。

ChatGPTでも使えますか?

はい。ChatGPTで Yoh という名前のカスタムMCPサーバーを同じアドレスで追加し、サインインします。プランによっては、管理者がカスタムサーバーを許可する必要があります。

詳しい説明: Yoh ドキュメント · 料金

ほかの接続方法