Integrate the Martian Code Router With Cline

This document describes how to set up Cline to route all your LLM requests through Martian.

Ensure you have your Martian API key before continuing.

Prerequisites

Ensure you have Cline installed. See cline.bot for installation instructions.

Setup Steps

Step 1: Open Cline Extension

Click on the Cline extension in your code editor. See the following screenshots to find the extension in different code editors:

VS Code: Left nav bar

Cline in VS Code

Windsurf: Left nav bar

Cline in Windsurf

Cursor: Drop down in the left bar

Cline in Cursor

Step 2: Configure API Key

  1. Click Use my own API Key.
  2. Click the settings (sprocket) icon.

Step 3: Configure Provider

Choose your preferred provider configuration:

OpenAI Configuration

Configure the following fields:

  • API Provider: Select OpenAI Compatible.
  • Base URL: Set to https://api.withmartian.com/v1.
  • OpenAI Compatible API Key: Enter your Martian API key.
  • Model ID: Specify the model to use by concatenating vendor/model_name (e.g. openai/gpt-3.5-turbo-instruct).

See Available Models for a list of supported models.

Cline Settings for OpenAI

Anthropic Configuration

Configure the following fields:

  • API Provider: Select Anthropic.
  • Anthropic API Key: Enter your Martian API key.
  • Use custom base URL: Set to enabled and enter https://api.withmartian.com/v1 in the URL field that appears.
  • Model: Specify the name of the model to use (e.g. claude-sonnet-4-2-20250514).

See Available Models for a list of supported models.

Cline Settings for Anthropic

Step 4: Save and Start

  1. Click Done to save the changes.
  2. You can now use Martian to route commands as your AI assistant, using the Cline extension for your code editor.

Next Steps

View Available Models

Browse 200+ AI models from leading providers with real-time pricing.

Read more

View Other Integrations

Explore other ways to integrate Martian with your development workflow.

Read more