Models
Cline
Cline is a coding agent that runs inside VS Code and talks to whichever provider you configure. Unlike editor integrations that proxy through a vendor, Cline calls the endpoint directly from your machine, so a Grafilab base URL and key are all it needs.
Prerequisites
Section titled “Prerequisites”- Cline installed in VS Code and its sidebar panel open.
- A Grafilab API key. In the console open API (
https://app.grafilab.ai/api) and click Generate New Key — see API Keys.
Name the key cline so its spend is separated from your other tools.
Pick a model id
Section titled “Pick a model id”The model catalog is live, so list it rather than copying ids from a page. Every entry’s id is the exact string to use in any tool or SDK.
curl https://llm.grafilab.ai/v1/models \ -H "Authorization: Bearer $GRAFILAB_API_KEY" | jq -r '.data[].id'from openai import OpenAI
client = OpenAI(api_key="sk-grafilab-...", base_url="https://llm.grafilab.ai/v1")for model in client.models.list(): print(model.id)import OpenAI from "openai";
const client = new OpenAI({ apiKey: "sk-grafilab-...", baseURL: "https://llm.grafilab.ai/v1" });for await (const model of client.models.list()) { console.log(model.id);}The same ids appear as cards in the Playground, with context size and prices.
Cline sends the Model ID string verbatim, so it must match a catalog id exactly.
Connect Cline to Grafilab
Section titled “Connect Cline to Grafilab”-
Open the Cline panel and select the ⚙️ settings icon. The API configuration is the first section.
-
Set API Provider to OpenAI Compatible.
-
Set Base URL to:
https://llm.grafilab.ai/v1Cline appends
/chat/completionsitself, so the value ends at/v1. -
Paste your Grafilab key into API Key. Leave Use Azure Identity Authentication unchecked.
-
Enter your Grafilab model id in the Model field (labelled Model ID in some builds).
-
Open Model Configuration and fill in what Cline cannot discover from an OpenAI-compatible endpoint.
Field Where the value comes from Context Window The Context figure on the model’s Playground card Max Output Tokens The model’s output cap; leave the default if you are unsure Image Support Enable only for a multimodal model Computer Use Leave off unless the model advertises tool use you have tested Input Price / Output Price The Input and Output prices on the Playground card The prices only feed Cline’s own cost meter. Grafilab bills from the catalog price regardless of what you type here, so a wrong number produces a misleading estimate, not a wrong charge.
-
Select Done, then give Cline a small task — “list the files in this folder and summarise what the project does” is a good first one.
Alternative: the Anthropic provider
Section titled “Alternative: the Anthropic provider”Cline can also talk to Grafilab in Anthropic format. Set API Provider to Anthropic, check Use custom base URL, and enter the bare origin:
https://llm.grafilab.aiThen paste the same key and type the same model id. Note the missing /v1 — Anthropic clients append /v1/messages themselves.
You almost never need this. It is worth trying only if a Cline feature insists on the Messages format. One visible difference: Grafilab accepts and ignores cache_control, so Cline’s cache-write counter stays at 0 for the whole session even though cache reads are reported normally.
Verify
Section titled “Verify”Cline shows tokens and an estimated cost under each task. After your first task completes, open API in the console, select View Usage on the cline key, and confirm a request landed today. Rollups can lag by up to about 30 minutes.
Caveats
Section titled “Caveats”- Set the context window by hand. Cline cannot read a context size from an OpenAI-compatible endpoint, so its default is a guess. Too high and Cline packs a prompt the model rejects; too low and it truncates your files for no reason.
- Images need a multimodal model. Attaching a screenshot to a task on a text-only model fails at the API, not in Cline.
- Reasoning traces arrive as
reasoning_content. Grafilab returns them under bothreasoningandreasoning_contentwith identical text. Whether Cline renders them depends on the extension version. 429means an empty wallet. Grafilab uses429for insufficient balance rather than throughput, so a rate-limit message from Cline is a billing signal. Top up in the console.- Long tasks can stall. Each upstream call has a 120-second bound on time-to-first-token. If a request dies before any output, retry it; the work was not billed.

