Ollama also supports cloud-offloaded models through a signed-in local Ollama server. That access mode uses model IDs such as
gpt-oss:120b-cloud. See the Ollama Cloud guide.
Ollama supports multiple open-source models. See the Ollama library.
Experiment with different models to find the best fit for your use case. Here are some general recommendations:
gpt-oss:120bis a general-purpose model available through the direct Ollama Cloud API.llama3.3models are good for most basic use cases.qwenmodels perform particularly well with tool use.deepseek-r1models have strong reasoning capabilities.phi4models offer strong performance at a small size.
Direct Ollama Cloud API authentication
To call Ollama Cloud directly, set yourOLLAMA_API_KEY environment variable. Create a key from Ollama.
OLLAMA_API_KEY is set, Agno adds bearer authorization and defaults the host to https://ollama.com. Local requests use the Ollama server configured by the client.
Set up a model
Both local and direct cloud usage require theollama Python package:
Local Usage
Install the Ollama app and run a model:run model
pull model
Direct Ollama Cloud API
SetOLLAMA_API_KEY to access models through https://ollama.com. This direct API path runs without a local Ollama server.
Examples
Local Usage
Once the model is available locally, use theOllama model class to access it:
Direct Ollama Cloud API
When
OLLAMA_API_KEY is set, the host defaults to https://ollama.com. You can omit the host parameter.See Ollama usage examples for more.
Params
Ollama is a subclass of the Model class and has access to the same params.
Responses API
Ollama v0.13.3+ supports the OpenAI Responses API via the/v1/responses endpoint. Use OllamaResponses for this interface. It uses the OpenAI client, so install the openai package:
previous_response_id chaining.
See OllamaResponses reference for full parameters.