Documentation
Cline Integration Guide
A step-by-step guide to connect the Cline AI coding assistant with A4F, unlocking access to hundreds of models directly in your editor.
Introduction
Cline is a powerful, GUI-based AI coding assistant that integrates directly into IDEs like VS Code. By connecting Cline to A4F, you can leverage a diverse range of models from multiple top-tier providers through a single, unified configuration. This guide will walk you through the entire setup process.
Prerequisites
Before you begin, ensure you have the following:
- The Cline extension (v3.17.11 or later) installed in your code editor (e.g., VS Code).
- An active A4F account. If you don't have one, you can sign up on our homepage.
- An A4F API Key. You can generate one from your API Keys dashboard.
Configuration Steps
Follow these steps to configure Cline to use the A4F API.
- Open Cline Settings
First, open the Cline extension in your editor. You can typically do this by clicking the Cline icon in the activity bar. Once the main interface is open, navigate to the settings panel by clicking the gear icon.
Image Placeholder: Opening Cline Settings
A vertical screenshot showing the Cline interface with the settings icon highlighted. - Set API Provider to "OpenAI Compatible"
In the API Configuration settings, find the "API Provider" dropdown menu. Select "OpenAI Compatible" from the list. This tells Cline to use a custom endpoint that follows the OpenAI API specification, which A4F provides.
Image Placeholder: Selecting API Provider
A vertical screenshot of the API Provider dropdown with "OpenAI Compatible" selected. - Enter A4F API Credentials
After selecting the compatible provider, you will see fields for the Base URL, API Key, and Model ID. Fill them out as follows:
- Base URL: Enter the A4F API endpoint:
https://api.a4f.co/v1
- API Key: Paste your unique API key generated from the A4F API Keys page.
- Model ID: Specify the model you want to use in the A4F format (e.g.,
provider-1/chatgpt-4o-latest
). You can find available models on our Models page.
Image Placeholder: API Credentials Configuration
A vertical screenshot showing the Base URL, API Key, and Model ID fields filled out. - Base URL: Enter the A4F API endpoint:
Model Configuration Details
Below the API credentials, you'll find the Model Configuration section. These settings are highly dependent on the specific model you selected in the "Model ID" field.
Capabilities
These checkboxes tell Cline about the special abilities of the selected model.
Supports Images
Supports browser use
Image Placeholder: Model Capabilities
A vertical screenshot showing the "MODEL CONFIGURATION" section with checkboxes.
Model Parameters
These parameters control the model's behavior and should be set according to the limits of your chosen model.
The fields for Context Window Size, Max Output Tokens, Input Price, Output Price, and Temperature are fully modifiable. It is crucial that you enter values that are supported by the specific model you selected. You can find the correct and maximum values for each of these parameters by visiting our Models page and viewing the details for your chosen model.
Image Placeholder: Model Parameters
A vertical screenshot showing the input fields for Context Window, Tokens, Price, and Temperature.
Advanced Settings
The remaining settings are optional and for more advanced use cases:
- Use different models for Plan and Act modes: This allows you to use a more powerful (and potentially more expensive) model for planning tasks and a faster, cheaper model for execution. This is an advanced feature and can be left unchecked for standard use.
- Custom Instructions: This field acts as a system prompt. You can provide instructions here that will be sent with every request to guide the model's behavior, personality, or response format.
Saving and Version Note
Once you have configured all the settings to your liking, click the Save button at the top right of the settings panel to apply your changes. Cline is now configured to use A4F!
Version Information
Was this page helpful?