Codex Gpt Imageのロゴ

Codex Gpt Image

コミュニティ
ningzimu
codex-gpt-image

Generate or edit images with GPT Image 2.5 through Codex/ChatGPT subscription authentication instead of OPENAI_API_KEY. Use for text-to-image, reference-image editing, or visual assets when the user wants local Codex auth, especially when no native image tool is available. Do not use for official OpenAI API-key billing or OpenAI-compatible gateways.

概要

公開者ningzimu
リポジトリcodex-gpt-image
スキル名codex-gpt-image
スター
70
フォーク
3
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ningzimuがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Codex Gpt Image」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ningzimu/codex-gpt-image/tree/main/skills/codex-gpt-image
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ningzimu/codex-gpt-image.git /tmp/codex-gpt-image
mkdir -p .claude/skills
cp -r /tmp/codex-gpt-image/skills/codex-gpt-image .claude/skills/codex-gpt-image
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCodex Gpt Imageを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCodex Gpt Imageを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Codex Gpt Imageは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Codex GPT Image

Use this skill to generate or edit images through Codex OAuth instead of the OpenAI API-key path. The bundled CLI reads the local Codex auth file and calls the Codex Images backend endpoints.

When To Use

  • The user asks to use gpt-image-2.5-flare or GPT Image through Codex auth/subscription.
  • The current agent supports SKILL.md but does not have a native image tool.
  • The user explicitly does not want to use OPENAI_API_KEY.
  • The user wants the same local image workflow across Codex, Claude Code, OpenClaw, Hermes Agent, or similar agents.

Do not use this skill when the user wants the official OpenAI Images API, an OpenAI-compatible gateway, or API-key billing. This skill is deliberately Codex-OAuth-only.

Core Workflow

All CLI commands below assume the working directory is this skill folder. Otherwise, resolve the absolute path to scripts/codex_gpt_image.py from this SKILL.md.

  1. Check local Codex auth:

    bash
    python3 scripts/codex_gpt_image.py auth-status
  2. If Codex auth is missing, run the device-code login flow:

    bash
    python3 scripts/codex_gpt_image.py login --open-browser

    The CLI prints a browser URL and a short user code. The user must complete this step; never ask them to paste tokens.

  3. Generate an image with the user's actual prompt. Choose only the CLI flags required by the request, and do not reuse prompt wording from this skill.

  4. Edit or use reference images by passing one or more --image inputs. For edits, build the prompt from the user's requested changes and the invariants that must stay unchanged.

  5. Report the saved path(s), requested model, actual output size when inspected, and whether Codex OAuth was used. Do not claim the requested model was used unless the backend identifies it.

Defaults

  • Auth file: ~/.codex/auth.json
  • Override auth file: CODEX_AUTH_FILE=/path/to/auth.json
  • Login fallback: login uses OpenAI Codex device-code auth and writes the same auth file
  • Login client id: --client-id, CODEX_APP_SERVER_LOGIN_CLIENT_ID, then the public Codex default
  • Images base URL: https://chatgpt.com/backend-api/codex
  • Image model: gpt-image-2.5-flare
  • Size: auto
  • Quality: auto
  • Background: auto
  • Moderation: auto
  • Output format: png
  • Output compression: 100 for jpeg and webp

For detailed parameter values, defaults, model-specific constraints, and CLI mapping, read references/openai-images-api-parameters.md.

Parameter Selection

Prefer the official API defaults unless the user request requires a specific option. Read the reference before choosing explicit model, size, quality, background, moderation, or output_format values.

Prompting

Keep prompts explicit and production-oriented:

  • State the intended asset type.
  • Quote any exact visible text.
  • Specify composition, background, style, and constraints.
  • For edits, repeat invariants: what must stay unchanged.
  • Avoid adding logos, watermarks, or extra text unless requested.

Failure Handling

  • Missing auth file: run codex_gpt_image.py login --open-browser, or ask the user to run codex login, then retry.
  • 401/403: the Codex OAuth token may be expired, the account may not have access, or the endpoint may reject the session. Ask the user to refresh Codex auth.
  • Network failures: retry once if the request is idempotent and the user accepts possible duplicate image generation.
  • Never print or paste tokens from ~/.codex/auth.json.

Implementation Notes

The CLI sends Codex Images requests with:

  • generation endpoint: POST https://chatgpt.com/backend-api/codex/images/generations
  • edit endpoint: POST https://chatgpt.com/backend-api/codex/images/edits
  • auth: Authorization: Bearer <access token from ~/.codex/auth.json>
  • model: gpt-image-2.5-flare

It parses the JSON Images response and writes returned base64 image payloads to local files.

GPT Image 2.5 Compatibility

Use the default Flare model for everyday generation, or select --model gpt-image-2.5-sunburst for precise editing. Both models and their dated snapshots support xhigh and max quality and transparent backgrounds with PNG/WebP. Older models cannot use the new quality levels; this CLI keeps transparency disabled for older models. Codex OAuth access depends on the account and backend rollout.

Codex OAuth probes on 2026-09-11 also accepted an invalid model name, omitted the actual model ID, and returned dimensions different from the requested size. Successful generation does not verify model or quality selection. Treat these flags as requested settings; do not present public API capabilities as guaranteed OAuth backend behavior.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Codex Gpt Image」では何ができますか?

Generate or edit images with GPT Image 2.5 through Codex/ChatGPT subscription authentication instead of OPENAI_API_KEY. Use for text-to-image, reference-image editing, or visual assets when the user wants local Codex auth, especially when no native image tool is available. Do not use for official OpenAI API-key billing or OpenAI-compatible gateways.

TypingMindでCodex Gpt Imageを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Codex Gpt Imageはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCodex Gpt Imageをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ningzimu/codex-gpt-image/tree/main/skills/codex-gpt-imageを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Codex Gpt Imageを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Codex Gpt Imageで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCodex Gpt Imageを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Codex Gpt Image」は無料ですか?

はい。ningzimuがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇