Skip to main content
Ollama

Call your Ollama models from anywhere.

Keep Ollama on your machine and off the public internet. Your apps reach it through the same gateway as every other model.

your app
gateway.ngrok.ai
ollama.internal
private to your ngrok account
your machine · no inbound ports
localhost:11434
Setup

Set it up in four steps.

  1. Start Ollama

    Run the server.

    ollama serve

    In a second terminal, pull a model.

    ollama pull llama3.2
  2. Give it a private URL

    An internal endpoint is reachable from your ngrok account only. Nothing on your machine opens to the internet.

    ngrok http 11434 --url https://ollama.internal
  3. Add it as a provider

    In app.ngrok.ai, create a custom provider with these values, then allow it on your access key.

    Provider ID
    ollama
    Base URL
    https://ollama.internal
    Model
    llama3.2
  4. Call it

    Use any OpenAI-compatible SDK. Add a hosted model as a fallback for when your machine can’t answer.

    import OpenAI from "openai"; const client = new OpenAI({	baseURL: "https://gateway.ngrok.ai/v1",	apiKey: process.env.NGROK_AI_ACCESS_KEY,}); const completion = await client.chat.completions.create({	model: "ollama:llama3.2",	// If your machine is off or overloaded, try a hosted model next	models: ["openai:gpt-5.4"],	messages: [{ role: "user", content: "Hello!" }],});

Not using Ollama?

The same steps work for vLLM, LM Studio, and any server that speaks the OpenAI API.

Use a model you run yourself

Ship with the model you already run.