Skip to main content
ModelsLab’s LLM API is compatible with popular AI coding tools. Since it supports both OpenAI and Anthropic API formats, you can use it as a drop-in backend for most AI coding assistants. Choose any model ID available on the ModelsLab LLM catalog or through the List Models endpoint. In the examples below, replace YOUR_MODEL_ID with the model you want to use.

Choose your coding agent

claude-code-card

Claude Code

Use ModelsLab as Claude Code’s Anthropic-compatible provider.
hermes-agent-card

Hermes Agent

Configure ModelsLab as a custom OpenAI-compatible model provider.
pi-card

Pi

Add ModelsLab models through Pi’s custom provider configuration.

Claude Code

Claude Code is Anthropic’s agentic CLI coding tool. You can point it at ModelsLab’s API to use any of 200+ LLM models.

Quick Start

Run any supported model through Claude Code using ModelsLab as the API provider. ANTHROPIC_AUTH_TOKEN is preferred for interactive sessions. Use --model or /model to switch model IDs.

Persistent Configuration

Add to your shell profile (~/.bashrc, ~/.zshrc, etc.):
Then run Claude Code with any model:

Non-Interactive / Scripting


Hermes Agent

Hermes Agent is Nous Research’s open-source agent. Configure its custom OpenAI-compatible provider to run ModelsLab models.

Quick Start

Run Hermes with the ModelsLab base URL, API key, and your selected model:

Persistent Configuration

Save the custom provider settings so future Hermes sessions use ModelsLab automatically:
Then start Hermes:
Use hermes model to select another configured model whenever you need to switch.

Pi

Pi is a terminal coding agent that supports custom OpenAI-compatible providers. Add ModelsLab to Pi’s model configuration, then select it from Pi’s model picker.

Configuration

Create or update ~/.pi/agent/models.json:
Set your API key and start Pi:
You can add additional ModelsLab model IDs to the models array. Open /model in Pi to choose between the configured models.

OpenAI Codex CLI

Codex CLI is OpenAI’s open-source coding agent. It works with any OpenAI-compatible API.

Setup

With Environment Variables


Cursor

Cursor is an AI-powered code editor. You can configure it to use ModelsLab as a custom OpenAI-compatible provider.

Setup

  1. Open Cursor Settings (Cmd+, / Ctrl+,)
  2. Go to Models > OpenAI API Key
  3. Set your API key to your ModelsLab API key
  4. Set the base URL to https://modelslab.com/api/v7/llm
  5. Add your preferred model IDs (e.g., Qwen/Qwen2.5-VL-72B-Instruct-together)
You can now select ModelsLab models from Cursor’s model dropdown.

Continue (VS Code / JetBrains)

Continue is an open-source AI code assistant for VS Code and JetBrains.

Configuration

Edit your ~/.continue/config.yaml:

Aider

Aider is a terminal-based AI pair programming tool.

Setup

With .aider.conf.yml


LangChain

Use ModelsLab as the LLM backend in your LangChain applications:

LiteLLM

LiteLLM provides a unified API for 100+ LLM providers. Add ModelsLab as a custom provider:

General OpenAI-Compatible Tools

Any tool that supports a custom OpenAI base URL works with ModelsLab:
Browse all available models at modelslab.com/models/category/llmaster and use the model ID directly in any compatible tool.