cheapaimodel

Codex CLI

cheapaimodelの残高でOpenAI Codex CLIを動かします。

コピー

Codex CLIは設定ファイルでカスタムのモデルプロバイダーを追加できます。

設定

キーを環境変数としてexportします。

~/.zshrc
export CHEAPAIMODEL_API_KEY="sk-..."

続いて、~/.codex/config.tomlにプロバイダーを追加します。

~/.codex/config.toml
model = "glm-5.3"
model_provider = "cheapaimodel"

[model_providers.cheapaimodel]
name = "cheapaimodel"
base_url = "https://api.cheapaimodel.ai/v1"
env_key = "CHEAPAIMODEL_API_KEY"
wire_api = "responses"

あとはいつもどおりcodexを実行します。CodexはResponses APIのみを使用します。モデルカタログで/v1/responsesに対応しているモデルなら、glm-5.3の代わりに使えます。

コピー
開く

このページの内容