Skip to main content

Use OceanToken in Cline

Cline runs on OceanToken through its OpenAI Compatible provider. You give it a base URL, a key and a model ID. Cline's tools work as usual: reading and editing files, running commands, streaming replies and, on models that take images, screenshots. These steps were tested on 2026-10-18 with the Cline CLI 3.0.73. The Cline VS Code extension uses the same provider code.

Before you start​

Create an API key for Cline and give it a Credit limit. An agent sends many requests, and the limit caps what this key can spend. See Before you start for how to keep the key in an environment variable and check it.

Set up in VS Code​

  1. Open Cline's settings.
  2. Set API Provider to OpenAI Compatible.
  3. Set Base URL to https://api.oceantoken.ai/v1.
  4. Paste your OceanToken key into API Key.
  5. Set Model ID to a model from the table below, for example openai/gpt-5.5. The list Cline loads has every model your key can use, including image, video and speech models. Pick a text model.
  6. Under Model Configuration:
    • Turn Supports Images on for a model whose Images column says Yes, and off for the others.
    • Set Context Window Size to the model's context window from the table.
    • Set Max Output Tokens to 32000.
    • Reasoning Effort is optional. Cline sends it to the model as reasoning_effort.
  7. Start a short task, such as "List the files in this folder", to check the setup.

Set up the Cline CLI​

Save the provider once:

cline auth openai-compatible -k "$OCEANTOKEN_API_KEY" -b https://api.oceantoken.ai/v1 -m openai/gpt-5.5

Then check it:

cline "Reply with the single word OK"

cline auth saves the key in Cline's settings file. Pick another model for one run with -m <model id>, and set the reasoning effort with --thinking low, medium or high.

These models were tested with Cline's tools. Copy the context window into Context Window Size. Keep Max Output Tokens at 32,000: a coding turn rarely needs more, and a smaller limit caps the cost of any one reply. Each model's price is on its page on oceantoken.ai, linked from the Price column. The Models page lists every model.

Prompt caching​

Cline sends the same long prompt on every turn, so the Cached input price matters as much as the input price.

  • GPT, DeepSeek, Qwen and GLM models cache the repeated part of the prompt on their own. From the second turn of a task, that part is billed at the cached input price.

  • Claude caches only when the request asks for it, and Cline's OpenAI Compatible provider does not ask. Every Claude turn on that provider is billed at the full input price. For Claude, use Cline's Anthropic provider instead, which does ask:

    1. Set API Provider to Anthropic.
    2. Paste your OceanToken key into API Key.
    3. Turn on Use custom base URL and enter https://api.oceantoken.ai/v1.
    4. Set Model to claude-sonnet-5-5, claude-opus-5-5 or claude-haiku-4-5. These are Anthropic's own names. OceanToken serves them as the same models as anthropic/claude-sonnet-5.5, anthropic/claude-opus-5.5 and anthropic/claude-haiku-4.5, at the same prices.
    5. Leave Adaptive Thinking at None. If you want Claude to think before it answers, use the OpenAI Compatible setup above.

Each request's charge, cached input included, is in the console under Logs.

Troubleshooting​

What you seeWhat to do
Invalid API key. Check the key, or create one in the OceanToken console.The key is wrong, revoked or has a stray space. Paste it again, or create a new one.
Unknown model '…'. GET /v1/models lists the models your key can use.Use the model ID exactly as the Models page writes it, with the publisher in front (deepseek/deepseek-v4-pro, not deepseek-v4-pro). With the Anthropic provider, use Anthropic's names, such as claude-sonnet-5-5.
This model does not accept image input. or The upstream model provider returned an error. right after you attach an imageThe model reads text only. Turn Supports Images off for it, or pick a model whose Images column says Yes.
Insufficient balance - please add credit to continue.Add credits. If you still have a balance, lower Max Output Tokens: a request starts only when your balance covers the most its reply can cost.
reasoning part 0 not found with the Anthropic providerSet Adaptive Thinking to None, or use the OpenAI Compatible setup.
The model list shows hundreds of modelsIt lists everything your key can use. Type a model ID from the table above.