在任何 Agent 產品中使用 Agent.Space 方案與積分

02 / Developer API

在任何 Agent 產品中使用 Agent.Space 方案與積分

Codex 獨立帳號方案涵蓋 OpenAI 模型,其他可用模型用積分按量付費。除了 Agent.Space,你也可以把它們用在 Codex、Claude Code、OpenCode、Hermes 等常見 Agent 產品中。

Developer API 的付款來源

方案 + 積分

Codex 獨立帳號

OpenAI 模型

包含在你的 Codex 獨立帳號方案中。

官方按量

其他可用模型

從積分扣款,可按需儲值。

把額度用在你熟悉的 Agent 產品中

內建使用Agent.Space
Codex
Claude Code
OpenCode
Hermes
自己的 Agent 產品

在 Agent.Space 中可以直接使用;連接其他產品時,只需設定一次 Developer API。

GPT Image 2 優先使用方案額度,無方案或額度用完後改用積分按量付費。其他模型按各自標示的付款方式扣款。

03 / Agent 用戶端

在你習慣的用戶端裡,使用 Agent.Space 的模型

下載 Codex、Claude Code 或 OpenCode,把它指向 Agent.Space Developer API。一把 API Key,就能把方案額度、積分和全部可用模型,帶進你每天在用的終端機和編輯器。

  • Codex

    OpenAI · 終端機與 IDE 裡的 Coding Agent

    OpenAI 官方 Coding Agent,提供 CLI、IDE 擴充功能與桌面版。透過 OpenAI Responses 協定連接 Agent.Space,直接使用 Codex 獨立帳號方案中的 OpenAI 模型。

    • macOS
    • Linux
    • Windows

    一行安裝 · macOS / Linux

    bash
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
  • Claude Code

    Anthropic · 終端機 Coding Agent

    Anthropic 官方 Coding Agent,原生使用 Anthropic Messages 協定。把 Base URL 指向 Agent.Space,即可用積分按量呼叫 Claude 系列模型。

    • macOS
    • Linux
    • Windows

    一行安裝 · macOS / Linux

    bash
    curl -fsSL https://claude.ai/install.sh | bash
  • OpenCode

    開源 · 終端機 Coding Agent

    開源、支援自訂 Provider 的終端機 Agent,同時相容 OpenAI 與 Anthropic 兩種協定。一份設定,接入 Agent.Space 的全部可用模型。

    • macOS
    • Linux
    • Windows

    一行安裝 · macOS / Linux

    bash
    curl -fsSL https://opencode.ai/install | bash

為什麼透過 Agent.Space 接入

  • 一把 Key

    一個 API Key,多家模型

    OpenAI、Anthropic、DeepSeek 等模型共用同一個 Key 與 Endpoint,換模型不用換帳號。
  • 兩種協定

    OpenAI Responses 與 Anthropic Messages

    依用戶端原生協定接入,不裝代理、不改用戶端,設定一次長期可用。
  • 額度透明

    方案與積分分帳清楚

    方案內的模型先用方案額度,其餘從積分扣費,每一次請求都能在 Request history 裡核對。
  • 隨時切換

    用戶端隨你換

    今天用 Codex,明天換 Claude Code,Key 和額度都不變,工作流程不中斷。

三步完成:取得 API Key,選一個模型,把設定寫進用戶端。全程不需要改用戶端程式碼。

  1. 取得 API Key

    在 Agent.Space 的 Developer API 面板建立一個 Key,例如「Codex · MacBook」。複製設定後,用完整 Key 取代其中的 <your-api-key>。

  2. 選擇模型

    開啟接入指南,選擇用戶端與可用模型;範本會自動填入正確的模型 ID。

  3. 寫入用戶端設定

    複製完整設定,用 Key 取代預留值,並儲存到用戶端顯示的路徑。設定檔只保存在本機。

  1. 清理舊登入

    若 ~/.codex/auth.json 檔案存在,請先刪除。

  2. 寫入設定

    將前三項模型設定放在 config.toml 頂部、任何 [section] 之前。取代既有同名設定,保留完整 Provider 設定區塊。

  3. 填入你的 API Key

    用你的 Key 取代 <your-api-key>,然後在本機儲存。

取得我的 API Key

設定檔 · ~/.codex/config.toml

toml
# IMPORTANT: Always keep this block at the TOP of this file.# ↓model = "gpt-6-astra"model_reasoning_effort = "high"model_provider = "agent-space"# ↑
# ...# There could be more blocks here in this file.# ...
# This is a full block.# ↓[model_providers.agent-space]name = "Agent.Space"base_url = "https://api.agent.space/v1"wire_api = "responses"experimental_bearer_token = "<your-api-key>"# ↑
# ...# There could be more blocks here in this file.# ...

其他安裝方式

  • npmnpm install -g @openai/codex
  • Homebrewbrew install --cask codex
  • Windowspowershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

範本已帶入 Endpoint 與所選模型。只需替換 <your-api-key>,並將設定檔保存在本機,不要提交到儲存庫或分享給他人。

從一個 Space 開始

把下一項任務交給 Agent.Space

選擇合適的 Agent,讓專案持續運行在雲端,並在不遺失上下文的前提下協作。