String AI · 5 分钟上手指南
欢迎来到 String AI!这篇指南帮你用最短时间完成第一次对话,理解模型选择、余额查看和常见疑问。不写代码,不配工具,只看网页。
第一步:登录账号
- 在浏览器中打开 String AI 网页入口。
- 使用你的注册邮箱登录。如果还没注册,请联系管理员获取邀请链接或开通权限。
- 登录成功后,页面右上角或侧边栏会显示你的账号信息(头像或邮箱)。看到它就说明登录成功了。
如果登录失败,请依次检查:
- 邮箱地址是否与注册时一致(注意大小写和空格)
- 垃圾邮件箱里是否有验证码或邀请邮件
- 浏览器是否开启了弹窗拦截(部分第三方登录会弹出新窗口)
- 公司网络或代理是否限制了登录页面
- 尝试用浏览器的无痕模式重新打开
第二步:完成第一次提问
登录后你会进入 Webchat 页面。在输入框里直接输入下面的文字,按下回车:
你是谁?用三句话介绍你可以帮我做什么。然后你会看到 AI 开始逐字输出回复。
如果页面正常回复了,恭喜,你已经会用了。
这就跟你平时发微信一样 —— 打字、发送、看回复。接下来可以试试这些问题,感受一下 AI 能干什么:
| 想做什么 | 可以这样问 |
|---|---|
| 写点东西 | 「帮我写一封请假邮件,理由是去看牙医。」 |
| 翻译内容 | 「把下面这段话翻译成英文:<粘贴文字>」 |
| 理解概念 | 「用通俗的话解释什么是 API。」 |
| 总结资料 | 「帮我用三句话总结下面这段文字:<粘贴文字>」 |
| 改写润色 | 「帮我把这段话改得更正式一些:<粘贴文字>」 |
一个小建议: 每次开始一个新任务时,点击「新建对话」按钮开一个新对话。如果把写邮件、翻译、总结全部塞在同一个对话里,AI 可能会把前面的内容混在一起,回答反而变乱。
第三步:选择模型
模型就像 AI 的「大脑」,不同模型有不同的特点和价格。你会在输入框上方或旁边看到一个模型选择器。
不知道怎么选?记住这条原则就行:先选默认模型,遇到问题再换。
| 你的使用场景 | 推荐模型 |
|---|---|
| 日常聊天、写作、翻译、简单问答 | 默认推荐模型 |
| 阅读长文档、复杂分析、深度推理 | 能力更强的模型(如 gpt-5.5) |
| 写代码、排查 bug、代码审查 | Coding 类模型或高能力模型 |
| 大量简单重复任务、预算有限 | 轻量快速模型(如 gpt-5.4-mini) |
一个简单的判断方法:
- 你想要质量高 → 选更强的模型
- 你想要速度快、省钱 → 选轻量模型
- 你不确定 → 选默认模型,永远不会错
随着使用次数多了,你会慢慢形成自己的偏好,不需要一开始就纠结。
第四步:查看余额和用量
在你开始大量使用之前,建议花一分钟搞清楚三件事:
- 当前余额或剩余额度是多少 —— 这决定你还能用多久。一般在页面右上角头像附近,或「设置 / 账户」页面里。
- 每次对话大概消耗多少 —— 可以在「消耗记录」页面看到每次调用的详细用量。短问答消耗较少,长文档、多轮深度对话消耗较多。
- 是否按模型区分价格 —— 不同模型的单价不同,强模型通常更贵,轻量模型更便宜。
影响消耗的主要因素:
| 因素 | 说明 |
|---|---|
| 模型选择 | 越强的模型,单价越高 |
| 输入长度 | 你粘贴的文本越长,消耗越多 |
| 输出长度 | AI 回复越长,消耗越多 |
| 是否上传文件 | 上传 PDF、图片等文件会额外消耗 |
| 历史对话长度 | 在一个对话里追问太多轮,上下文会越来越长 |
省钱小技巧:
- 新任务新对话:不要在一个对话里塞太多话题
- 长文档先让 AI 列出提纲,再分段深入
- 简单任务用轻量模型
- 隔几天看一眼消耗记录,心里有数
第五步:最常见的三个新手问题
Q1:模型太多了,我不知道选哪个
先用默认模型。 它适合 80% 的日常任务。只有当你发现「回复质量不够好」「要处理的东西太长」「成本太高了」的时候,再切到其他模型。不要在一开始就把所有模型都试一遍 —— 会累死。
Q2:余额和消耗到底怎么算的,为什么每次不一样
消耗跟你选的模型、输入内容长短、AI 回复长短、是否上传了文件、历史对话轮数都有关系。简单说:给 AI 喂的东西越多、让 AI 产出的越多、用的模型越强,消耗就越大。不需要盯着每次的数字看 —— 关注总余额和消耗趋势就够了。
Q3:我需要在电脑上装什么软件吗
完全不需要。 只要你能打开浏览器,就能用 Webchat。那些 VS Code、Codex、Cursor 之类的工具配置,是给开发者用的。如果你只是想在网页上提问、写作、翻译、总结,什么都不用装。
String AI · 5 分钟上手指南
歡迎來到 String AI!这篇指南幫你用最短時間完成第一次对話,理解模型選擇、余額查看和常見疑問。不寫代碼,不配工具,只看網页。
第一步:登錄帳號
- 在瀏覽器中打開 String AI 網页入口。
- 使用你的注冊郵箱登錄。如果還沒注冊,請聯絡管理員獲取邀請連結或開通權限。
- 登錄成功后,页面右上角或側邊欄會顯示你的帳號信息(頭像或郵箱)。看到它就說明登錄成功了。
如果登錄失敗,請依次檢查:
- 郵箱地址是否與注冊時一致(注意大小寫和空格)
- 垃圾郵件箱里是否有驗證碼或邀請郵件
- 瀏覽器是否開啟了彈窗攔截(部分第三方登錄會彈出新窗口)
- 公司網絡或代理是否限制了登錄页面
- 嘗試用瀏覽器的無痕模式重新打開
第二步:完成第一次提問
登錄后你會進入 Webchat 页面。在輸入框里直接輸入下面的文字,按下回車:
你是谁?用三句话介绍你可以帮我做什么。然后你會看到 AI 開始逐字輸出回複。
如果页面正常回複了,恭喜,你已经會用了。
这就跟你平時發微信一樣 —— 打字、發送、看回複。接下來可以試試这些問題,感受一下 AI 能干什么:
| 想做什么 | 可以这樣問 |
|---|---|
| 寫點東西 | 「幫我寫一封請假郵件,理由是去看牙醫。」 |
| 翻譯內容 | 「把下面这段話翻譯成英文:<粘贴文字>」 |
| 理解概念 | 「用通俗的話解释什么是 API。」 |
| 總結資料 | 「幫我用三句話總結下面这段文字:<粘贴文字>」 |
| 改寫潤色 | 「幫我把这段話改得更正式一些:<粘贴文字>」 |
一個小建議: 每次開始一個新任務時,點擊「新建对話」按钮開一個新对話。如果把寫郵件、翻譯、總結全部塞在同一個对話里,AI 可能會把前面的內容混在一起,回答反而變亂。
第三步:選擇模型
模型就像 AI 的「大腦」,不同模型有不同的特點和价格。你會在輸入框上方或旁邊看到一個模型選擇器。
不知道怎么選?記住这條原則就行:先選默認模型,遇到問題再換。
| 你的使用場景 | 推薦模型 |
|---|---|
| 日常聊天、寫作、翻譯、簡單問答 | 默認推薦模型 |
| 閱讀長文檔、複雜分析、深度推理 | 能力更強的模型(如 gpt-5.5) |
| 寫代碼、排查 bug、代碼審查 | Coding 類模型或高能力模型 |
| 大量簡單重複任務、預算有限 | 輕量快速模型(如 gpt-5.4-mini) |
一個簡單的判斷方法:
- 你想要質量高 → 選更強的模型
- 你想要速度快、省錢 → 選輕量模型
- 你不確定 → 選默認模型,永遠不會錯
隨着使用次數多了,你會慢慢形成自己的偏好,不需要一開始就纠結。
第四步:查看余額和用量
在你開始大量使用之前,建議花一分钟搞清楚三件事:
- 當前余額或剩余額度是多少 —— 这決定你還能用多久。一般在页面右上角頭像附近,或「設置 / 帳戶」页面里。
- 每次对話大概消耗多少 —— 可以在「消耗記錄」页面看到每次調用的詳細用量。短問答消耗較少,長文檔、多輪深度对話消耗較多。
- 是否按模型區分价格 —— 不同模型的單价不同,強模型通常更貴,輕量模型更便宜。
影響消耗的主要因素:
| 因素 | 說明 |
|---|---|
| 模型選擇 | 越強的模型,單价越高 |
| 輸入長度 | 你粘贴的文本越長,消耗越多 |
| 輸出長度 | AI 回複越長,消耗越多 |
| 是否上傳文件 | 上傳 PDF、圖片等文件會額外消耗 |
| 歷史对話長度 | 在一個对話里追問太多輪,上下文會越來越長 |
省錢小技巧:
- 新任務新对話:不要在一個对話里塞太多話題
- 長文檔先讓 AI 列出提纲,再分段深入
- 簡單任務用輕量模型
- 隔幾天看一眼消耗記錄,心里有數
第五步:最常見的三個新手問題
Q1:模型太多了,我不知道選哪個
先用默認模型。 它適合 80% 的日常任務。只有當你發現「回複質量不够好」「要處理的東西太長」「成本太高了」的時候,再切到其他模型。不要在一開始就把所有模型都試一遍 —— 會累死。
Q2:余額和消耗到底怎么算的,為什么每次不一樣
消耗跟你選的模型、輸入內容長短、AI 回複長短、是否上傳了文件、歷史对話輪數都有關系。簡單說:給 AI 喂的東西越多、讓 AI 產出的越多、用的模型越強,消耗就越大。不需要盯着每次的數字看 —— 關注總余額和消耗趋勢就够了。
Q3:我需要在電腦上裝什么軟件吗
完全不需要。 只要你能打開瀏覽器,就能用 Webchat。那些 VS Code、Codex、Cursor 之類的工具設定,是給開發者用的。如果你只是想在網页上提問、寫作、翻譯、總結,什么都不用裝。
String AI - 5-Minute Getting Started Guide
Welcome to String AI. This guide helps you complete your first conversation, understand model selection, check balance and usage, and answer the most common beginner questions. No code, no tool configuration, just the web app.
Step 1: Log in to your account
- Open the String AI web entry in your browser.
- Log in with your registered email address. If you have not registered yet, contact your administrator for an invitation link or access.
- After login, your account information, avatar, or email should appear in the top-right corner or sidebar. If you can see it, login succeeded.
If login fails, check the following:
- Whether the email address matches the one used during registration, including spaces and casing
- Whether the verification code or invitation email is in spam
- Whether your browser blocks pop-ups, because some third-party login flows open a new window
- Whether your company network or proxy restricts the login page
- Whether an incognito browser window works
Step 2: Ask your first question
After login, you will enter the Webchat page. Type the following message into the input box and press Enter:
Who are you? In three sentences, explain what you can help me do.You should see the AI start streaming a response.
If the page replies normally, congratulations. You are ready to use String AI.
It works like a normal chat app: type, send, and read the reply. Try these examples to get a feel for what AI can do:
| Goal | Example prompt |
|---|---|
| Write something | "Write a short leave request email because I need to visit the dentist." |
| Translate content | "Translate the following paragraph into English: <paste text>" |
| Understand a concept | "Explain what an API is in simple language." |
| Summarize material | "Summarize the following text in three sentences: <paste text>" |
| Rewrite and polish | "Make this paragraph sound more formal: <paste text>" |
Small tip: Start a new conversation for each new task. If you mix email writing, translation, and summarization in one long conversation, the AI may blend earlier context into later answers.
Step 3: Choose a model
A model is the AI "brain". Different models have different capabilities and prices. You will see a model selector near the input box.
Not sure which one to choose? Start with the default model and switch only when needed.
| Your use case | Recommended model |
|---|---|
| Daily chat, writing, translation, simple Q&A | Default recommended model |
| Long documents, complex analysis, deep reasoning | A stronger model such as gpt-5.5 |
| Coding, bug fixing, code review | Coding models or high-capability models |
| Many simple repeated tasks or cost-sensitive workflows | A lightweight model such as gpt-5.4-mini |
A simple rule:
- Want higher quality -> choose a stronger model
- Want faster and cheaper output -> choose a lightweight model
- Not sure -> use the default model
After using String AI for a while, you will naturally learn which models fit your own workflow.
Step 4: Check balance and usage
Before heavy usage, spend one minute understanding three things:
- Your current balance or remaining quota - this determines how long you can continue using the service. It is usually near your avatar or under Settings / Account.
- How much each conversation costs - the usage history page shows detailed consumption for each request. Short Q&A costs less; long documents and multi-turn reasoning cost more.
- Whether pricing differs by model - stronger models are usually more expensive, while lightweight models are cheaper.
Main factors that affect usage:
| Factor | Explanation |
|---|---|
| Model choice | Stronger models usually cost more |
| Input length | Longer pasted text consumes more |
| Output length | Longer AI replies consume more |
| File uploads | PDFs, images, and other files may add cost |
| Conversation history | Long multi-turn conversations grow the context |
Cost-saving tips:
- Start a new conversation for a new task
- Ask for an outline first, then go deeper section by section
- Use lightweight models for simple tasks
- Check usage records every few days so you know the trend
Step 5: Three common beginner questions
Q1: There are too many models. Which one should I choose?
Use the default model first. It works for most daily tasks. Switch only when response quality is not enough, the material is too long, or cost becomes too high. Do not try every model at the beginning.
Q2: How are balance and usage calculated? Why is every request different?
Usage depends on the model, input length, output length, file uploads, and conversation history. In short: the more you give the AI, the more you ask it to generate, and the stronger the model, the more it costs. You do not need to watch every single number. Focus on total balance and usage trend.
Q3: Do I need to install anything on my computer?
No. If you can open a browser, you can use Webchat. Tools such as VS Code, Codex, and Cursor are for developers. If you only want to ask questions, write, translate, or summarize on the web, you do not need to install anything.
前置:安装 Node.js 运行环境
Claude Code、Gemini CLI、Codex、OpenClaw 等工具都依赖 Node.js。建议先安装 LTS 版本。
Windows
方法一(推荐):前往 Node.js 官网 下载 LTS 版本,双击安装。
方法二 / 三(包管理器):
choco install nodejs-lts
# 或
scoop install nodejs-ltsmacOS
brew install node
# 或前往官网下载 macOS 安装包Linux
# Ubuntu / Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# CentOS / RHEL
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejs验证安装
node --version
npm --version输出版本号即表示安装成功。
前置:安裝 Node.js 運行環境
Claude Code、Gemini CLI、Codex、OpenClaw 等工具都依赖 Node.js。建議先安裝 LTS 版本。
Windows
方法一(推薦):前往 Node.js 官網 下載 LTS 版本,雙擊安裝。
方法二 / 三(包管理器):
choco install nodejs-lts
# 或
scoop install nodejs-ltsmacOS
brew install node
# 或前往官网下载 macOS 安装包Linux
# Ubuntu / Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# CentOS / RHEL
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejs驗證安裝
node --version
npm --version輸出版本號即表示安裝成功。
Prerequisite: Install the Node.js Runtime
Claude Code, Gemini CLI, Codex, OpenClaw, and similar tools depend on Node.js. Install the LTS version first.
Windows
Option one, recommended: go to the Node.js website and install the LTS version.
Options two and three, using package managers:
choco install nodejs-lts
# or
scoop install nodejs-ltsmacOS
brew install node
# or download the macOS installer from the official websiteLinux
# Ubuntu / Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# CentOS / RHEL
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejsVerify Installation
node --version
npm --versionIf both commands print version numbers, Node.js and npm are ready.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
Codex(CLI 与 VS Code 插件)
Codex CLI 和 VS Code Codex 插件共用配置文件 ~/.codex/config.toml。
| 平台 | 配置文件路径 |
|---|---|
| Windows | C:\Users\你的用户名\.codex\config.toml |
| macOS / Linux | ~/.codex/config.toml |
可用模型:gpt-5.5、gpt-5.4、gpt-5.4-mini。
方式一:一键脚本(推荐)
脚本会检查 Node.js 与 Codex CLI、提示输入 API Key,并把配置写入 ~/.codex。如已设置 STRING_AI_API_KEY 环境变量则优先使用,且不会读取本机已有的 OPENAI_API_KEY。
# Windows PowerShell
irm https://www.string.ink/install/codex.ps1 | iex配置写入后 Codex CLI 与 App 客户端会同时生效;已打开的 CLI 需重启后才读取新配置。
方式二:手动创建配置
一键脚本不可用时,手动创建 config.toml 与 auth.json。
最简配置:
model_provider = "OpenAI"
model = "gpt-5.5"
[model_providers.OpenAI]
base_url = "https://www.string.ink/v1"完整手动安装(Windows PowerShell,含备份与 auth.json):
$codexDir = "$env:USERPROFILE\.codex"
if (-not (Test-Path $codexDir)) { mkdir $codexDir | Out-Null }
if (Test-Path "$codexDir\config.toml") {
Copy-Item "$codexDir\config.toml" "$codexDir\config.toml.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
if (Test-Path "$codexDir\auth.json") {
Copy-Item "$codexDir\auth.json" "$codexDir\auth.json.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
@"
model_provider = "OpenAI"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://www.string.ink/v1"
wire_api = "responses"
requires_openai_auth = true
[features]
goals = true
"@ | Out-File -FilePath "$codexDir\config.toml" -Encoding utf8
@"
{
"OPENAI_API_KEY": "YOUR_API_KEY"
}
"@ | Out-File -FilePath "$codexDir\auth.json" -Encoding utf8配置完成后重启 Codex CLI 或 Codex App 客户端。
迁移 OAuth 旧会话(可选)
若之前用 Codex OAuth 登录,安装后旧会话可能因 provider 从内置 openai 切换到 OpenAI 而暂时不显示(不会被删除)。确认 config.toml 已是 model_provider = "OpenAI" 后,可运行迁移脚本,先预览再执行:
# Windows PowerShell
.\scripts\codex-migrate-provider.ps1 --dryrun
.\scripts\codex-migrate-provider.ps1
# macOS / Linux / WSL
scripts/codex-migrate-provider.sh --dryrun
scripts/codex-migrate-provider.sh脚本默认把旧 openai 会话迁移到当前 provider,写入前要求输入 MIGRATE 确认,并备份受影响的 SQLite 与 session JSONL,可据 backup 目录回滚。如旧会话来自其它自定义 provider,用 -From 显式指定来源。
验证配置
在 Codex / VS Code 中发起一个简单任务:
请阅读当前项目结构,并用中文总结这个项目可能是做什么的。不要修改文件。若 Codex 正常回复且 String AI 后台出现对应消耗记录,说明配置成功。
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
Codex(CLI 與 VS Code 插件)
Codex CLI 和 VS Code Codex 插件共用設定文件 ~/.codex/config.toml。
| 平台 | 設定文件路徑 |
|---|---|
| Windows | C:\Users\你的用户名\.codex\config.toml |
| macOS / Linux | ~/.codex/config.toml |
可用模型:gpt-5.5、gpt-5.4、gpt-5.4-mini。
方式一:一鍵腳本(推薦)
腳本會檢查 Node.js 與 Codex CLI、提示輸入 API Key,並把設定寫入 ~/.codex。如已設置 STRING_AI_API_KEY 環境變量則優先使用,且不會讀取本機已有的 OPENAI_API_KEY。
# Windows PowerShell
irm https://www.string.ink/install/codex.ps1 | iex設定寫入后 Codex CLI 與 App 客戶端會同時生效;已打開的 CLI 需重啟后才讀取新設定。
方式二:手動創建設定
一鍵腳本不可用時,手動創建 config.toml 與 auth.json。
最簡設定:
model_provider = "OpenAI"
model = "gpt-5.5"
[model_providers.OpenAI]
base_url = "https://www.string.ink/v1"完整手動安裝(Windows PowerShell,含備份與 auth.json):
$codexDir = "$env:USERPROFILE\.codex"
if (-not (Test-Path $codexDir)) { mkdir $codexDir | Out-Null }
if (Test-Path "$codexDir\config.toml") {
Copy-Item "$codexDir\config.toml" "$codexDir\config.toml.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
if (Test-Path "$codexDir\auth.json") {
Copy-Item "$codexDir\auth.json" "$codexDir\auth.json.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
@"
model_provider = "OpenAI"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://www.string.ink/v1"
wire_api = "responses"
requires_openai_auth = true
[features]
goals = true
"@ | Out-File -FilePath "$codexDir\config.toml" -Encoding utf8
@"
{
"OPENAI_API_KEY": "YOUR_API_KEY"
}
"@ | Out-File -FilePath "$codexDir\auth.json" -Encoding utf8設定完成后重啟 Codex CLI 或 Codex App 客戶端。
遷移 OAuth 舊會話(可選)
若之前用 Codex OAuth 登錄,安裝后舊會話可能因 provider 從內置 openai 切換到 OpenAI 而暫時不顯示(不會被刪除)。確認 config.toml 已是 model_provider = "OpenAI" 后,可運行遷移腳本,先預覽再執行:
# Windows PowerShell
.\scripts\codex-migrate-provider.ps1 --dryrun
.\scripts\codex-migrate-provider.ps1
# macOS / Linux / WSL
scripts/codex-migrate-provider.sh --dryrun
scripts/codex-migrate-provider.sh腳本默認把舊 openai 會話遷移到當前 provider,寫入前要求輸入 MIGRATE 確認,並備份受影響的 SQLite 與 session JSONL,可據 backup 目錄回滚。如舊會話來自其它自定義 provider,用 -From 顯式指定來源。
驗證設定
在 Codex / VS Code 中發起一個簡單任務:
请阅读当前项目结构,并用中文总结这个项目可能是做什么的。不要修改文件。若 Codex 正常回複且 String AI 後台出現对應消耗記錄,說明設定成功。
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
Codex (CLI and VS Code Extension)
Codex CLI and the VS Code Codex extension share the same configuration file: ~/.codex/config.toml.
| Platform | Configuration path |
|---|---|
| Windows | C:\Users\your-name\.codex\config.toml |
| macOS / Linux | ~/.codex/config.toml |
Available models: gpt-5.5, gpt-5.4, gpt-5.4-mini.
Option 1: One-Line Script (Recommended)
The script checks Node.js and Codex CLI, asks for your API Key, and writes the configuration to ~/.codex. If STRING_AI_API_KEY is already set, it uses that value first and does not read an existing OPENAI_API_KEY.
# Windows PowerShell
irm https://www.string.ink/install/codex.ps1 | iexAfter writing the configuration, Codex CLI and the app client will both use it. Restart any open CLI, VS Code, or Codex client so the new configuration is loaded.
Option 2: Manual Configuration
If the one-line script is unavailable, create config.toml and auth.json manually.
Minimal configuration:
model_provider = "OpenAI"
model = "gpt-5.5"
[model_providers.OpenAI]
base_url = "https://www.string.ink/v1"Full manual setup for Windows PowerShell, including backups and auth.json:
$codexDir = "$env:USERPROFILE\.codex"
if (-not (Test-Path $codexDir)) { mkdir $codexDir | Out-Null }
if (Test-Path "$codexDir\config.toml") {
Copy-Item "$codexDir\config.toml" "$codexDir\config.toml.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
if (Test-Path "$codexDir\auth.json") {
Copy-Item "$codexDir\auth.json" "$codexDir\auth.json.bak.$(Get-Date -Format yyyyMMddHHmmss)"
}
@"
model_provider = "OpenAI"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://www.string.ink/v1"
wire_api = "responses"
requires_openai_auth = true
[features]
goals = true
"@ | Out-File -FilePath "$codexDir\config.toml" -Encoding utf8
@"
{
"OPENAI_API_KEY": "YOUR_API_KEY"
}
"@ | Out-File -FilePath "$codexDir\auth.json" -Encoding utf8After configuration, restart Codex CLI or the Codex app client.
Migrate an Old OAuth Session (Optional)
If you previously logged in to Codex with OAuth, the old session may temporarily disappear after switching the provider from built-in openai to OpenAI. It is not deleted. After confirming that config.toml uses model_provider = "OpenAI", run the migration script. Preview first, then execute:
# Windows PowerShell
.\scripts\codex-migrate-provider.ps1 --dryrun
.\scripts\codex-migrate-provider.ps1
# macOS / Linux / WSL
scripts/codex-migrate-provider.sh --dryrun
scripts/codex-migrate-provider.shThe script migrates old openai sessions to the current provider by default. Before writing changes, it asks you to type MIGRATE and backs up affected SQLite and session JSONL files. You can roll back from the backup directory. If the old session came from another custom provider, specify it with -From.
Verify Configuration
Start a simple task in Codex or VS Code:
Read the current project structure and summarize what this project may do. Do not modify files.If Codex replies normally and the String AI console shows the corresponding usage record, the configuration is working.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
CC Switch
CC Switch 是跨平台桌面应用,可在一个界面里管理 Claude Code、Claude Desktop、Codex、Gemini CLI、OpenCode、OpenClaw、Hermes 等工具的供应商、路由、用量、会话与技能。
安装
# macOS(Homebrew)
brew install --cask cc-switch
brew upgrade --cask cc-switch
# Windows / Linux:从 Releases 页面下载安装包
# https://github.com/farion1231/cc-switch/releases方式 A:界面手动添加(推荐)
- 打开 CC Switch,进入「通用提供商 / Universal Provider」标签页。
- 点击「添加提供商」,填写:
- 名称:
String AI - Base URL:
https://www.string.ink/v1 - API Key:你的
sk-密钥 - 默认模型:
gpt-5.5
- 点击「测试连接 / Health Check」,返回成功即配置完成。
- 保存后在工具(如 Claude Code)中切换到该提供商即可生效。
方式 B:预设代码
若维护 CC Switch 的 universalProviderPresets.ts,可加入预设条目:
{
id: "stringai",
name: "String AI",
description: "String AI 中转服务 - Base URL: https://www.string.ink/v1",
baseUrl: "https://www.string.ink/v1",
models: ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini"],
defaultModel: "gpt-5.5",
// 注意:gpt-5.5 不需要 reasoningEffort 参数
}多数工具在切换供应商后需重启终端或对应 CLI 才会生效。切换后若 Codex 仍用旧配置,请关闭并重新打开终端、VS Code 或 Codex。
数据存储位置
| 数据 | 默认位置 |
|---|---|
| 数据库 | ~/.cc-switch/cc-switch.db |
| 本地设置 | ~/.cc-switch/settings.json |
| 自动备份 | ~/.cc-switch/backups/ |
| Skills | ~/.cc-switch/skills/ |
| 技能备份 | ~/.cc-switch/skill-backups/ |
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
CC Switch
CC Switch 是跨平台桌面應用,可在一個界面里管理 Claude Code、Claude Desktop、Codex、Gemini CLI、OpenCode、OpenClaw、Hermes 等工具的供應商、路由、用量、會話與技能。
安裝
# macOS(Homebrew)
brew install --cask cc-switch
brew upgrade --cask cc-switch
# Windows / Linux:从 Releases 页面下载安装包
# https://github.com/farion1231/cc-switch/releases方式 A:界面手動添加(推薦)
- 打開 CC Switch,進入「通用提供商 / Universal Provider」標簽页。
- 點擊「添加提供商」,填寫:
- 名稱:
String AI - Base URL:
https://www.string.ink/v1 - API Key:你的
sk-金鑰 - 默認模型:
gpt-5.5
- 點擊「測試連接 / Health Check」,返回成功即設定完成。
- 保存后在工具(如 Claude Code)中切換到該提供商即可生效。
方式 B:預設代碼
若維護 CC Switch 的 universalProviderPresets.ts,可加入預設條目:
{
id: "stringai",
name: "String AI",
description: "String AI 中转服务 - Base URL: https://www.string.ink/v1",
baseUrl: "https://www.string.ink/v1",
models: ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini"],
defaultModel: "gpt-5.5",
// 注意:gpt-5.5 不需要 reasoningEffort 参数
}多數工具在切換供應商后需重啟終端或对應 CLI 才會生效。切換后若 Codex 仍用舊設定,請關閉並重新打開終端、VS Code 或 Codex。
資料存儲位置
| 資料 | 默認位置 |
|---|---|
| 資料庫 | ~/.cc-switch/cc-switch.db |
| 本地設置 | ~/.cc-switch/settings.json |
| 自動備份 | ~/.cc-switch/backups/ |
| Skills | ~/.cc-switch/skills/ |
| 技能備份 | ~/.cc-switch/skill-backups/ |
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
CC Switch
CC Switch is a cross-platform desktop app for managing providers, routing, usage, sessions, and skills for tools such as Claude Code, Claude Desktop, Codex, Gemini CLI, OpenCode, OpenClaw, and Hermes.
Installation
# macOS with Homebrew
brew install --cask cc-switch
brew upgrade --cask cc-switch
# Windows / Linux: download the installer from Releases
# https://github.com/farion1231/cc-switch/releasesMethod A: Add a Provider in the UI (Recommended)
- Open CC Switch and go to the Universal Provider tab.
- Click Add Provider and enter:
- Name:
String AI - Base URL:
https://www.string.ink/v1 - API Key: your
sk-key - Default model:
gpt-5.5
- Click Health Check. If it succeeds, the provider is ready.
- Save and switch your tool, such as Claude Code, to this provider.
Method B: Preset Code
If you maintain CC Switch universalProviderPresets.ts, add this preset:
{
id: "stringai",
name: "String AI",
description: "String AI relay service - Base URL: https://www.string.ink/v1",
baseUrl: "https://www.string.ink/v1",
models: ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini"],
defaultModel: "gpt-5.5",
// Note: gpt-5.5 does not require a reasoningEffort parameter.
}Most tools need a terminal or CLI restart after switching providers. If Codex still uses the old configuration, close and reopen the terminal, VS Code, or Codex.
Data Storage Locations
| Data | Default location |
|---|---|
| Database | ~/.cc-switch/cc-switch.db |
| Local settings | ~/.cc-switch/settings.json |
| Automatic backups | ~/.cc-switch/backups/ |
| Skills | ~/.cc-switch/skills/ |
| Skill backups | ~/.cc-switch/skill-backups/ |
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
OpenClaw
需要 Node.js 22.19+ 或 Node.js 24(推荐)。
安装
npm install -g openclaw@latest
npx openclaw --version方式一:配置补丁(推荐)
创建配置文件 openclaw-stringai.json:
{
"agents": {
"defaults": {
"model": { "primary": "stringai/gpt-5.5" },
"models": {
"stringai/gpt-5.5": { "alias": "String AI GPT-5.5" },
"stringai/gpt-5.4": { "alias": "String AI GPT-5.4" },
"stringai/gpt-5.4-mini": { "alias": "String AI GPT-5.4 Mini" }
}
}
},
"models": {
"providers": {
"stringai": {
"baseUrl": "https://www.string.ink/v1",
"apiKey": "${STRING_AI_API_KEY}",
"api": "openai-completions",
"timeoutSeconds": 120,
"models": [
{ "id": "gpt-5.5", "name": "GPT-5.5", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4", "name": "GPT-5.4", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4-mini", "name": "GPT-5.4 Mini", "contextWindow": 128000, "maxTokens": 16384 }
]
}
}
}
}设置环境变量并应用配置:
# Windows PowerShell
$env:STRING_AI_API_KEY = "YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"# macOS / Linux / WSL
export STRING_AI_API_KEY="YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"如已有旧模型配置,需用--replace-path替换;遇到 "Refusing to replace" 错误说明需添加此参数。成功后显示:Applied 9 config update(s). Restart the gateway to apply.
验证与使用
npx openclaw config validate # Config valid: ~/.openclaw/openclaw.json
npx openclaw models status # 显示 String AI 模型列表与部分隐藏的 API Key
# 本地模式运行
npx openclaw agent --local --session-id my-session --message "你好" --model stringai/gpt-5.5
# 或启动 Gateway 后使用
npx openclaw onboard --install-daemon
npx openclaw agent --message "你好" --model stringai/gpt-5.5环境变量持久化
# Windows PowerShell(管理员)
[Environment]::SetEnvironmentVariable("STRING_AI_API_KEY", "YOUR_API_KEY", "User")# macOS / Linux
echo 'export STRING_AI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
source ~/.bashrc開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
OpenClaw
需要 Node.js 22.19+ 或 Node.js 24(推薦)。
安裝
npm install -g openclaw@latest
npx openclaw --version方式一:設定補丁(推薦)
創建設定文件 openclaw-stringai.json:
{
"agents": {
"defaults": {
"model": { "primary": "stringai/gpt-5.5" },
"models": {
"stringai/gpt-5.5": { "alias": "String AI GPT-5.5" },
"stringai/gpt-5.4": { "alias": "String AI GPT-5.4" },
"stringai/gpt-5.4-mini": { "alias": "String AI GPT-5.4 Mini" }
}
}
},
"models": {
"providers": {
"stringai": {
"baseUrl": "https://www.string.ink/v1",
"apiKey": "${STRING_AI_API_KEY}",
"api": "openai-completions",
"timeoutSeconds": 120,
"models": [
{ "id": "gpt-5.5", "name": "GPT-5.5", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4", "name": "GPT-5.4", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4-mini", "name": "GPT-5.4 Mini", "contextWindow": 128000, "maxTokens": 16384 }
]
}
}
}
}設置環境變量並應用設定:
# Windows PowerShell
$env:STRING_AI_API_KEY = "YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"# macOS / Linux / WSL
export STRING_AI_API_KEY="YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"如已有舊模型設定,需用--replace-path替換;遇到 "Refusing to replace" 錯誤說明需添加此參數。成功后顯示:Applied 9 config update(s). Restart the gateway to apply.
驗證與使用
npx openclaw config validate # Config valid: ~/.openclaw/openclaw.json
npx openclaw models status # 显示 String AI 模型列表与部分隐藏的 API Key
# 本地模式运行
npx openclaw agent --local --session-id my-session --message "你好" --model stringai/gpt-5.5
# 或启动 Gateway 后使用
npx openclaw onboard --install-daemon
npx openclaw agent --message "你好" --model stringai/gpt-5.5環境變量持久化
# Windows PowerShell(管理员)
[Environment]::SetEnvironmentVariable("STRING_AI_API_KEY", "YOUR_API_KEY", "User")# macOS / Linux
echo 'export STRING_AI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
source ~/.bashrcBefore you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
OpenClaw
Requires Node.js 22.19+ or Node.js 24, recommended.
Installation
npm install -g openclaw@latest
npx openclaw --versionOption 1: Configuration Patch (Recommended)
Create openclaw-stringai.json:
{
"agents": {
"defaults": {
"model": { "primary": "stringai/gpt-5.5" },
"models": {
"stringai/gpt-5.5": { "alias": "String AI GPT-5.5" },
"stringai/gpt-5.4": { "alias": "String AI GPT-5.4" },
"stringai/gpt-5.4-mini": { "alias": "String AI GPT-5.4 Mini" }
}
}
},
"models": {
"providers": {
"stringai": {
"baseUrl": "https://www.string.ink/v1",
"apiKey": "${STRING_AI_API_KEY}",
"api": "openai-completions",
"timeoutSeconds": 120,
"models": [
{ "id": "gpt-5.5", "name": "GPT-5.5", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4", "name": "GPT-5.4", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gpt-5.4-mini", "name": "GPT-5.4 Mini", "contextWindow": 128000, "maxTokens": 16384 }
]
}
}
}
}Set the environment variable and apply the configuration:
# Windows PowerShell
$env:STRING_AI_API_KEY = "YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"# macOS / Linux / WSL
export STRING_AI_API_KEY="YOUR_API_KEY"
npx openclaw config patch --file openclaw-stringai.json --replace-path "models.providers.stringai.models"If old model configuration already exists, use--replace-path. A "Refusing to replace" error means this parameter is required. On success you should see:Applied 9 config update(s). Restart the gateway to apply.
Verify and Use
npx openclaw config validate # Config valid: ~/.openclaw/openclaw.json
npx openclaw models status # Shows String AI models and a partially hidden API Key
# Local mode
npx openclaw agent --local --session-id my-session --message "Hello" --model stringai/gpt-5.5
# Or start the gateway first
npx openclaw onboard --install-daemon
npx openclaw agent --message "Hello" --model stringai/gpt-5.5Persist the Environment Variable
# Windows PowerShell, as administrator
[Environment]::SetEnvironmentVariable("STRING_AI_API_KEY", "YOUR_API_KEY", "User")# macOS / Linux
echo 'export STRING_AI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
source ~/.bashrc开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
Hermes Agent
安装(Windows PowerShell)
iex (irm https://hermes-agent.nousresearch.com/install.ps1)配置 String AI
安装时选择 Full setup(选项 2),然后依次设置:
| 步骤 | 选项 |
|---|---|
| Provider | 30. Custom endpoint |
| API base URL | https://www.string.ink/v1 |
| API key | 你的密钥 |
| API mode | 2. Chat Completions |
| Model | 1. gpt-5.5 |
| Display name | StringAI |
配置完成后运行 hermes 验证。
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
Hermes Agent
安裝(Windows PowerShell)
iex (irm https://hermes-agent.nousresearch.com/install.ps1)設定 String AI
安裝時選擇 Full setup(選項 2),然后依次設置:
| 步驟 | 選項 |
|---|---|
| Provider | 30. Custom endpoint |
| API base URL | https://www.string.ink/v1 |
| API key | 你的金鑰 |
| API mode | 2. Chat Completions |
| Model | 1. gpt-5.5 |
| Display name | StringAI |
設定完成后運行 hermes 驗證。
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
Hermes Agent
Installation (Windows PowerShell)
iex (irm https://hermes-agent.nousresearch.com/install.ps1)Configure String AI
During installation, choose Full setup (option 2), then set the following:
| Step | Option |
|---|---|
| Provider | 30. Custom endpoint |
| API base URL | https://www.string.ink/v1 |
| API key | Your key |
| API mode | 2. Chat Completions |
| Model | 1. gpt-5.5 |
| Display name | StringAI |
After setup, run hermes to verify.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
Cursor
Cursor 是 AI 驱动的代码编辑器。配置步骤:
- 点击左下角设置图标(齿轮),在左侧菜单点击 Models。
- 展开 API Keys 部分,在 OpenAI API Key 处填入你的 String AI API Key。
- 打开 Override OpenAI Base URL 开关(变为绿色),在下方输入框填入
https://www.string.ink/v1。
配置完成后即可在 Cursor 中使用 String AI 的模型。
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
Cursor
Cursor 是 AI 驅動的代碼編輯器。設定步驟:
- 點擊左下角設置圖標(齿輪),在左側菜單點擊 Models。
- 展開 API Keys 部分,在 OpenAI API Key 處填入你的 String AI API Key。
- 打開 Override OpenAI Base URL 開關(變為綠色),在下方輸入框填入
https://www.string.ink/v1。
設定完成后即可在 Cursor 中使用 String AI 的模型。
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
Cursor
Cursor is an AI-powered code editor. Configure it as follows:
- Click the settings icon in the bottom-left corner, then open Models from the sidebar.
- Expand API Keys and enter your String AI API Key in the OpenAI API Key field.
- Turn on Override OpenAI Base URL, then enter
https://www.string.ink/v1.
After configuration, you can use String AI models in Cursor.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
WorkBuddy
- 打开 WorkBuddy,在主页点击对话框的 [Auto] 按钮,进入「选择模型」页面,点击「自定义模型」。
- 在「添加模型」窗口中(仅支持 OpenAI 兼容协议 API),点击「提供商」下拉框,在最底部「其他」分组下选择「自定义 / Custom」。
- 按下表填写接入信息:
| 字段 | 填写内容 |
|---|---|
| 提供商 | 自定义 / Custom |
| 接口地址 | https://www.string.ink/v1 |
| API Key | 你的 String AI API Key |
| 模型名称 | 目标模型名(如 gpt-5.5) |
高级配置(可选):按所选模型能力勾选「工具调用」(function calling)、「图片输入」(多模态视觉)、「思考模式」(推理/thinking);「自定义协议」一般不勾选。输入/输出上下文长度可保持「使用提供商默认值」或按需选择。点击「保存」完成添加,返回主界面在模型选择器中即可选用。
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
WorkBuddy
- 打開 WorkBuddy,在主页點擊对話框的 [Auto] 按钮,進入「選擇模型」页面,點擊「自定義模型」。
- 在「添加模型」窗口中(僅支持 OpenAI 兼容協議 API),點擊「提供商」下拉框,在最底部「其他」分組下選擇「自定義 / Custom」。
- 按下表填寫接入信息:
| 字段 | 填寫內容 |
|---|---|
| 提供商 | 自定義 / Custom |
| 介面地址 | https://www.string.ink/v1 |
| API Key | 你的 String AI API Key |
| 模型名稱 | 目標模型名(如 gpt-5.5) |
高級設定(可選):按所選模型能力勾選「工具調用」(function calling)、「圖片輸入」(多模態視覺)、「思考模式」(推理/thinking);「自定義協議」一般不勾選。輸入/輸出上下文長度可保持「使用提供商默認值」或按需選擇。點擊「保存」完成添加,返回主界面在模型選擇器中即可選用。
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
WorkBuddy
- Open WorkBuddy. On the home page, click the [Auto] button in the chat box, open the model selection page, and click Custom Model.
- In Add Model, which supports OpenAI-compatible APIs, open the Provider dropdown and choose Custom under the Other group.
- Fill in the access information:
| Field | Value |
|---|---|
| Provider | Custom |
| API endpoint | https://www.string.ink/v1 |
| API Key | Your String AI API Key |
| Model name | Target model name, such as gpt-5.5 |
Advanced settings, optional: enable function calling, image input, and thinking / reasoning according to the selected model's capability. Custom protocol is usually not needed. Keep input and output context length on provider defaults or adjust as needed. Click Save, then choose the model in the main model selector.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
Dify
认准入口:「模型供应商」用来接入模型(本教程使用);「API 扩展」用于挂载外部 HTTP 服务做内容审查等中间件回调,不是用来接模型的,请勿在此填写 String AI 地址。
配置步骤
进入 Dify → 右上角头像 → 设置 → 模型供应商,搜索 OpenAI-API-compatible,点击「添加模型」,按下表填写:
| 字段 | 填写内容 |
|---|---|
| 模型名称 | String AI 实际暴露的模型 ID,如 gpt-5.5、claude-opus-4-8,必须与平台一致 |
| 模型类型 | LLM |
| 凭据名称 | 自定义标识,如 String AI |
| API Key | 你的 String AI API Key |
| API endpoint URL | https://www.string.ink/v1(填到 /v1,不要带 /chat/completions) |
| Completion mode | Chat |
| 模型上下文长度 | 按模型实际值,如 128000 |
| 最大 token 上限 | 如 8192 |
Vision / Function calling / Stream 按模型实际能力开关,不确定先保持默认,最后点击「添加」。
開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
Dify
認準入口:「模型供應商」用來接入模型(本教程使用);「API 擴展」用於掛載外部 HTTP 服務做內容審查等中間件回調,不是用來接模型的,請勿在此填寫 String AI 地址。
設定步驟
進入 Dify → 右上角頭像 → 設置 → 模型供應商,搜索 OpenAI-API-compatible,點擊「添加模型」,按下表填寫:
| 字段 | 填寫內容 |
|---|---|
| 模型名稱 | String AI 實際暴露的模型 ID,如 gpt-5.5、claude-opus-4-8,必須與平台一致 |
| 模型類型 | LLM |
| 凭據名稱 | 自定義標識,如 String AI |
| API Key | 你的 String AI API Key |
| API endpoint URL | https://www.string.ink/v1(填到 /v1,不要帶 /chat/completions) |
| Completion mode | Chat |
| 模型上下文長度 | 按模型實際值,如 128000 |
| 最大 token 上限 | 如 8192 |
Vision / Function calling / Stream 按模型實際能力開關,不確定先保持默認,最后點擊「添加」。
Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
Dify
Use the correct entry: Model Provider is for model access and is used in this guide. API Extension is for external HTTP middleware callbacks such as content review. It is not for model access. Do not enter the String AI address there.
Configuration Steps
Go to Dify -> avatar in the top-right corner -> Settings -> Model Provider. Search for OpenAI-API-compatible, click Add Model, and fill in:
| Field | Value |
|---|---|
| Model name | The actual String AI model ID, such as gpt-5.5 or claude-opus-4-8; it must match the platform |
| Model type | LLM |
| Credential name | Custom label, such as String AI |
| API Key | Your String AI API Key |
| API endpoint URL | https://www.string.ink/v1, ending at /v1 without /chat/completions |
| Completion mode | Chat |
| Model context length | Actual model value, such as 128000 |
| Upper bound for max tokens | For example 8192 |
Enable Vision, Function calling, and Stream based on the actual model capability. If unsure, keep defaults first, then click Add.
开始前先确认:是否已经安装 Node.js?请执行node --version和npm --version。若没有版本号,请先完成 安装 Node.js 运行环境。
One API
启动 One API
git clone https://github.com/songquanpeng/one-api.git
cd one-api
go build -o one-api
./one-api访问 http://localhost:3000,默认用户名/密码 admin / 123456。
添加渠道
进入「渠道」→「添加渠道」,选择 Proxy 类型:
| 字段 | 填写内容 |
|---|---|
| 渠道名称 | String AI |
| API Base URL | https://www.string.ink/v1 |
| API Key | 你的密钥 |
然后在「模型」管理中为 gpt-5.5、gpt-5.4、gpt-5.4-mini 创建映射。
测试
API_KEY="sk-one-api-key"
curl https://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello"}]}'開始前先確認:是否已经安裝 Node.js?請執行node --version和npm --version。若沒有版本號,請先完成 安裝 Node.js 運行環境。
One API
啟動 One API
git clone https://github.com/songquanpeng/one-api.git
cd one-api
go build -o one-api
./one-api訪問 http://localhost:3000,默認用戶名/密碼 admin / 123456。
添加渠道
進入「渠道」→「添加渠道」,選擇 Proxy 類型:
| 字段 | 填寫內容 |
|---|---|
| 渠道名稱 | String AI |
| API Base URL | https://www.string.ink/v1 |
| API Key | 你的金鑰 |
然后在「模型」管理中為 gpt-5.5、gpt-5.4、gpt-5.4-mini 創建映射。
測試
API_KEY="sk-one-api-key"
curl https://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello"}]}'Before you start: have you installed Node.js? Runnode --versionandnpm --version. If they do not print version numbers, finish Install the Node.js Runtime first.
One API
Start One API
git clone https://github.com/songquanpeng/one-api.git
cd one-api
go build -o one-api
./one-apiOpen http://localhost:3000. The default username and password are admin / 123456.
Add a Channel
Go to Channels -> Add Channel and choose Proxy:
| Field | Value |
|---|---|
| Channel name | String AI |
| API Base URL | https://www.string.ink/v1 |
| API Key | Your key |
Then create model mappings for gpt-5.5, gpt-5.4, and gpt-5.4-mini in model management.
Test
API_KEY="sk-one-api-key"
curl https://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello"}]}'故障排查速查
| 现象 | 检查点 |
|---|---|
| 请求 404 | Base URL 必须以 https://www.string.ink/v1 为准,确认是否多填或少填 /v1 |
| API Key 无效 | Key 是否带有多余空格、换行或引号;是否已过期或重置;账号是否开通 API 权限 |
| 模型不可用 | 模型名是否拼写正确;账号是否有该模型权限;模型是否临时下线 |
| 切换供应商后不生效 | 重启终端或对应 CLI;确认 CC Switch 已启用 String AI 供应商 |
| 请求超时 | 检查网络连接;记录发生时间和使用模型后联系支持 |
本指南适用于 String AI API 付费用户。如仅使用网页聊天,无需 API Key,直接通过 Webchat 使用即可。
故障排查速查
| 現象 | 檢查點 |
|---|---|
| 請求 404 | Base URL 必須以 https://www.string.ink/v1 為準,確認是否多填或少填 /v1 |
| API Key 無效 | Key 是否帶有多余空格、換行或引號;是否已過期或重置;帳號是否開通 API 權限 |
| 模型不可用 | 模型名是否拼寫正確;帳號是否有該模型權限;模型是否臨時下線 |
| 切換供應商后不生效 | 重啟終端或对應 CLI;確認 CC Switch 已啟用 String AI 供應商 |
| 請求超時 | 檢查網絡連接;記錄發生時間和使用模型后聯絡支持 |
本指南適用於 String AI API 付費用戶。如僅使用網页聊天,無需 API Key,直接通過 Webchat 使用即可。
Troubleshooting Quick Reference
| Symptom | Check |
|---|---|
| Request returns 404 | Base URL must be https://www.string.ink/v1; check whether /v1 is missing or duplicated |
| Invalid API Key | Check for extra spaces, line breaks, or quotes; check whether the key expired or was reset; confirm API access is enabled |
| Model unavailable | Check the model name spelling, account permission, and whether the model is temporarily offline |
| Provider switch does not take effect | Restart the terminal or corresponding CLI; confirm CC Switch has enabled the String AI provider |
| Request timeout | Check network connection; record the time and model, then contact support |
This guide is for paid String AI API users. If you only use web chat, you do not need an API Key. Use Webchat directly.
模型说明
String AI 提供对话、图像、转写和代码审查等不同能力模型。接入前建议先确认你的账号可用模型,再把模型 ID 填到脚本或第三方工具中。
对话模型
gpt-5.5:最新旗舰模型,推荐作为默认对话模型。gpt-5.4:上一代旗舰模型,适合稳定文本生成、问答和工具调用场景。gpt-5.4-mini:轻量快速版本,适合验证链路、低延迟脚本和成本敏感任务。
代码与自动化
codex-auto-review:代码自动审查模型,适合接入代码审查流程。
图像能力
gpt-image-1s:图像生成模型。gpt-image-1.5:图像生成模型。gpt-image-2:推荐图片生成与图片编辑模型。
语音转写
gpt-4o-transcribe:语音转文本模型,适合音频转写场景。
查询可用模型
不同账号可能拥有不同模型权限。你可以通过模型列表接口确认当前 API Key 可访问的模型:
curl https://www.string.ink/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"如果接口返回 object: "list" 和 data 数组,说明 API Key、Base URL 与网络连通性基本正常。
模型說明
String AI 提供对話、圖像、轉寫和代碼審查等不同能力模型。接入前建議先確認你的帳號可用模型,再把模型 ID 填到腳本或第三方工具中。
对話模型
gpt-5.5:最新旗舰模型,推薦作為默認对話模型。gpt-5.4:上一代旗舰模型,適合穩定文本生成、問答和工具調用場景。gpt-5.4-mini:輕量快速版本,適合驗證鏈路、低延遲腳本和成本敏感任務。
代碼與自動化
codex-auto-review:代碼自動審查模型,適合接入代碼審查流程。
圖像能力
gpt-image-1s:圖像生成模型。gpt-image-1.5:圖像生成模型。gpt-image-2:推薦圖片生成與圖片編輯模型。
語音轉寫
gpt-4o-transcribe:語音轉文本模型,適合音訊轉寫場景。
查詢可用模型
不同帳號可能擁有不同模型權限。你可以通過模型列表介面確認當前 API Key 可訪問的模型:
curl https://www.string.ink/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"如果介面返回 object: "list" 和 data 數組,說明 API Key、Base URL 與網絡連通性基本正常。
Model Overview
String AI provides models for conversation, image generation, transcription, code review, and automation. Before integrating, confirm which models your account can access, then use the model ID in scripts or third-party tools.
Conversation Models
gpt-5.5: The latest flagship model, recommended as the default conversation model.gpt-5.4: Previous-generation flagship model for stable text generation, Q&A, and tool-calling workflows.gpt-5.4-mini: Lightweight and fast model for link testing, low-latency scripts, and cost-sensitive tasks.
Coding and Automation
codex-auto-review: Automated code review model for code review workflows.
Image Capabilities
gpt-image-1s: Image generation model.gpt-image-1.5: Image generation model.gpt-image-2: Recommended model for image generation and image editing.
Speech Transcription
gpt-4o-transcribe: Speech-to-text model for audio transcription scenarios.
Query Available Models
Different accounts may have different model permissions. Use the model list endpoint to confirm which models your API Key can access:
curl https://www.string.ink/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"If the API returns object: "list" and a data array, your API Key, Base URL, and network connection are basically working.
文本与视觉
用一个接口完成文本生成、图片理解和实时输出。适合聊天助手、网页问答、自动化脚本,以及需要边生成边展示内容的 Coding 工具。
/v1/responses 鉴权
使用以下格式进行身份验证: Bearer <STRING_AI_API_KEY>
请求体
application/json 模型 ID。建议先用 gpt-5.4-mini 验证链路,再按业务需要切换到其他可用模型。
设为 true 后返回流式事件;请求头建议带上 Accept: text/event-stream。
用户要发送给模型的内容。文本场景可以直接传字符串,例如:用中文简单介绍一下 String AI。
响应
流式响应会按 SSE 返回多个事件。前端展示文本时读取 `response.output_text.delta` 的 `delta`;收到 `response.completed` 后,可从 `response.output[0].content[0].text` 读取完整文本,并从 `usage` 查看 token 消耗。
对话补全
兼容传统 OpenAI Chat Completions 格式,适合已有客户端、聊天工具或旧代码平滑迁移。如果你的工具只支持 Chat Completions,可以优先使用这个接口。
/v1/chat/completions 鉴权
使用以下格式进行身份验证: Bearer <STRING_AI_API_KEY>
请求体
application/json 要调用的模型 ID。建议先用 gpt-5.4-mini 验证链路,再按业务需要切换到其他可用模型。
设为 true 后通过 Server-Sent Events 读取增量输出,适合聊天界面或命令行实时打印。
对话消息数组。最简单的用法是传入一条 user 消息。
响应
流式模式下每个 chunk 的 `object` 为 `chat.completion.chunk`。从 `choices[].delta.content` 读取增量文本;最后一个统计 chunk 通常带有 `usage`,随后返回 `[DONE]`。
图片生成
根据提示词生成图片,并返回可保存的图片数据。适合批量出图、创意草图、素材生成等场景。建议先用 gpt-image-2 验证效果。
/v1/images/generations 鉴权
使用以下格式进行身份验证: Bearer <STRING_AI_API_KEY>
请求体
application/json 图片模型 ID,例如 gpt-image-2。
图片生成提示词,例如:生成一只太空猫。
生成图片数量。建议先从 1 开始,便于控制耗时和成本。
生成尺寸,例如 1024x1024。
设为 true 时可监听 image_generation.partial_image 和 image_generation.completed。
使用 b64_json 时,接口会返回 base64 图片数据,可直接写入本地图片文件。
响应
图片生成会返回 `image_generation.partial_image` 和 `image_generation.completed` 两类事件。最终图片在完成事件的 `b64_json` 字段中,`output_format` 通常为 `png`,`usage` 会返回本次生成的 token 消耗。
图片编辑
上传一张原图,并用自然语言描述要如何修改。接口使用 multipart/form-data,适合做换色、局部调整、风格处理等图片编辑任务。
/v1/images/edits 鉴权
使用以下格式进行身份验证: Bearer <STRING_AI_API_KEY>
请求体
multipart/form-data 要编辑的原图文件。
编辑指令,例如:把图片整体颜色更改为蓝色。
图片模型 ID,例如 gpt-image-2。
生成图片数量。建议先从 1 开始,便于控制耗时和成本。
图片质量设置。传 auto 时由模型根据请求自动选择。
输出尺寸,例如 1024x1024。
设为 true 后返回流式事件;请求头建议带上 Accept: text/event-stream。
使用 b64_json 时,接口会返回 base64 图片数据,可直接写入本地图片文件。
响应
图片编辑会返回 `image_edit.partial_image` 和 `image_edit.completed` 两类事件。最终图片在完成事件的 `b64_json` 字段中;如果上传图片无效,接口会返回 `invalid_request_error`,请检查文件格式和图片内容。
模型列表
查询当前密钥可访问的模型列表。接入第三方工具前,可以先用这个接口确认 API Key、Base URL 和网络连通性。
/v1/models 鉴权
使用以下格式进行身份验证: Bearer <STRING_AI_API_KEY>
响应
返回对象的 `object` 为 `list`,模型数组位于 `data`。每个模型包含 `id`、`object`、`owned_by`、`type` 和 `display_name`。若请求成功,说明 API Key、Base URL 和网络连通性基本正常。
第三方工具配置
所有工具的核心三要素相同:Base URL、API Key、模型名。优先选择 OpenAI Compatible 或 Custom Provider。
常见问题排查
大多数接入问题来自 API Key、Base URL、模型名、余额或工具缓存。按下面顺序排查即可。
检查是否从 String AI 后台复制、是否带有多余空格或换行、是否已删除或过期、账号是否已开通 API 权限。
必须填写 https://www.string.ink/v1。不要漏掉 /v1,也不要在 Base URL 中追加 /chat/completions。
确认模型名拼写和账号权限。对话工具里建议先测试 gpt-5.5、gpt-5.4、gpt-5.4-mini。
关闭并重新打开终端、VS Code、Codex 或对应 CLI。部分工具会缓存旧 provider 设置。