← All guides

OpenCode and Ollama Cloud

How AgentGrid shows Ollama Cloud limits from your account balance.

Conceptual illustration of a cobalt cloud suspended above two ivory bowls of different sizes on a brass stand.
AI-generated editorial illustration.
In this guide

AgentGrid shows your Ollama Cloud balance in the usage popover from an API key you paste into AgentGrid. Create a key at ollama.com/settings/keys, then paste it under Settings → Agents → Ollama Cloud usage. Clearing the key disconnects; revoking it on ollama.com stays with you.

AgentGrid encrypts the key with your operating system's secure storage and refuses to save it where that isn't available. Balance requests use only that key, not the key OpenCode stores and not browser cookies. AgentGrid still reads OpenCode's auth file to see which providers are set up, and uses only their names. If your card used to work from opencode auth login, paste a key once to get your limits back.

The limits appear on the OpenCode row when OpenCode uses Ollama Cloud, showing the monthly balance, its reset date and any purchased credits. Accounts that still return session and weekly windows see those instead. Paired phones show the same limits without the key leaving your computer. A standalone daemon has no key, so it shows no Ollama limits.

Three steps: an Ollama API key pasted in AgentGrid Settings, the ollama.com balance, then the usage card's monthly limit.

AgentGrid reads the monthly balance with the key you paste in Settings and shows it on the usage card.

Diagram by AgentGrid

Troubleshooting

If the usage card has no Ollama limits:

  • Choose Connect Ollama in the usage popover, or open Settings → Agents, and paste an API key.
  • Limits appear when OpenCode uses Ollama Cloud: connect Ollama Cloud in OpenCode with opencode auth login.
  • Key rejected: create a new key and replace it in Settings.
  • Ollama account suspended: check your account on ollama.com. AgentGrid keeps your key.
  • Could not be refreshed: wait and open usage again. The last reading stays up, with its age, while refreshes fail.