> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salad.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For autonomous tasks, use live SaladCloud API responses for current state, availability, quotas, models, and other dynamic values. Use current OpenAPI specifications where provided for paths, schemas, required fields, and enums. Never invent endpoints, fields, prices, availability, quotas, models, or state. Prefer API workflows over Portal steps. Read before changing and never expose credentials, signed media URLs, prompts, or sensitive outputs. Retry only safe or idempotent operations with bounded backoff, honoring Retry-After. Verify every write with a read. Stop rather than repeat an uncertain non-idempotent or billable request. AI Gateway uses an organization-specific Bearer key and live /v1/models discovery. Do not delete, cancel, stop, or reduce capacity without explicit user intent. Bind shared operation IDs to the selected product path. Treat Container Engine instances as interruptible and local state as ephemeral. Install the SaladCloud skills (npx skills add https://docs.salad.com), start from the salad skill and /agents/overview; docs MCP: https://docs.salad.com/mcp.

# Run Ollama

*Last Updated: September 24, 2024*

Ollama is a toolkit for deploying and service Large Language Models (LLMs). Ollama enables local operation of
open-source large language models like Llama 2, simplifying setup and configuration, including GPU usage, and providing
a library of supported models.

[Learn More Here](https://ollama.com/)

## Ollama API

Ollama can be used as an API that can:

* Generate text completions using different language models and tags.
* Stream responses in JSON format or receive them as single objects.
* Include optional parameters such as images, formatting options, and system messages.
* Maintain conversational memory using the context parameter.
* Control response streaming and model memory retention.

For detailed instructions and examples, refer to the
[Ollama documentation](https://github.com/ollama/ollama/blob/main/docs/api.md)

# Deploying Ollama on Salad

## Container

Ollama provides a pre-built docker available via the Docker Container registry :
[https://hub.docker.com/r/ollama/ollama](https://hub.docker.com/r/ollama/ollama)

In order to deploy the container on Salad, you will need to specify the image:

![](https://mintcdn.com/salad/8o1ParSgmJGbpSYb/container-engine/images/a48be4d-image.png?fit=max\&auto=format\&n=8o1ParSgmJGbpSYb\&q=85\&s=af859d86712d7b7aaabfa34cd5ca018e)

All the other options can be specified using api requests.

## Required - Container Gateway Setup

In addition you need to specify the port your api will be available through. Default port for Ollama is 11434

![](https://mintcdn.com/salad/8o1ParSgmJGbpSYb/container-engine/images/af91390-image.png?fit=max\&auto=format\&n=8o1ParSgmJGbpSYb\&q=85\&s=9a36c1e9c5607a3da189ad75b25c4cb1)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.