在任何 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,让项目持续运行在云端,并在不丢失上下文的前提下协作。