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-6

The 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 (context window and maximum output) in the tables of the model overview. The context window is also returned by GET /models/v1 in the contextWindow field.

Add more models under models.

Note

Not every model supports the function calls (tool calls) a coding agent uses. Choose a model such as Claude, GPT, or Gemini that supports tools. Reasoning-tier models use a fixed internal temperature and may reject other values; omit temperature in that case.

Besides model choice, there is a second, independent limitation coding agents commonly run into:

Attention

Coding agents commonly send images (e.g. screenshots) as image_url content blocks. The MeinGPT chat completions endpoint does not accept these - message content must be plain text, so a request containing an image fails with 400. This applies to any client using this integration, since coding agents talk to the endpoint documented in Chat Completions. There is no drop-in fix: sending files or images requires switching to the Assistants Run or Workflow execution API instead, which use a different (multipart/form-data) request format that most OpenAI-compatible coding-agent clients do not support natively.

VS Code extensions: Continue.dev and Cline

VS Code extensions like Continue.dev and Cline can also be connected via the OpenAI-compatible API.

Note

Coding agents like Cline and Continue.dev resend the full conversation history and all tool definitions with every turn, so they can consume a large token budget quickly. If you hit 429 errors, see Rate Limits - the limit is checked per user, per organization, and per model.

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 OpenAI-compatible /models endpoint does not return context windows (only GET /models/v1 returns the contextWindow field), 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.json

For Pi, add the models you want to the extension's models array.

Error message "Quota exceeded" or similar

If your client shows a message like "Quota exceeded", MeinGPT rejected the request. What matters is the HTTP status code, which your client often does not display (you can see it in the client's logs or with curl):

  • 402 – The workspace's credit balance is used up or negative and its API usage is billed from credits (not with pay-as-you-go billing or API usage included in the plan). This affects all members and all models, including free ones. A workspace admin has to top up credits (see Manage billing); members cannot do this themselves.
  • 403 – Your personal API budget (usage tier) is used up or set to €0.00, or the model is not enabled for your organization. An admin can assign you a usage tier with an API budget under Settings → Members (see Usage limits).
  • 429 – Too many tokens per minute, see Rate Limits.
Was this page helpful?