API Documentation
Chat with a Character
POST /api/v1/chat
Content-Type: application/json
{
"api_key": "your_key_here",
"character_id": 1,
"player_id": "player_xyz",
"message": "Hello there"
}
Response:
{
"reply": "Arr matey!",
"character_name": "Captain Byte",
"should_speak": false,
"new_goal": ""
}
List Characters
GET /api/v1/characters?api_key=your_key_here
Health Check
GET /health
Python Example
import requests
r = requests.post("https://yourdomain.com/api/v1/chat", json={
"api_key": "your_key_here",
"character_id": 1,
"player_id": "player_xyz",
"message": "Where is the treasure?"
})
print(r.json()["reply"])
Limits
Max message: 1000 characters
Max characters: 10 per account
Messages stored: 1000 per character