API Reference

Chat endpoint documentation with examples.
POST
/api/chat
Send a chat message and receive a response from Stack 3.0.
Request Body
{
  "messages": [
    { "role": "user", "content": "Hello" }
  ],
  "email": "user@example.com"  // optional, for auth
}
Response
{
  "role": "assistant",
  "content": "Hello! I'm Stack 3.0...",
  "remaining": 29,
  "isPro": false
}
Status Codes
200 — Success
429 — Rate limit reached (30 req/day free)
500 — Server error
Rate Limits
Free tier: 30 requests per day per IP. Pro tier: unlimited. Rate limit responses include a remaining field showing requests left.