This Space provides API endpoints for Ollama model management and inference.
List all available models
Pull a model from Ollama
Body: {"name": "model_name"}
Generate text using a model
Body: {"model": "model_name", "prompt": "your prompt"}
Health check endpoint
You can use this API with OpenWebUI or any other client that supports REST APIs.
# List models
curl https://your-space-url.hf.space/api/models
# Generate text
curl -X POST https://your-space-url.hf.space/api/generate -H "Content-Type: application/json" -d '{"model": "llama2", "prompt": "Hello, how are you?"}'