Documentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Overview
OpenCode is an open-source AI coding assistant with first-class support for 75+ models and self-hosted deployments. Through GravitexAI, you can use mainstream models (GPT, Claude, Gemini, Qwen…) inside OpenCode without configuring every vendor separately.Unified multi-model
One provider, full GPT / Claude / Gemini / Qwen family
Self-host friendly
Supports your own backends and per-project config overrides
Responses API ready
apiCompatibility: "responses" works with the GPT Codex seriesOpen & auditable
Fully open-source, customize as needed
2. Quick Setup (GravitexAI)
2.1 Get an API key
Sign in
Go to the GravitexAI console and register or log in.
Create a token
Open API Keys, click “Create new token”, and copy the
sk-xxxxxxxxxx key.2.2 Configure a custom provider in OpenCode
Open provider settings
In OpenCode, go to Server / Provider settings and select Add custom provider (OpenAI-compatible).
Fill in provider info
| Field | Value |
|---|---|
| Provider ID | gravitex (lowercase, digits, hyphens or underscores) |
| Display name | GravitexAI |
| Base URL | https://api.gravitex.ai/v1 (must end with /v1) |
| API key | Paste your GravitexAI key from the previous step |
Add models
Under Models, add model IDs you want to use (e.g.
gpt-5.5, claude-sonnet-4-6, gemini-3.5-flash). IDs must match the GravitexAI model list.


2.3 Switching models
In chat or settings, pick the configured provider/model (e.g.gravitex/gpt-5.5) to switch.

3. Some Models Require the Responses API (Important)
Some Azure / OpenAI models only support the Responses API, not the legacy Chat Completions endpoint. When OpenCode defaults to Chat Completions you’ll see:The chatCompletion operation does not work with the specified model, gpt-5.1-codex. Please choose different model and try again.The screenshot below shows how this error appears in OpenCode:

3.1 Models that require Responses API
| Model ID / family | Notes |
|---|---|
| gpt-5.1-codex | GPT 5.1 Codex (code-focused) — Responses API only |
| gpt-5.2-codex | Same as above |
| computer-use-preview | Experimental model used with the Responses API computer-use tools |
3.2 How to configure in OpenCode
Add theapiCompatibility parameter to a model in your config — no code changes needed.
Locate the config file
- Windows:
C:\Users\<username>\.config\opencode\opencode.jsonc - macOS / Linux:
~/.config/opencode/opencode.jsonc

Add the parameter
In your existing custom provider (pointing at GravitexAI or your own API), add 
After saving, selecting that provider’s
"apiCompatibility": "responses" for models that need it (e.g. gpt-5.1-codex):
gpt-5.1-codex (e.g. backup_v1/gpt-5.1-codex) will send requests to that baseURL using the Responses API format.3.3 Summary
| Scenario | What to do |
|---|---|
| Models that only support Responses (e.g. gpt-5.1-codex, gpt-5.2-codex) | Add "apiCompatibility": "responses" to that model under your custom provider’s models in opencode.jsonc |
| Regular models (e.g. gpt-5.5, claude-sonnet-4-6, gemini-3.5-flash) | No apiCompatibility needed — follow Quick Setup |
4. Recommended Models (via GravitexAI)
| Category | Model ID examples | Notes |
|---|---|---|
| Flagship coding | gpt-5.5, claude-opus-4-7 | Best overall coding ability |
| Codex series | gpt-5.1-codex | Requires Responses API (see Section 3) |
| General chat + code | gpt-5.4, claude-sonnet-4-6, claude-sonnet-4-5-20250929 | Works out of the box |
| Fast / low latency | gemini-3.5-flash, claude-haiku-4-5-20251001 | Great for completions & tool use |
| Cost-effective | gpt-5.4-mini, gemini-3.1-flash-lite-preview, qwen3-coder-plus | High concurrency / batch |
Success example
A normal chat in OpenCode using GravitexAI:
5. FAQ
`The chatCompletion operation does not work…` error
`The chatCompletion operation does not work…` error
That model only supports the Responses API. Add
"apiCompatibility": "responses" to it in opencode.jsonc — see Section 3.401 / invalid API key
401 / invalid API key
- Check the key for completeness and trailing whitespace.
- Confirm it isn’t deleted/disabled in the GravitexAI console.
- Ensure your balance is positive.
404 / endpoint not found
404 / endpoint not found
Make sure the Base URL ends with
/v1: https://api.gravitex.ai/v1.`model not found` for a valid-looking ID
`model not found` for a valid-looking ID
Model IDs must exactly match the GravitexAI list. Watch the case and version suffix (e.g.
claude-sonnet-4-5-20250929, not claude-sonnet-4-5).How to standardize across a team?
How to standardize across a team?
Commit
opencode.jsonc to .config/opencode/ in the repo (or the project root). Each engineer brings their own API key.6. References
- OpenCode site and download: https://opencode.ai/
- OpenCode config and models: Models, Providers
- GravitexAI console: https://maas.gravitex.ai
- Model catalog: https://maas.gravitex.ai/#/models