🤖 AI API

Ollama Integration Service

Checking status...

📋 API Endpoints

GET /api/models

List all available Ollama models

GET /api/chats

List all chats

GET /api/chats?title=...&message=...

Create a new chat with query parameters

POST /api/chats

Create a new chat with JSON body

GET /api/chats/{id}/messages?message=...

Send a message to a chat

💡 Quick Examples

Create Chat with Query Params:

curl "https://ai.dhurgham.dev/api/chats?title=Test&message=Hello&model=llama3.2"

Create Chat with JSON:

curl -X POST "https://ai.dhurgham.dev/api/chats" \ -H "Content-Type: application/json" \ -d '{"title":"Test","message":"Hello","model":"llama3.2"}'

List Models:

curl "https://ai.dhurgham.dev/api/models"

📚 Features