Integration guide
Use GreenPT in OpenCode
OpenCode is a terminal-native coding agent that supports 75+ providers, including GreenPT. Add a provider block with the GreenPT base URL and your API key to opencode.json, set greenpt/glm-5.2 as the model, and every session runs on renewable EU infrastructure.
This is the setup GreenPT documents officially; the config below extends it with the glm-5.2 flagship.
Setup
Connect OpenCode to GreenPT
Every OpenAI-compatible setup needs the same three values. The steps below show where they go in this tool.
- Base URL
https://api.greenpt.ai/v1- API key
GREENPT_API_KEY- Model
glm-5.2
-
Install OpenCode and set your key
Install the CLI globally, then export the API key you created at account.greenpt.ai (14-day free trial, no credit card).
Terminal npm install -g opencode-ai export GREENPT_API_KEY=your_key_here -
Add GreenPT to opencode.json
Create the config globally at ~/.config/opencode/opencode.json or per project as opencode.json. The provider uses the @ai-sdk/openai-compatible adapter.
~/.config/opencode/opencode.json { "$schema": "https://opencode.ai/config.json", "provider": { "greenpt": { "npm": "@ai-sdk/openai-compatible", "name": "GreenPT", "options": { "baseURL": "https://api.greenpt.ai/v1", "apiKey": "{env:GREENPT_API_KEY}" }, "models": { "glm-5.2": { "name": "GLM 5.2" }, "qwen3-coder-30b-a3b-instruct": { "name": "Qwen3 Coder 30B" } } } }, "model": "greenpt/glm-5.2" } -
Launch and pick a model
Start opencode in a project. The configured GreenPT models appear under /models; switch between glm-5.2 and Qwen3 Coder per task.
Pick a model
Five open coding models, one key
glm-5.2 is the flagship for agentic software engineering. kimi-k2.7-code handles very large repositories, devstral-2-123b-instruct-2512 is built for SWE agents, qwen3-coder-30b-a3b-instruct is the efficiency pick, and minimax-m2.5 the budget one. All open-weight, all hosted in the EU.
Compare all coding modelsWhy GreenPT
Why teams point OpenCode at GreenPT
Same agent, same workflow, different footprint. GreenPT serves open-weight coding models from green EU data centres, with privacy guarantees that proprietary defaults do not offer.
-
No training on your code
Prompts and code are never used for training. GDPR-compliant, EU-based processing with DPAs on request.
-
Open-weight models
glm-5.2, Kimi K2.7 Code, Devstral 2, Qwen3 Coder, and MiniMax M2.5. You know exactly what you run.
-
Renewable EU infrastructure
Scaleway green data centres, 100% renewable energy, PUE 1.25 and WUE 0.25, with CO2 tracked per request.
-
One key for everything
The same GREENPT_API_KEY also serves chat, embeddings, reranking, OCR, speech-to-text, and web search.
Frequently asked questions
Which GreenPT model should I use in OpenCode?
glm-5.2 for agentic, multi-file work and qwen3-coder-30b-a3b-instruct when you want the lightest footprint: only 3.3B of its 30.5B parameters are active per request. Add any other GreenPT coding model to the models block the same way.
Compare the coding models →Global or per-project configuration?
Both work. ~/.config/opencode/opencode.json applies everywhere; an opencode.json in the repo root overrides it per project, which is useful for pinning a model per codebase or sharing the setup with your team.
Does GreenPT train on my code?
No. GreenPT never trains models on your prompts, code, or conversations. Processing happens entirely inside the EU with full GDPR compliance, and data processing agreements are available on request.
How is this more sustainable than the default setup?
GreenPT models run in Scaleway green EU data centres on 100% renewable energy, with a PUE of 1.25 and a WUE of 0.25, well below industry averages. CO2 and energy usage are tracked per request, so you can report the footprint of your coding agent instead of guessing it.
What does it cost?
You pay per token through GreenPT API credits, and every new account starts with a 14-day free trial, no credit card required. Open-weight models are markedly cheaper to run than proprietary frontier models, and you can cut spend further with the Honey agent skill.
View pricing →Start coding greener
Your agent, our models, less carbon .
Start a free 14-day trial, no credit card. Point OpenCode at one OpenAI-compatible endpoint and run glm-5.2 and friends on 100% renewable energy.
- 100% Renewable
- EU Hosted
- OpenAI-compatible