Use with coding agents
Connect Cursor, Codex, Cline, OpenCode, Claude Code and other coding agents to the Ertas AI Gateway with a setup prompt they can follow.
On this page
Most coding agents can use a custom OpenAI-compatible provider: a base URL, an API key and a model name. Give the agent the gateway's details and let it change its own configuration.
| Setting | Value |
|---|---|
| Base URL | https://gateway.ertas.ai/v1 |
| API key | ERTAS_API_KEY from your environment |
| Model | ertas-ai/medertas-27b or ertas-ai/medertas-31b |
Setup prompt
Paste this into the agent you want to connect, replacing the agent name.
Help me connect <agent name> to my Ertas AI Gateway.
Check the custom-provider settings for my installed version first, and the API format it needs.
Base URL: https://gateway.ertas.ai/v1
API key: use ERTAS_API_KEY from my local environment. If it is missing, ask me to set it privately.
Model: ertas-ai/medertas-27b
The gateway speaks OpenAI Chat Completions, and the Responses API for stateless calls (no previous_response_id yet). Keep secrets out of chat, logs and committed files. Show the proposed changes, preserve my existing configuration, and ask before sending a paid test request. Don't claim success until the connection actually works.
Notes by agent
| Agent | What to check |
|---|---|
| Cursor | Which features accept a custom API key and base URL before you change settings |
| Cline | Choose the OpenAI-compatible provider and set the base URL, key and model |
| OpenCode | Add a custom provider in the schema for your installed version |
| Codex | Add a custom model provider with base_url, env_key = "ERTAS_API_KEY" and wire_api = "responses". The gateway doesn't store responses yet, so keep response storage off |
| Claude Code | Claude Code uses the Anthropic Messages format, which the gateway doesn't serve. It needs a translating proxy in front of the gateway |
| VS Code | Settings depend on the AI extension you use |
| Others | Start from the agent's custom-provider instructions and check which API format it sends |
Medical models are trained for medical tasks, not for writing code. Connect an agent to MedErtas when the agent's job is medical, for example a pipeline that summarises records.