For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cline Integration with The Grid | OpenAI API Setup

Connect Cline to The Grid with the OpenAI-compatible API. Set the base URL, add your consumption key, choose an instrument, and start coding.

Cline treats The Grid as an ordinary OpenAI-compatible provider. No plugin, no proxy. Three fields in the settings panel and the agent runs on market-priced inference.

Prerequisites

  • Cline installed in VS Code from the VS Code Marketplace. Cursor users can install the same extension from Cursor's extension panel.

  • A Grid account at app.thegrid.ai.

  • Credits in your account. The Grid is prepaid; zero credits returns 402.

  • A Grid consumption API key from Settings → API Keys → Create Consumption Key. Trading keys are rejected by the inference API.

Setup

1. Open the Cline settings panel

In VS Code or Cursor, click the gear icon in the Cline sidebar. Under API Configuration, open the API Provider dropdown and select OpenAI Compatible.

2. Fill in the three fields

Field
Value

Base URL

https://api.thegrid.ai/v1

OpenAI Compatible API Key

your Grid consumption key

Model ID

an instrument name, e.g. agent-prime

The Model ID field is free text. Type the instrument name exactly as published in the current instruments list. A typo surfaces as 404 on the first message.

3. Pick an instrument for your workload

Cline runs an agent loop (file reads, edits, terminal, MCP tools), which rewards Agent and Code instruments. Start with agent-prime for general work, code-prime if you mostly write code, and reach for the Max tier on Plan mode or genuinely hard tasks. Full tier guidance lives in the current instruments list.

4. (Optional) Split Plan and Act

Enable Use different models for Plan and Act modes in Cline settings to route Plan mode to a stronger instrument. A common pattern: agent-max for Plan, agent-prime for Act.

5. (Optional) Tune reasoning effort

If the Reasoning Effort selector appears for your chosen instrument, medium is a good default for agent loops. Raise to high for hard reasoning, drop to low for cheap high-volume execution.

Verification

Open a new Cline task and ask it to do something concrete: "Create a health check endpoint in Express at /health and add a test." If Cline reads the workspace, writes the file, and finishes without 401 or 402, the integration is live.

Troubleshooting

Plan/Act settings drifting between modes. Older Cline versions had a sync bug on the OpenAI Compatible provider. Update Cline to the latest Marketplace release.

Cost tracker shows $0. Expected. The Grid uses market-based pricing that varies per fill, and Cline's cost tracker reads only the static price fields in Model Configuration. Track real spend in your Grid dashboard.

Last updated

Was this helpful?