Version Endpoint — Ollama Toolkit 0.1.9 documentation

# Version Endpoint

This document explains how to retrieve the current version of the Ollama server and confirms the Ollama Toolkit client is at v0.1.9.

## Endpoint

    GET /api/version

Returns JSON containing the server’s version details.

## Example

    curl http://localhost:11434/api/version

Expected output:

    {
      "version": "0.1.11"
    }

(Ollama Toolkit v0.1.9 is compatible with Ollama server >= 0.1.11.)

### Python Usage Example

    from ollama_toolkit import OllamaClient

    client = OllamaClient()

    version_info = client.get_version()
    print(f"Connected to Ollama server version: {version_info['version']}")

## Async Example

    import asyncio
    from ollama_toolkit import OllamaClient

    async def get_version_async():
        client = OllamaClient()
        version_info = await client.aget_version()
        print(f"Async - Connected to Ollama version: {version_info['version']}")

    # Run the async function
    asyncio.run(get_version_async())