The bottom line first: OpenAI released GPT-6.1 Terra on October 26, 2026 (early on October 27 Beijing time). Its API model name is gpt-6.1-terra, and you can also pick it in ChatGPT Work and Codex. To use it in Codex, just open your global ~/.codex/config.toml and change model to gpt-6.1-terra; to call the API directly, put "model": "gpt-6.1-terra" in the request body.
We tested it against this site's API: with Codex 0.164.0 connected to gpt-6.1-terra, we had it fix a bug in a function, write a test and run it — about 18 seconds from start to finish, and the test passed. Reasoning effort low / medium / high / xhigh all returned normally; setting ultra returns a 400.
Create an API Key and start using gpt-6.1-terra →
What GPT-6.1 Terra is and how it differs from Sol
According to OpenAI's announcement on X, GPT-6.1 Terra focuses on faster computer use: it can understand what is on screen and act across apps, which suits high-volume everyday workflows. The key points OpenAI gave:
- A clear improvement over GPT-5.6 Terra;
- On Agents' Last Exam (a benchmark of how well agents use professional software), it performs on par with GPT-6 Astra, and on average completes tasks more than 3 times faster than Astra and GPT-6.1 Sol;
- In ChatGPT Work and Codex, usage limits last longer with Terra than with GPT-5.6.
All of the above are figures published by OpenAI itself. Sources: OpenAI announcement, usage limits note, benchmark note, API launch note.
How to choose, in short:
| Scenario | Recommendation |
|---|---|
| Fixing small bugs, writing tests, repetitive scripted tasks in bulk | Start with gpt-6.1-terra; it is fast |
| Agent tasks that read screenshots or operate software interfaces | gpt-6.1-terra; this is what it is built for |
| Large refactors, complex architecture design, hard-to-track-down problems | gpt-6.1-sol or Claude Opus 5.5 are still recommended |
For choosing between those two models, see GPT-6.1 Sol vs Claude Opus 5.5: which to choose.
Don't switch straight away for hard problems; try it on small tasks first, then decide which one to use day to day.
Step 1: Create an API Key
- Open AI Code With, sign up and log in;
- Go to the API Key page in the console and create a new Key;
- Copy the full Key starting with
sk-; you will need it for both methods below.
For model details, see this site's GPT-6.1 Terra model page.
Using GPT-6.1 Terra in Codex
Write the global config.toml
Open ~/.codex/config.toml (on Windows, %USERPROFILE%\.codex\config.toml), add the block below, and replace sk-你的Key with your own Key:
model_provider = "aicodewith"
model = "gpt-6.1-terra"
model_reasoning_effort = "medium"
[model_providers.aicodewith]
name = "aicodewith"
base_url = "https://api.aicodewith.ai/chatgpt/v1"
wire_api = "responses"
experimental_bearer_token = "sk-你的Key"
Two things to note:
- The Key and Provider can only go in the global config.toml; Codex ignores them in a project's
.codex/config.toml; - If you have already set up gpt-6.1-sol, only change the
modelline; leave everything else as is.
For what each field means and which directory it goes in, see Codex config.toml explained and How to configure a Codex API Key.
Switch once temporarily without editing files
If you just want to try it without changing your config, add a flag at launch:
codex --model gpt-6.1-terra
Tested: fix a bug + write tests, about 18 seconds
We prepared a calc.py with a one-line bug (the add function was written as a - b) and ran Codex 0.164.0 in non-interactive mode:
codex exec -s workspace-write "calc.py 里的 add 函数有 bug,修好它,再写一个 test_calc.py 用 assert 测 add(2,3)==5 并用 python3 运行它"
The startup output shows the model really did switch:
model: gpt-6.1-terra
provider: aicodewith
reasoning effort: medium
Result: Codex changed a - b to a + b, created test_calc.py, ran python3 test_calc.py itself and it passed, about 18 seconds from start to exit. This is only a tiny task, used to confirm the path works and is fast; for larger tasks, test on your own project.
For everyday Codex usage (slash commands, interrupting mid-task to correct course), see How to use Codex.
Calling gpt-6.1-terra directly via the API
This site is compatible with the OpenAI Responses API, at https://api.aicodewith.ai/chatgpt/v1/responses:
curl https://api.aicodewith.ai/chatgpt/v1/responses \
-H "Authorization: Bearer sk-你的Key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-terra",
"input": "reply with the word ok",
"reasoning": {"effort": "medium"}
}'
In our test it returned HTTP 200, the model field was gpt-6.1-terra, status was completed, the output was ok, and the whole request took about 1.9 seconds.
Which reasoning effort values you can use
We tried each value of reasoning.effort with the same simple question:
| Value | Result |
|---|---|
| low | 200, returned normally |
| medium | 200, returned normally |
| high | 200, returned normally |
| xhigh | 200, returned normally |
| ultra | 400 error |
With ultra, the API returns:
Invalid value: 'ultra'. Supported values are: 'none', 'minimal', 'low', 'medium', 'high', 'xhigh', and 'max'.
Some people on X mention "Terra Ultra"; that is the name used in the interface. When writing it into the API or into model_reasoning_effort in config.toml, you cannot use ultra; pick one of the values listed in the error above. For everyday coding, start from medium and raise it for hard problems.
What to do about common errors
Model gpt-6.1-terra does not exist or is not live yet (400)
Before launch, our calls received this:
模型 gpt-6.1-terra 不存在或未上线
It now works normally on this site. If you still see it, check:
- Whether the model name was written as
gpt-6.1 terra,gpt6.1-terra,GPT-6.1-Terraand so on; the correct spelling is all lowercasegpt-6.1-terra; - Whether you are using another service's address or Key;
base_urlshould behttps://api.aicodewith.ai/chatgpt/v1.
Invalid value: 'ultra' (400)
The reasoning effort is wrong; change it to high or xhigh from the values in the previous section.
401 / 429
A wrong or missing Key returns 401; see How to fix Codex 401 Unauthorized; sending requests too often returns 429; see What to do about Codex 429 Too Many Requests.
FAQ
Can GPT-6.1 Terra be used in Claude Code?
Claude Code connects to Anthropic's Claude models by default. To use Terra, going through Codex or calling the API directly is simpler; to use this site's Claude models in Claude Code, see Claude Code third-party API setup.
Do I need to configure both Terra and Sol?
No need for two setups. Under the same Provider, just change model; use Terra normally, and for hard problems switch temporarily with codex --model gpt-6.1-sol.
What if I haven't installed Codex yet?
First follow the Codex installation guide to install the Codex CLI, then come back here to write config.toml. For an overview of connecting from mainland China, see the Codex relay page.



