Skip to main content
The Cline API is OpenAI-compatible, so any library or tool that works with OpenAI also works with the Cline API. Just change the base URL and API key.

curl

Non-Streaming

Streaming

Python

OpenAI SDK

The OpenAI Python SDK works with the Cline API by setting base_url:

Streaming in Python

Tool Calling in Python

Using requests

If you prefer not to use the OpenAI SDK:

Node.js / TypeScript

OpenAI SDK

The OpenAI Node.js SDK works with the Cline API by setting baseURL:

Streaming in Node.js

Using fetch

Cline CLI

The Cline CLI is the fastest way to use the Cline API from your terminal. It handles authentication, streaming, and tool execution for you.

Setup

Run Tasks

See the CLI Reference for all commands and options.

VS Code / JetBrains

The Cline extension handles the API integration for you:
  1. Open the Cline panel in your editor
  2. Select Cline as the provider in the model picker
  3. Sign in with your Cline account
  4. Start chatting or give Cline a task
Your API key is managed automatically. No manual configuration needed. For setup instructions, see Installing Cline and Authorizing with Cline.

Chat Completions

Full endpoint reference with all parameters.

Authentication

API key management and security practices.

Models

Browse available models.

CLI Reference

Complete Cline CLI command reference.