OpenAI-compatible clients
Connect OpenAI-compatible clients and coding agents through the meinGPT API
meinGPT exposes an OpenAI-compatible API. You can run OpenAI-compatible clients and coding agents against your meinGPT models. This page shows the setup using OpenCode and Pi as examples; other clients are configured the same way.
Prerequisites
- A personal API key: in your meinGPT settings, open "meinGPT API" and create a key.
- The client of your choice, installed locally (e.g. OpenCode or Pi).
- The API base URL:
https://app.meingpt.com/api/openai/v1
Configure the client
In both cases you register meinGPT as a custom provider: base URL, API key, and the models you want to use – for a coding agent, one is usually enough. Valid model IDs are the models enabled for your organization; you can find them via the /models endpoint or the model overview in meinGPT.
Create an opencode.json in your project:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"meingpt": {
"npm": "@ai-sdk/openai-compatible",
"name": "meinGPT",
"options": {
"baseURL": "https://app.meingpt.com/api/openai/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"claude-sonnet-4-6": {
"name": "Claude Sonnet 4.6",
"limit": { "context": 200000, "output": 64000 }
}
}
}
}
}Then start OpenCode with the model:
opencode -m meingpt/claude-sonnet-4-6The limit field tells OpenCode the model's context window (context) and maximum output length (output), which lets it show context utilization. Without these values the utilization indicator stays at 0%. You can find the right values per model in the model overview in meinGPT.
Add more models under models.
Note
Not every model supports the function calls (tool calls) a coding agent uses. Search models such as Perplexity Sonar reject those requests with an error – use a model like Claude, GPT, or Gemini instead. Reasoning-tier models use a fixed internal temperature and may reject other values; omit temperature in that case.
VS Code extensions: Continue.dev and Cline
VS Code extensions like Continue.dev and Cline can also be connected via the OpenAI-compatible API.
Continue.dev
Create the file .continue/config.yaml in your project:
models:
- name: meinGPT
provider: openai
apiBase: https://app.meingpt.com/api/openai/v1
apiKey: ${MEINGPT_API_KEY}Cline can be configured similarly via its OpenAI-compatible provider settings, using the same base URL and API key.
Double-check the exact schema against Continue.dev's own current docs before publishing, since it can change independently of meinGPT.
Optional: pull in every model (OpenCode)
OpenCode reads available models from the /models endpoint, but for custom providers it only shows models it recognizes itself. If you want every enabled model in the picker without adding them one by one, you can generate the models block from the API once (it needs curl and python3) and re-run it when needed. The /models endpoint does not return context windows, so for models generated this way the utilization indicator stays at 0% until you add limit by hand:
KEY="YOUR_API_KEY"
curl -s -H "Authorization: Bearer $KEY" \
https://app.meingpt.com/api/openai/v1/models \
| KEY="$KEY" python3 -c '
import sys, json, os
data = json.load(sys.stdin)["data"]
models = {m["id"]: {"name": m["id"]} for m in data if m["id"] != "text-embedding-3-large"}
print(json.dumps({
"$schema": "https://opencode.ai/config.json",
"provider": {"meingpt": {
"npm": "@ai-sdk/openai-compatible",
"name": "meinGPT",
"options": {"baseURL": "https://app.meingpt.com/api/openai/v1", "apiKey": os.environ["KEY"]},
"models": models,
}}
}, indent=2))
' > opencode.jsonFor Pi, add the models you want to the extension's models array.