How to Integrate Cline with API Gateways: VS Code Coding Agent Configuration

A tutorial on integrating the VS Code open-source coding agent Cline: how to create an sk- key, configure the API Provider and Base URL, and connect to Claude, GPT, or Gemini models.

1. What is Cline?

Cline is a popular open-source AI coding agent for VS Code. It can read your codebase, modify files, and run terminal commands, with native support for various providers like Anthropic, OpenAI, and Google (Gemini). By pointing its API Provider to our gateway and entering your sk- key, you can call Claude, GPT, or Gemini models using your platform balance, billed by token usage.

2. Preparation

  1. Log in to the AzzTimes console, and create an sk-xxxxxx key under "API Keys" (it will only be displayed once, so please save it).
  2. Identify the model slug you wish to use (e.g., claude-sonnet-5, gpt-5.4, gemini-3.7-flash).
  3. Verify the gateway URL: https://www.relay-api.com.

3. Configuring Cline

Open Cline → Gear Icon (Settings) → API Provider, and select based on the model type:

① Anthropic (for Claude)

Base URL : https://www.relay-api.com
API Key  : sk-your-key
Model ID : claude-sonnet-5

② OpenAI Compatible (for GPT)

Base URL : https://www.relay-api.com/v1
API Key  : sk-your-key
Model ID : gpt-5.4

③ For Gemini: Select the Google Gemini (or OpenAI-compatible) provider, set the Base URL to https://www.relay-api.com/v1beta, and set the Model ID to gemini-3.7-flash (model routing is handled via the URL).

Once filled, click Connect / Continue to verify. Use the Base URLs listed in the table below.

4. API Endpoint Reference

Model GroupBase URLProtocol
Claude / Anthropichttps://www.relay-api.comAnthropic Messages
GPT / OpenAIhttps://www.relay-api.com/v1OpenAI Chat Completions
Geminihttps://www.relay-api.com/v1betaGoogle generateContent

5. Troubleshooting

IssueResolution
401 / 403Invalid key, disabled, or insufficient balance; verify the sk- key and add credit.
404 / Model UnavailableModel name does not match the platform slug, or the model is disabled; check the Model ID.
Unknown modelModel ID must be exact (case-sensitive); verify via the model catalog.

Security Recommendation: Do not hardcode your keys in public repositories; use .env files or environment variables instead. Create separate keys for each tool to facilitate usage tracking and set limits.