Sub2API Docs

统一 AI API 接入文档

Sub2API 是实验室的 AI API 网关。创建 API Key 时选择分组,默认是 GPT;GLM、Gork、MiniMax 需要各自的分组 Key。配置 OpenAI 兼容 Base URL 后,所有模型都按这把 Key 的分组生效。调用前先 GET /v1/models。

Core Info
OpenAI 兼容 Base
https://sub2api.eaislab.com/v1
认证
Authorization: Bearer <API_Key>
模型清单确认时间
2026-11-01,以 GET /v1/models 与控制台为准

模型清单确认于所示日期。实际可用模型以 GET /v1/models 与控制台为准。本页不是实时状态页。

For students

学生接入

四步开始调用

  1. 向周子杰、胡子昌申请账号,由他们完成注册和充值。
  2. 打开 https://sub2api.eaislab.com/login 登录,在控制台获取 API Key,并查看个人用量。
  3. 客户端 Base URL 填写 https://sub2api.eaislab.com/v1,请求头使用 Authorization: Bearer <API_Key>。可用模型以 GET /v1/models 和控制台为准。
  4. 门户进度追踪的用量视图可以查看用量,但 API Key 仍从 Sub2API 控制台获取。

账号、余额与并发

  • 账号注册、模型接入配置、余额充值:周子杰、胡子昌。
  • 实验室统一邮箱:info@eaislab.com
  • 默认并发较低,常见为 1。需要提高并发请联系周子杰、胡子昌。
Quick Start

快速接入

统一使用 https://sub2api.eaislab.com。如果客户端要求填写 OpenAI Base URL,通常填写 https://sub2api.eaislab.com/v1。登录控制台获取 API Key:https://sub2api.eaislab.com/login。

Codex 与较新客户端优先使用 POST /v1/responses。部分 gpt-5.x 通过 POST /v1/chat/completions 可能失败。

原生 /v1/messages(Claude)和 /v1beta(Gemini)只在对应的活跃分组 Key 下可用。anthropic 与 gemini 分组当前是历史停用,生产里没有活跃的 Claude / Gemini 分组 Key。GPT 分组 Key 会得到 permission_error,或提示平台不是 gemini。

Base URL

https://sub2api.eaislab.com
https://sub2api.eaislab.com/login
https://sub2api.eaislab.com/v1

认证方式

Authorization: Bearer <API_Key>

常用接口

GET /v1/models
POST /v1/chat/completions
POST /v1/responses

OpenAI / Codex 示例(优先 Responses)

curl https://sub2api.eaislab.com/v1/responses \
 -H "Authorization: Bearer $SUB2API_KEY" \
 -H "Content-Type: application/json" \
 -d '{
 "model": "gpt-6.1-sol",
 "input": "hello"
 }'

实验室 Codex 默认用 gpt-6.1-sol,gpt-6-astra 也可以。只支持 chat/completions 时可以改用 gpt-5.4;部分 gpt-5.x 走该接口会失败。

Anthropic 示例(历史停用,仅活跃分组 Key)

# 历史停用:当前没有活跃的 Anthropic 分组 Key
# 仅当以后存在对应分组 Key 时,POST /v1/messages 才可用
curl https://sub2api.eaislab.com/v1/messages \
 -H "Authorization: Bearer $SUB2API_KEY" \
 -H "Content-Type: application/json" \
 -d '{
 "model": "claude-opus-4-7",
 "max_tokens": 1024,
 "messages": [
   {"role": "user", "content": "hello"}
 ]
 }'

仅当存在活跃的 Anthropic 分组 Key 时才能调用 /v1/messages。该分组当前为历史停用,生产里没有这样的 Key。实验室 GPT 分组会返回 permission_error。

Gemini 示例(历史停用,仅活跃分组 Key)

# 历史停用:当前没有活跃的 Gemini 分组 Key
# 仅当以后存在对应分组 Key 时,/v1beta 才可用
curl https://sub2api.eaislab.com/v1beta/models/gemini-3.1-pro-preview:generateContent \
 -H "x-goog-api-key: $SUB2API_KEY" \
 -H "Content-Type: application/json" \
 -d '{
 "contents": [{
   "role": "user",
   "parts": [{"text": "hello"}]
 }]
 }'

仅当存在活跃的 Gemini 分组 Key 时才能调用 /v1beta。该分组当前为历史停用,生产里没有这样的 Key。实验室 GPT 分组会提示平台不是 gemini。

Groups

模型分组

创建 API Key 时要选择分组,默认是 GPT。GLM、Gork、MiniMax 需要各自的分组 Key。调用前始终先 GET /v1/models。所有模型都按这把 Key 的分组生效,不只是 Claude / Gemini。下面不是人人可用的模型广场,也不展示账号池、额度或实时可用性。

OpenAI compatible

GPT 分组

20 models

实验室默认分组。OpenAI 兼容客户端、Codex / OpenCode / Cursor / Continue;文本和代码优先走 Responses。

codex-auto-review
gpt-5.2
OpenAI: GPT-5.2 400K context · text+image+file->text

GPT-5.2 is the latest frontier-grade model in the GPT-5 series, offering stronger agentic and long context perfomance compared to GPT-5.1. It uses adaptive reasoning to allocate…

gpt-5.3-codex-spark
gpt-5.4
OpenAI: GPT-5.4 1050K context · text+image+file->text

GPT-5.4 is OpenAI’s latest frontier model, unifying the Codex and GPT lines into a single system. It features a 1M+ token context window (922K input, 128K output) with support f…

gpt-5.4-mini
OpenAI: GPT-5.4 Mini 400K context · text+image+file->text

GPT-5.4 mini brings the core capabilities of GPT-5.4 to a faster, more efficient model optimized for high-throughput workloads. It supports text and image inputs with strong per…

gpt-5.6
gpt-5.6-luna
OpenAI: GPT-5.6 Luna 1050K context · text+image+file->text

GPT-5.6 Luna is a fast, cost-efficient model in OpenAI's GPT-5.6 series. It is suited for high-volume, latency-sensitive tasks such as chat, classification, and lightweight agen…

gpt-5.6-sol
OpenAI: GPT-5.6 Sol 1050K context · text+image+file->text

GPT-5.6 Sol is the flagship model in OpenAI's GPT-5.6 series. It is suited for complex reasoning, coding, and agentic workflows, and is particularly strong at command-line and m…

gpt-5.6-terra
OpenAI: GPT-5.6 Terra 1050K context · text+image+file->text

GPT-5.6 Terra is a balanced model in OpenAI's GPT-5.6 series, positioned between the flagship Sol tier and the cost-efficient Luna tier. It is suited for everyday coding, reason…

gpt-6
gpt-6-astra
OpenAI: GPT-6 Astra 1050K context · text+image+file->text

GPT-6 Astra is OpenAI's flagship model for demanding end-to-end work. It is suited for advanced analysis, software engineering, deep research, scientific work, and document crea…

gpt-6-luna
OpenAI: GPT-6 Luna 1050K context · text+image+file->text

GPT-6 Luna is the fast, cost-efficient model in OpenAI's GPT-6 series, positioned below GPT-6 Sol. It is suited for high-volume and latency-sensitive workloads such as chat, cla…

gpt-6-sol
OpenAI: GPT-6 Sol 1050K context · text+image+file->text

GPT-6 Sol is the cost-efficient high-end model in OpenAI's GPT-6 series, positioned below the flagship GPT-6 Astra and above the fast GPT-6 Luna tier. It is suited for demanding…

gpt-6.1-sol
OpenAI: GPT-6.1 Sol 1050K context · text+image+file->text

GPT-6.1 Sol is an upgrade to GPT-6 Sol from OpenAI, positioned below the flagship GPT-6 Astra in the GPT-6 series. It is suited for agentic coding, computer use, document-heavy …

gpt-6.1-terra
OpenAI: GPT-6.1 Terra 1050K context · text+image+file->text

GPT-6.1 Terra is the mid-tier model in OpenAI's GPT-6.1 series, priced below GPT-6.1 Sol. It is suited for everyday agentic, coding, and writing work, is particularly strong at …

gpt-image-1gpt-image-1.5gpt-image-2gpt-image-2.5-flaregpt-image-2.5-sunburst

Codex 默认示例优先 gpt-6.1-sol,也可 gpt-6-astra。图片用 gpt-image 系列。不要填写 live 不存在的 gpt-5.5、gpt-5.3-codex。GPT 组 messages_dispatch 会把 Claude 风格名映射到 GPT 模型,不是原生 Claude。实际可用以 GET /v1/models 与控制台为准。

OpenAI compatible · 智谱

GLM 分组

3 models

智谱 GLM 模型;OpenAI 兼容 Base 仍用 /v1。

glm-5.2
Z.ai: GLM 5.2 1049K context · text->text

GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-lev…

glm-5.3
Z.ai: GLM 5.3 1049K context · text->text

GLM-5.3 is a large-scale reasoning model from Z.ai, built for complex software engineering and long-horizon agent tasks. It supports text input and output with a 1M-token contex…

glm-5.3-flash
Z.ai: GLM 5.3 Flash 1049K context · text+image+video->text

GLM-5.3-Flash is a native multimodal model from Z.ai. It is suited for efficient coding and long-horizon agent tasks. Its hybrid sparse and linear attention architecture maintai…

另建 GLM 分组 Key。勿照抄后台仍残留的 gpt-* allowlist 名。以 GET /v1/models 复核。

Grok compatible

Gork 分组(Grok / xAI)

14 models

控制台拼写为 Gork,即 Grok / xAI。

grok-4.3
SpaceXSI: Grok 4.3 1000K context · text+image+file->text

Grok 4.3 is a reasoning model from SpaceXSI. It accepts text and image inputs with text output, and is suited for agentic workflows, instruction-following tasks, and application…

grok-4.5
SpaceXSI: Grok 4.5 500K context · text+image+file->text

Grok 4.5 is a model from SpaceXSI with frontier performance on coding, knowledge work, and STEM.

grok-4.6
SpaceXSI: Grok 4.6 500K context · text+image+file->text

Grok 4.6 is a model from SpaceXSI with frontier performance on coding, knowledge work, and STEM. It is succeeded by [Grok 4.7](/x-ai/grok-4.7).

grok-4.7
SpaceXSI: Grok 4.7 500K context · text+image+file->text

Grok 4.7 is SpaceXSI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, v…

grok-build-0.1grok-4.20-0309-reasoninggrok-4.20-0309-non-reasoninggrok-4.20-multi-agent-0309grok-imagine-imagegrok-imagine-image-2.0grok-imagine-image-qualitygrok-imagine-videogrok-imagine-video-1.5grok-imagine-video-1.5-lite

另建 Gork 分组 Key。默认文本模型多为 grok-4.6。列表来自上游 observed;以 GET /v1/models 为准。

Anthropic-compatible platform

minmax 分组(MiniMax)

MiniMax 通道;控制台分组名 minmax。

另建 minmax 分组 Key。具体模型 id 以该 Key 的 GET /v1/models 为准,勿编造。

inactive

历史停用分组

历史停用

anthropic、anthropic_max、claude_max_limit、eaislab_max_new、King、gemini、openrouter_free 均为历史停用分组(inactive)。不要写成现行可用,也不承诺还能调用。

原生 Claude(POST /v1/messages)和 Gemini(/v1beta)只有在对应的活跃分组 Key 存在时才可用;当前没有活跃的 Claude / Gemini 分组。用其他分组的 Key 调用会得到 permission_error、model_not_found,或提示平台不是 gemini。历史模型名只供对照,不是现行清单。

FAQ

常见错误

no available accounts

当前模型暂时没有可用账号池。

  • 换同分组的其他模型。
  • 检查模型名是否写对。
  • 联系管理员确认 API Key 分组权限。
Unsupported parameter: background

请求里带了当前上游不支持的参数,例如 background。

  • 关闭客户端里的 background mode。
  • 或换一个支持该参数的客户端配置。
context canceled

请求中途被客户端取消,常见于网页关闭、流式请求中断或网络切换。

  • 通常不是服务端宕机;可以直接重试。
  • 如果反复出现,检查本地网络或客户端超时设置。
404 page not found

请求路径不存在。

  • OpenAI SDK 使用 /v1。
  • Responses 使用 POST /v1/responses,不要用裸 /responses。
  • Anthropic 分组才使用 /v1/messages。
  • Gemini 分组才使用 /v1beta。
model_not_found

当前接口或当前分组里没有这个模型。

  • 改用 POST /v1/responses,或换成本分组在 GET /v1/models 里列出的模型。
  • 不要再填写已不存在的 gpt-5.5、gpt-5.3-codex。
  • Codex 与较新客户端优先 Responses;部分 gpt-5.x 走 chat/completions 会失败。
group does not allow /v1/messages

当前 API Key 不是 Anthropic 分组,不能调用 /v1/messages。实验室 GPT 分组 Key 通常会返回 permission_error。

  • 这不是所有 Key 都能用的通用接口。
  • 需要 Claude 时,向周子杰、胡子昌确认 Key 是否属于 Anthropic 分组。
  • GPT 分组请改用 /v1/responses 或 /v1/chat/completions。
platform is not gemini

当前 API Key 不是 Gemini 分组,不能调用 /v1beta。实验室 GPT 分组 Key 会提示平台不是 gemini。

  • Gemini 接口只对 Gemini 分组开放。
  • 以控制台分组和 GET /v1/models 为准。
429 / insufficient quota

请求过于频繁,或额度、并发不足。

  • 降低并发并做退避重试。默认并发往往只有 1。
  • 需要提高并发或处理余额时,联系周子杰、胡子昌。
Contact

联系 / 反馈

账号注册、模型接入配置和余额充值由周子杰、胡子昌负责,也可发邮件到 info@eaislab.com。默认并发较低(常见为 1),需要提高请联系上述负责人。