Ollama API
Ollama is a tool that enables you to run large language models (LLMs) locally on your machine. The Ollama API connector enables you to connect to Ollama's local REST API to run inference, generate text completions, list available models, and perform chat completions using local LLMs. This connector is particularly useful for applications that need to run LLMs locally for privacy, cost control, or offline capabilities, without relying on cloud-based AI services.
Power end-to-end data operations for your Ollama API API with Nexla. Our bi-directional Ollama API connector is purpose-built for Ollama API, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Ollama API or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Ollama API workflows fast, secure, and fully governed.
Features
Type: API
- Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
- Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
- API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
- Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Prerequisites
Before creating an Ollama API credential, you'll need to have Ollama installed and running locally on your machine or accessible via a network URL. Ollama runs locally and does not require authentication by default, but you'll need to know the base URL where your Ollama instance is accessible.
To set up Ollama:
-
Install Ollama on your local machine or server. You can download Ollama from ollama.ai or install it using package managers.
-
Start the Ollama service. Ollama typically runs on
http://localhost:11434by default for local installations. -
If you're accessing Ollama over a network or through a tunnel (like ngrok), note the base URL where your Ollama instance is accessible. This could be:
http://localhost:11434for local accesshttps://your-domain.comfor network accesshttps://your-ngrok-url.ngrok-free.appfor tunneled access
-
Verify that Ollama is running by accessing the version endpoint:
{base_url}/api/version. This should return the Ollama version information.
Ollama runs locally and does not require authentication by default. However, if you've configured authentication for your Ollama instance, you may need to provide credentials. For most local installations, no authentication is required, and you only need to specify the base URL where Ollama is accessible.
For detailed information about Ollama installation and configuration, refer to the Ollama Documentation.
Authenticate
Credentials required
Ollama runs locally and does not require authentication.
| Field | Required | Secret | Description |
|---|---|---|---|
| Base URL | Yes | No | The base URL for your locally running Ollama instance. |
Create a credential in Nexla
- After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – Ollama

-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
Enter the base URL for your locally running Ollama instance in the Base URL field. This should be the complete URL including the protocol (http:// or https://) and port if applicable. Common examples include:
http://localhost:11434for local installationshttps://your-domain.comfor network accesshttps://your-ngrok-url.ngrok-free.appfor tunneled access
The default value is typically
http://localhost:11434for local Ollama installations. If you're using a tunnel or network-accessible Ollama instance, update this to match your Ollama instance URL. Ensure that the URL is accessible from where Nexla will be making API calls. -
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Use as a data source
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Ollama API connector tile, then select the credential that will be used to connect to the Ollama instance, and click Next; or, create a new Ollama API credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Ollama API endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Manual configuration
Ollama API data sources can also be manually configured to ingest data from any valid Ollama API endpoint, including endpoints not covered by the pre-built templates or custom API configurations. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Ollama API endpoints typically follow the pattern {base_url}/api/{operation}, where {base_url} is your Ollama base URL configured in the credential. Common endpoints include /api/version and /api/tags (GET, for listing models), and /api/generate and /api/chat (POST, for generation and chat completions).
For Path to Data, common paths include $ for the entire response, $.models[*] for arrays of models, or $.response for generated text. Content-Type is typically set to application/json for POST requests. Request bodies typically include a model field (e.g., "llama3"), a prompt field for text generation or a messages array for chat completions, and optionally a stream field set to false for non-streaming responses.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Ollama API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.