{
  "id": 5545793,
  "title": "Ollama API: A Practical Guide with Examples",
  "url": "https://urgent.news/2026/09/04/ollama-api-a-practical-guide-with-examples",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-04T11:35:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/amareswer/ollama-api-a-practical-guide-with-examples-4di9"
  },
  "original_language": "en",
  "account": "The Ollama API is a simple RESTful interface that runs on port 11434 when an Ollama installation is active. This server acts as the primary method for interacting with the installed models. The core endpoints for the API include:\n\n- `/api/generate`: Used for generating text based on a single prompt.\n- `/api/chat`: Supports chat conversations with message history and tool invocation.\n- `/api/embed`: Generates embeddings from input text.\n- `/api/tags`: Lists the installed models.\n- `/api/ps`: Shows the models currently loaded in memory.\n- `/api/pull`: Downloads a model to the local system.\n\nTo verify the server is operational, you can send a request to `curl http://localhost:11434/api/version`. The API can be accessed using the `curl` command with appropriate JSON payloads for each endpoint. For generating text, `/api/generate` is suitable for a single prompt, while `/api/chat` is more versatile for multi-turn conversations or tool calls. The default response format is streaming, returning newline-delimited JSON objects. However, you can set `stream` to `false` for a single response object. The API also supports options for customization, such as temperature, context window, and stopping sequences.",
  "summary": "Originally published on DevToolHub . Every Ollama install runs a local HTTP server on port 11434 , and that server is the real interface to the models. The ollama run command is a thin client on top of it. Once you know the two main endpoints, the streaming format, and the options object, you can wire a local model into any application. There is also an OpenAI-compatible route, so existing code…",
  "key_points": [
    "Ollama API runs on port 11434 for model interaction.",
    "Endpoints include generate, chat, embed, tags, ps, and pull.",
    "Default streaming response returns newline-delimited JSON objects."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}