Skip to main content

Use OceanToken in Zoo Code and Roo Code

Zoo Code runs on OceanToken through its OpenAI Compatible provider. You give it a base URL, a key and a model ID, and set a few model capabilities. These steps were checked on 2026-10-18 against the requests Zoo Code 3.90.0 sends, with its own tool definitions: tool calls, streaming, images, reasoning effort and prompt caching.

Roo Code

Roo Code shut down on 2026-05-15 and is no longer updated. Zoo Code is the community project that continues it. If you still have Roo Code installed, the same steps work there. It has the same settings with the same names, except Strict tool schemas: Roo Code always sends strict schemas, which is what step 7 sets in Zoo Code.

Before you start​

Create an API key for Zoo Code 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​

  1. Open Zoo Code's settings and go to Providers.
  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 to a model from the table below, for example anthropic/claude-sonnet-5.5. The list Zoo Code loads has every model your key can use, including image, video and speech models. Pick a text model.
  6. Set the model's capabilities:
    • Context Window Size: the model's context window from the table.
    • Max Output Tokens: 32000.
    • Image Support: on for a model whose Images column says Yes. It is off by default.
    • Prompt Caching: on for Claude models, off for the others (why).
    • The prices are optional. Zoo Code uses them only for its own cost estimate.
  7. Leave Enable streaming and Strict tool schemas on.
  8. Model Reasoning Effort is optional. Zoo Code sends it to the model as reasoning_effort.
  9. Start a short task, such as "List the files in this folder", to check the setup.

These models were tested with Zoo Code's tools. 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​

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

  • Claude caches only when the request asks for it. With Prompt Caching on, Zoo Code asks, and from the second turn of a task the repeated part of the prompt is billed at the cached input price.
  • GPT, DeepSeek, Qwen and GLM models cache on their own, so leave Prompt Caching off for them.

Zoo Code's own cost estimate may not count cached input. The charge for each request 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).
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 Image Support 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.
Claude costs more than expectedTurn Prompt Caching on for Claude models.
The model list shows hundreds of modelsIt lists everything your key can use. Type a model ID from the table above.