> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Ollama

> Run large language models locally or in the cloud with Ollama

![Ollama logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/ollama.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=581793db3c68ad6ee9ddea1724e96e1b)

* **Category:** ai models
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 8
* **Triggers:** 0
* **Slug:** `OLLAMA`
* **Version:** 20261101\_00

## Tools

> [accordion] Chat with Ollama model
>
> **Slug:** `OLLAMA_CHAT`
>
> Tool to send a chat message with conversation history to Ollama. Use when you need to have a multi-turn conversation with an LLM model.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> Model name to use for generating responses
>
> **think** `string`
>
> Enables thinking output; accepts true/false or 'high'/'medium'/'low'
>
> **tools** `array`
>
> Optional function tools the model may call during chat
>
> **format** `string`
>
> Format for response: 'json' or JSON schema object
>
> **stream** `boolean`
>
> Returns streamed partial responses; defaults to false
>
> **options** `object`
>
> Runtime options controlling text generation (ModelOptions)
>
> **logprobs** `boolean`
>
> Returns log probabilities of output tokens
>
> **messages** `array` *required*
>
> Chat history as message objects with role and content
>
> **keep\_alive** `string`
>
> Model keep-alive duration (e.g., '5m' or 0 to unload immediately)
>
> **top\_logprobs** `integer`
>
> Number of most likely tokens per position when logprobs enabled
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Text with Ollama
>
> **Slug:** `OLLAMA_GENERATE`
>
> Tool to generate text responses from Ollama models with optional raw mode. Use raw=true to bypass prompt templating when you need full control over the prompt for debugging or custom processing. Note that raw mode will not return a context.
>
> #### Input Parameters
>
> **raw** `boolean`
>
> When true, bypasses prompt templating and returns the raw response from the model. Use this for debugging or when you need full control over the prompt. Note: raw mode will not return a context.
>
> **model** `string` *required*
>
> Model name to use for generation. Examples: 'llama2', 'mistral', 'gemma3:4b'.
>
> **think** `string`
>
> Enables thinking output. Accepts true/false or 'high'/'medium'/'low' for verbosity level.
>
> **format** `string`
>
> Structured output format. Use 'json' for JSON output or provide a JSON schema object.
>
> **images** `array`
>
> Array of base64-encoded images for multimodal models.
>
> **prompt** `string`
>
> Text for the model to generate a response from. Required unless using raw mode with a complete prompt.
>
> **stream** `boolean`
>
> When true, returns partial responses as stream. Default is false for non-streaming responses.
>
> **suffix** `string`
>
> Text that appears after the user prompt. Used for fill-in-the-middle models.
>
> **system** `string`
>
> System prompt for the model to generate a response from.
>
> **options** `object`
>
> Runtime options for model generation behavior.
>
> **logprobs** `boolean`
>
> Whether to return log probabilities of output tokens.
>
> **keep\_alive** `string`
>
> Model keep-alive duration. Examples: '5m' for 5 minutes, 0 to unload immediately.
>
> **top\_logprobs** `integer`
>
> Number of most likely tokens to return at each position. Requires logprobs=true.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Models
>
> **Slug:** `OLLAMA_LIST_MODELS`
>
> Tool to list all available Ollama models and their details. Use when you need to fetch installed models with metadata including name, size, last modified timestamp, digest, and format information.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] OpenAI-Compatible Chat Completion
>
> **Slug:** `OLLAMA_OPEN_AI_CHAT_COMPLETIONS`
>
> Tool to create OpenAI-compatible chat completions using Ollama models. Use when you need conversational AI responses with OpenAI API format compatibility.
>
> #### Input Parameters
>
> **n** `integer`
>
> Number of chat completion choices to generate. Default: 1
>
> **seed** `integer`
>
> Seed for reproducible outputs. Same seed with same parameters produces same results
>
> **stop** `string`
>
> Stop sequences where the API will stop generating further tokens. Can be a string or array of strings
>
> **user** `string`
>
> Unique identifier for the end-user for monitoring and abuse detection
>
> **model** `string` *required*
>
> Model identifier to use for completion (e.g., 'llama2', 'mistral', 'gemma3:4b')
>
> **tools** `array`
>
> Array of tool/function definitions available for the model to call
>
> **top\_p** `number`
>
> Nucleus sampling parameter. Alternative to temperature. Default: 1.0
>
> **stream** `boolean`
>
> Enable streaming responses. If true, tokens are sent as server-sent events. Default: false
>
> **messages** `array` *required*
>
> Array of message objects representing the conversation history
>
> **logit\_bias** `object`
>
> Modify likelihood of specified tokens appearing in the completion. Map of token IDs to bias values (-100 to 100)
>
> **max\_tokens** `integer`
>
> Maximum number of tokens to generate in the completion
>
> **temperature** `number`
>
> Sampling temperature for randomness (0-2). Higher values make output more random. Default: 1.0
>
> **tool\_choice** `string`
>
> Controls which tool the model should use ('none', 'auto', or specific tool name)
>
> **stream\_options** `object`
>
> Additional streaming options.
>
> **response\_format** `object`
>
> Response format specification for structured outputs.
>
> **presence\_penalty** `number`
>
> Penalize tokens that have appeared to encourage new topics (-2.0 to 2.0). Default: 0
>
> **frequency\_penalty** `number`
>
> Penalize frequent tokens to reduce repetition (-2.0 to 2.0). Default: 0
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] OpenAI-Compatible Text Completion
>
> **Slug:** `OLLAMA_OPEN_AI_COMPLETIONS`
>
> Tool to create OpenAI-compatible text completions using Ollama models. Use when you need text generation with OpenAI API format compatibility beyond chat-based interactions.
>
> #### Input Parameters
>
> **n** `integer`
>
> Number of completions to generate for the prompt. Default: 1
>
> **echo** `boolean`
>
> Returns the prompt embedded within the completion response. Default: false
>
> **seed** `integer`
>
> Random seed for reproducible outputs. Same seed with same parameters should yield same result
>
> **stop** `string`
>
> Sequences where the model should stop generating. Can be a single string or array of strings
>
> **user** `string`
>
> Unique identifier representing the end-user for tracking and abuse monitoring
>
> **model** `string` *required*
>
> Model identifier to use for completion (e.g., 'llama2', 'mistral', 'deepseek-v3.2')
>
> **top\_p** `number`
>
> Nucleus sampling parameter controlling diversity (0-1). Recommended to alter either temperature or top\_p, not both. Default: 1.0
>
> **prompt** `string` *required*
>
> Text prompt for completion generation. Note: Currently only accepts a string, not arrays
>
> **stream** `boolean`
>
> Enable streaming responses as Server-Sent Events. Default: false
>
> **suffix** `string`
>
> Text that comes after the completion. Used for insertion mode
>
> **best\_of** `integer`
>
> Generates multiple completions server-side and returns the best one. Default: 1
>
> **logprobs** `integer`
>
> Number of log probabilities to return (up to 5)
>
> **logit\_bias** `object`
>
> Modify likelihood of specified tokens appearing. Maps token IDs to bias values (-100 to 100)
>
> **max\_tokens** `integer`
>
> Maximum number of tokens to generate in the completion. Total of prompt + max\_tokens cannot exceed model's context length
>
> **temperature** `number`
>
> Controls randomness in output (0-2). Lower values make output more focused, higher values more random. Default: 1.0
>
> **stream\_options** `object`
>
> Additional streaming options.
>
> **presence\_penalty** `number`
>
> Penalizes tokens based on whether they appear in text so far (-2.0 to 2.0). Positive values encourage new topics. Default: 0
>
> **frequency\_penalty** `number`
>
> Penalizes tokens based on frequency in text so far (-2.0 to 2.0). Positive values decrease repetition. Default: 0
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Models (OpenAI Compatible)
>
> **Slug:** `OLLAMA_OPEN_AI_LIST_MODELS`
>
> Tool to list available models using OpenAI-compatible API format. Use when you need to retrieve locally available Ollama models with metadata following OpenAI's model list format.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Show Model Information
>
> **Slug:** `OLLAMA_SHOW`
>
> Tool to show comprehensive information about an Ollama model. Use when you need to retrieve model details, parameters, template, license, or system prompt.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> The name of the model to retrieve information about.
>
> **verbose** `boolean`
>
> When enabled, includes large verbose fields in the response.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Ollama Version
>
> **Slug:** `OLLAMA_VERSION`
>
> Get the version of the configured Ollama instance.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
