Running vision models on Ollama for private image processing
A team that needs to process photos or scanned documents without sending them to a third-party service can run Ollama vision models on a self-hosted server. These models accept images alongside text, so a prompt such as asking for the total on a scanned invoice or a description of a site photo can be answered on hardware the organization controls. The main teams who need this are those handling identity documents, patient forms, claims photos, field inspections or internal scans that cannot leave the network under their data handling rules.
How images get in depends on the client. The vision documentation describes the Python and JavaScript SDKs accepting file paths, URLs or raw bytes, while the REST API on port 11434 expects image data encoded as base64 in an images array attached to the message. For internal pipelines, the practical choice is usually the API, because a scanning service or document portal can encode files it already holds. Confirm in the vision documentation which image formats and sizes your chosen model accepts, and test with a representative sample of your own documents before you commit to a workflow.
Ollama's FAQ states that when it runs locally it does not see your prompts or data. That statement covers the runtime, not the system around it. Images are often stored in upload folders, queued in message brokers, written to logs and copied into application databases, and each of those copies becomes part of your data handling scope. The local API also has no authentication, and by default it binds to 127.0.0.1, so any exposure you add through OLLAMA_HOST or a reverse proxy needs its own access control review. Decide where the image files live, how long they are kept, who can call the endpoint and whether cloud features are disabled with OLLAMA_NO_CLOUD=1.
GPU memory is the other planning item. Multimodal models generally need more memory than text-only models of similar size, and image inputs add to the work per request, so test the specific vision model at the image resolution and concurrency you expect. Use the Ollama FAQ as the baseline for the local data behavior, then have your security and compliance teams review the complete path from upload to storage to deletion.
How images reach the model: CLI, SDKs and the REST API
The command line is the fastest way for an operator to confirm that a vision model reads images correctly on a given server. You start an interactive session with the model, then reference a local file path in the prompt, and Ollama attaches the image to that message. It is suited to spot checks after a model pull, a driver change or a version upgrade, not to processing volumes of documents. Nothing in the CLI is an integration point, so logic built on top of it will be fragile.
- Quick checks: Confirm that a model recognizes text in a scanned page or a product photo before any application depends on it.
- Manual review: Operators can compare answers across models on the same image without writing code.
- Limited automation: Scripting the CLI works for a handful of files but gives little control over errors, retries or output format.
- Local only: The CLI talks to the server on the same host, so it does not show how remote clients will behave.
- Access: Whoever can run the CLI on the server can read the image files it is given, so restrict the account.
Before relying on a model for a workflow, confirm with a sample of your own images that the output is correct, and record the model version you tested.
The Python and JavaScript SDKs suit application code that runs on the same network as the Ollama server. They accept an image as a file path, a URL or raw bytes, so the calling code can pass the source it already has without encoding the image first. This makes the SDKs the usual choice for developers building a feature, because the image handling stays short and readable. The SDK still sends a request to the server's REST API, so the same limits on size and throughput apply.
- Input flexibility: File paths suit batch scripts, raw bytes suit uploads already held in memory, and URLs suit images stored elsewhere.
- Server address: Point the client at the server you operate, since the default address only reaches the local machine.
- Error handling: Wrap calls so that unreadable files, oversized images and timeouts produce logged, actionable errors.
- Versions: Pin SDK versions in your lock files and test them against the server version you run.
- URL inputs: Fetching remote URLs from application code can expose internal services to requests, so validate the destinations.
Confirm which SDK version, server version and input types your team will use, and test the exact combination in a staging environment before release.
The REST API on port 11434 is the integration point for any client that is not Python or JavaScript, and for services that need explicit control over the request. Ollama's vision documentation describes the API as expecting base64-encoded image data in an images array, so the client reads the file, encodes it and places it in the request body alongside the prompt. This gives the platform team full control over validation, logging and size limits at the gateway, but it adds encoding work and increases request size.
- Encoding overhead: Base64 text is larger than the original binary, so the request body grows and memory use on both ends rises.
- Request limits: Confirm the maximum request body size at every proxy, load balancer and gateway between clients and the server, because a default limit can reject larger images.
- Timeouts: Large payloads and multimodal inference take longer, so set client and proxy timeouts to match.
- Network exposure: The API has no authentication locally, so place it behind an authenticated proxy before any client outside the host can reach it.
- Logging: Avoid logging full request bodies, since they contain the image content.
Before choosing this path, test a representative image size end to end through your actual proxy chain, and confirm the limits with your gateway and the Ollama version you run.
Configuration options and when each fits
This table compares the server settings that most affect image workloads on Ollama, from model choice to network exposure. Read each row for the situation where the setting fits and the trade-off it introduces, using the documented defaults as the starting point.
| Option | When it fits | Trade-off |
|---|---|---|
| Vision-capable model choice | Documents, photos or screenshots that need a model with image input, chosen from models that list vision support | Vision models usually need more GPU memory than text-only models of similar size, so confirm fit before choosing |
| OLLAMA_NUM_PARALLEL | Several users or pipeline jobs send images at the same time to one model | The default is 1 parallel request per model, so concurrent image requests queue unless you raise it, and higher values need more memory per model |
| OLLAMA_MAX_LOADED_MODELS | A vision model and a chat model share one server and both must stay loaded | The default is 3 times the number of GPUs, or 3 on CPU, so loading more models can push memory use and evict models you expected to stay warm |
| OLLAMA_MAX_QUEUE | Batch image jobs arrive in bursts and you prefer waiting requests over immediate failures | The default is 512 queued requests, and a deep queue hides overload and delays results for every caller |
| OLLAMA_HOST | Applications on other machines must reach the vision endpoint through a proxy you control | Ollama binds to 127.0.0.1 port 11434 by default, and exposing it requires authentication and network controls, which the server does not provide itself |
Setting up a vision model and sending the first image
This sequence takes a host you control from a fresh Ollama install to a verified vision model that answers questions about a known test image through both the CLI and the local REST API. Each step ends with a check so the team knows the setup works before any real images or users are involved.
Install Ollama on a host you control
The platform engineer installs Ollama on a Linux, macOS, Windows or Docker host inside your infrastructure, using the install method your team has standardized on. Ollama is an MIT-licensed runtime with a llama.cpp backend, so the install adds no license fee for running models on your own hardware. Confirm the installed version with the version command and record it in your change log, since Ollama ships frequent releases and vision behavior can change between them. The step is done when the service responds on the local machine and the version is recorded.
Point model storage at a planned directory
Before pulling any weights, the engineer sets OLLAMA_MODELS to a directory with enough free space and the correct ownership for the service account. The default locations differ by operating system, so changing the variable keeps model files on a volume your storage team monitors and backs up. Vision models are often large because the image encoder ships with the language model, so check free space against the model size listed on its library page. The step is done when a test pull writes files into the planned directory and not the default path.
Confirm the bind address stays local
The engineer checks that Ollama is still bound to 127.0.0.1 on port 11434, which is the default, and does not set OLLAMA_HOST to a wider address during this setup. The local API has no authentication, so any network exposure before a proxy with access control is in place would let other hosts send requests and images. Confirm the binding with your operating system's socket listing tool. The step is done when the listener shows only the loopback address.
Pull a vision-capable model
The engineer pulls a model that the Ollama model library lists as accepting images, after confirming the model's license terms and the vendor's provenance for the weights. Model licenses are separate from the MIT license of the runtime, so legal or compliance should review them before the model reaches users. Run the pull command and wait for it to finish without errors. The step is done when the model appears in the local model list and the file sizes in the planned storage directory match what the library page describes.
Send a known test image through the CLI
The engineer chooses a test image whose contents are known in advance, such as a photo with a few clearly visible objects and a printed label with a short word. Start an interactive session with the model, include the image file path in the prompt, and ask a question with an answer that can be checked, such as the color of an object or the word on the label. Ollama's CLI accepts a file path for the image. The step is done when the answer names the expected objects and the label text correctly, and the model stays loaded long enough to answer without an out-of-memory error.
Call the REST API with a base64 images array
The developer sends the same test image to the local REST endpoint at localhost:11434 by encoding the file as base64 and placing it in the images array of the request, alongside the prompt text. The SDKs can accept a file path, URL or raw bytes, but the REST API expects encoded data, so this call shows what an application must send. Use a non-streaming request first so the full response is easy to compare. The step is done when the HTTP response status is successful and the answer matches the answer from the CLI test.
Check model loading and memory use
The engineer runs the process listing command for loaded models while the model is active and confirms the model is resident, the processor split shows GPU or CPU use as expected, and memory use leaves headroom for the operating system and other services. Record the loaded model name and processor split in the setup notes, because these numbers shape the hardware decisions that follow. The step is done when the loaded model is listed, the processor split matches the hardware plan, and the server log shows no load errors.
Record the verified baseline
The engineer saves the Ollama version, model name and digest, the storage path, the bind address, the test image and its expected answers, and the CLI and API outputs in the team's configuration repository. This baseline lets the team rerun the same check after an upgrade or a model change and see whether vision answers have shifted. The step is done when a colleague can repeat the test from the saved notes and get the same expected answers.
How an image request moves through a private Ollama server
The request starts in a client application or user tool that encodes the image and sends it to a reverse proxy such as Nginx, which is where authentication must sit. The proxy forwards only authenticated traffic to the Ollama API on port 11434, which has no authentication of its own. The API hands the request to the model runtime, which loads the vision model from the model store on disk and runs inference on the GPU or CPU. Check that nothing reaches port 11434 except through the proxy.
Image requests cross one authenticated entry point before reaching the local Ollama API.
Why GPU memory for multimodal models differs from text models
A vision model has the same memory demands as a text model plus extra costs from the image encoder and the tokens each image adds to the context. Those costs multiply with parallel requests and with every other model kept loaded on the same GPU, so sizing has to account for all of them together.
Model weights set the baseline
The weights of a vision model are loaded into GPU memory before any image arrives, and a multimodal model is usually larger than a text model of similar size. Check the parameter count and quantization of the exact tag you plan to run, not the family name. Ask the model's documentation for the weight footprint, then confirm it by loading the model on the target GPU and reading the memory usage that Ollama reports.
Ollama vision docsImage encoder adds a fixed cost
Most vision models pair the language model with an image encoder (a vision tower) that processes each picture before the language model reads it. This component adds memory on top of the weights and can differ in size between model variants that share a name. Ask the model publisher which encoder ships with the tag and measure its footprint during a test load, because it does not scale with how many images you send.
Image tokens consume context
Each image is converted into a block of tokens that occupies the context window alongside the prompt and the reply. A request with several large images can use far more context than a text prompt of similar length, which increases the key-value cache held in GPU memory. Check the context length you set with the num_ctx option and confirm the token count per image for your model before you size the server.
Parallel requests multiply per-request memory
Each concurrent request needs its own context buffer, so memory grows with the number of parallel requests as well as with image size. The OLLAMA_NUM_PARALLEL setting controls how many requests a model serves at once, and its default is 1. Raising it for an image workload can exhaust VRAM quickly, so test with the largest expected image batch at the concurrency you plan to allow.
Models kept loaded share the GPU
Ollama can keep several models in memory at once, so a vision model loaded for one team may leave less room for a text model another team uses. The OLLAMA_MAX_LOADED_MODELS setting caps how many models stay resident, and its default depends on the number of GPUs. Decide which models should stay loaded on a shared server, and check resident memory after both models have served traffic.
- Default loaded models per GPU
- 3
Questions buyers ask before running vision models privately
Does running Ollama vision models cost money?
Running Ollama on your own hardware is free software use, and Ollama's pricing page states that running models on your own hardware is always unlimited. The paid plans on that page apply to cloud models, which are separate from a private deployment. Your real costs are the hardware or cloud infrastructure that runs the server, the storage for model files and any images you keep, and the labor to install, secure and operate it. Vision models are usually larger than text-only models, so the GPU memory line is often the largest one. Ask any partner for a quote that separates one-time work such as installation and hardening from recurring work such as upgrades, monitoring and retesting.
How much effort do setup and hardening take?
The effort depends on how many people use the server, how the images arrive and what your security team needs to review. A single workstation with local access is a small job. A shared server that staff reach over a network needs more work, because Ollama's API has no built-in authentication when run locally, so you must place an authenticated gateway or proxy in front of it. The main drivers are the number of GPUs, the network path, identity integration, logging of who sent which request, and how strict your image retention rules are. Ask for the effort split by task in the written scope so you can see each item before work starts.
What must our team supply before a vision model deployment starts?
Plan to supply four things before work begins:
- GPU hardware or accelerator capacity sized for the vision model you choose, plus the host, power and cooling to run it.
- Storage for model files, which Ollama keeps in a default directory per operating system unless you move it with the OLLAMA_MODELS variable, and a location for any images you retain.
- Identity and access sources, such as your single sign-on provider and the groups that should use the service.
- Written image retention rules, including how long uploaded photos or documents may be kept, who can read logs and whether images may leave your network.
Your security and compliance teams should also confirm that cloud features are off, for example by setting OLLAMA_NO_CLOUD=1 where your policy requires it.
Can our own engineers deploy and run vision models on Ollama?
Yes, a team with Linux or container administration skills can install Ollama, pull a vision model and send images through the CLI or the API. The harder parts are production concerns: exposing the server safely, setting concurrency limits, managing GPU memory, keeping an audit trail of image requests and patching a server that handles sensitive files. Many teams keep operations in-house and bring in a partner for the security review or the initial hardening. A useful test is whether your team can explain, from its own runbook, how an image moves from a user's browser through the proxy to the model and back, and how it is deleted.
How long does a vision model pilot take?
The length of a pilot depends mainly on hardware availability and scope. If the GPU servers are already racked and approved, a narrow pilot with one model, one user group and a defined set of documents or photos can move quickly. If hardware must be procured, or if identity, logging and retention reviews must finish first, the calendar is set by those steps rather than by the software install. Ollama itself is quick to start, but a pilot you intend to keep needs a written plan for hardening and testing. Ask for a timeline in the fixed scope with dependencies listed, and confirm which items are blocked by hardware delivery or internal approvals.
Does the engagement include security testing of the image workflow?
It can, when the scope includes it. A private vision deployment should be tested for how the API handles unexpected inputs, whether an unauthenticated user can reach the model through a misconfigured bind address or proxy, and whether images or responses are written to logs where they should not be. DeployOpen runs security testing for applications, APIs, cloud and infrastructure, and AI systems, and can include these checks in the scope agreed in writing. Ask the partner which tests are included, what the findings report contains and whether a retest is part of the fixed scope.
Does a private vision deployment help with compliance reviews?
It can make reviews easier because the data stays in infrastructure you control, and Ollama states that when it runs locally it does not see your prompts or data. That statement describes the software, not your whole program. Auditors will still ask for access control, logging, retention, change control and patching evidence. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those decisions, so confirm with your assessor which evidence they require before the build starts.
Security and operational risks for image data
Images often carry more sensitive detail than text prompts: faces, documents, account numbers and location data. The risks below come from how Ollama exposes its API, where it can reach outside the server, and where uploaded content may persist, so each one needs a named owner and a check before images reach the service.
Unauthenticated local API
The local API at port 11434 does not require authentication, so anyone who can reach the listener can send images and read responses. Ollama binds to 127.0.0.1 by default, and changing OLLAMA_HOST to expose it on a network interface removes that protection unless something else enforces access. Put a reverse proxy in front of the API that enforces SSO and per-user access, and confirm that port 11434 is closed to every other network segment. The listener address is the first control to verify.
Ollama FAQCloud features for sensitive images
Direct cloud inference at ollama.com/api and ollama.com/v1 sends requests to Ollama's service and requires an API key. For photos, scanned forms or identity documents, that path moves image data outside your infrastructure. Set OLLAMA_NO_CLOUD=1 on the server, or disable cloud features in the server configuration file, and confirm that no client is configured with a cloud endpoint or key. Ask your team to test this with a sample image and capture network traffic to show no outbound request is made.
Retention in logs and temporary storage
An image sent through the API is base64-encoded in the request body, and that payload can end up in server logs, proxy access logs, crash dumps or temporary files on disk. Each copy is a retention decision that the default configuration does not make for you. Review what your reverse proxy and application logs record for request bodies, set a retention period for each log store, and restrict read access to them. Ask the platform team to show where a single uploaded image is written and when it is removed.
Model provenance for vision weights
A vision model pulled from a public registry is a multimodal model with a language component and an image encoder, and both need the same provenance review as a text model. Confirm the source, checksum and license of each model file, and keep approved weights in an internal catalog rather than pulling them on demand. Note that the model license governs use, separate from Ollama's MIT license, and review it before any image workload goes live.
Browser origin exposure
Browser-based front ends that call the Ollama API from another origin depend on the server's origin and CORS settings, which decide which web pages can send images to the service. A malicious page open in the same browser could attempt requests to a locally running server if origins are not restricted. Limit allowed origins to the specific front end your users run, and test the setting from an unlisted origin. Ask the security team to include this in the review of the proxy configuration.
Patching against frequent releases
Ollama ships releases often, and the GitHub releases page lists v0.40.5, released on 14 October 2026, and v0.40.6, published as a pre-release on 16 October 2026. Vision handling and image decoding change between versions, so pin the version you tested and schedule a retest before every upgrade. Track pre-releases separately from stable releases, and record which build each server runs. The version in production must match the version your image tests passed on.
Ollama releasesWhat DeployOpen scopes for a private vision deployment
DeployOpen plans and implements Ollama inside your own infrastructure, so image data stays on servers you control. For a vision deployment, the scope starts with sizing against your actual image workload: the image resolution and volume, how many users or services send requests at once, and which vision models your teams need. Those answers drive the GPU memory plan, the OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS settings, and whether a single host or a small pool of GPU nodes fits. Ollama binds to 127.0.0.1 on port 11434 by default and its local API has no authentication, so the scope also covers putting a reverse proxy with authentication, TLS and logging in front of it before any application connects.
The scope also covers model storage, since vision model files are large and need a planned location through OLLAMA_MODELS, along with an approved model list, backup of the model store and a process for adding or replacing models. Logging of who sent which requests and when, and records of how the access controls were configured, form the evidence your security and compliance teams will ask for. DeployOpen prepares that evidence and the controls behind it, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations, so ask early which artifacts your auditor expects.
Most engagements are fixed-scope: the scope, deliverables and timeline are agreed in writing before work starts, and a quote follows from that written scope. Ongoing support, upgrades and continuous testing are available as a retainer, which suits teams that expect new vision models and Ollama releases to arrive regularly. Ask any provider, including DeployOpen, to put in the written scope which hardware is covered, who owns model approvals and who answers production incidents.
How DeployOpen delivers and supports vision model work on Ollama
DeployOpen plans, builds and supports private image processing on Ollama inside infrastructure you control. Each engagement starts with a written scope that names the vision models, image sources, interfaces and GPU capacity involved, so the work can be reviewed before it begins.
How we scope
- Confirm which vision models, image formats and document or photo use cases the written scope covers
- Map which applications or users send images through the CLI, the REST API or the Python and JavaScript SDKs
- Record where images are stored, how long they persist and which GPU memory budget the workload needs
How we build
- Configure Ollama to listen only on the internal interface set through OLLAMA_HOST, with access controls placed in front of it
- Build and test the base64 images request path, including file size limits and rejection of unexpected input types
- Tune OLLAMA_NUM_PARALLEL and OLLAMA_MAX_QUEUE against measured image request load on your hardware
How we hand over
- Document the model list, memory sizing results, request examples and the configuration values chosen for your environment
- Provide test images and expected outputs so your team can repeat the verification steps after handover
- Explain the data handling position, including that local runs do not send prompts or data to Ollama, and how cloud features are disabled
How we support
- Available as a retainer covering upgrades, retesting after new Ollama releases and changes to vision models
- Review the release notes before any version change, since releases ship frequently and need to be tested first
- Confirm support response expectations, escalation paths and change control in the written agreement before work starts

