Cline
Use TokenFlux models in the Cline CLI and the Cline extension for VS Code
Cline is a coding agent for the terminal and for VS Code. Cline connects to TokenFlux as an OpenAI-compatible provider. Each request is charged to your TokenFlux balance.
This guide was tested with Cline CLI 3.0.72. The VS Code labels are from Cline 4.1.25.
Before you start
- On API keys, create a key and copy it. The full key is shown only once.
- Make sure that your account has a balance. Add funds on Billing.
- Choose a model ID from Models and pricing. Coding agents send long prompts with tools, so choose a chat model that supports tool calls.
Cline CLI
Save TokenFlux as the provider. Replace <model-id> with the ID that you
chose.
cline auth -p openai -b https://tokenflux.ai/v1 -k "$TOKENFLUX_API_KEY" -m <model-id>Cline shows Provider configured: openai-compatible (<model-id>). Then give
it a task:
cline "Add a README section that explains how to run the tests"To use a different model for one run, add -m <model-id>.
By default, the CLI starts in act mode and approves tools automatically. Use
cline -p "<task>" to start in plan mode, or --auto-approve false to
approve each tool call.
VS Code extension
- Open the Cline panel and open the settings.
- Set API Provider to OpenAI Compatible.
- Set Base URL to
https://tokenflux.ai/v1. - Paste your key into OpenAI Compatible API Key.
- In Model ID, select or enter the model ID that you chose.
Check usage
The token count and cost of each request are on the Usage page.
Troubleshooting
401 with Invalid token. The key is wrong or no longer valid. Check it
on the API keys page.
model_not_found. Copy the model ID exactly from
Models and pricing.
405 or an HTML error page. The base URL must end with /v1.