Bickford.pro

API

Interact with the AI chat agent programmatically.

Endpoint

POST https://ai.bickford.pro/api/chat

Request

Send a JSON body with an array of chat messages.

{
  "messages": [
    { "role": "user", "content": "Hello" },
    { "role": "assistant", "content": "Hi there! How can I help?" },
    { "role": "user", "content": "What is the weather today?" }
  ]
}

Message Roles

  • user: Messages from the user
  • assistant: Responses from the AI
  • tool: Tool execution results

Response

The server responds with a newline-delimited JSON stream.

{"type":"assistant","delta":"Hello!"}
{"type":"assistant","delta":" I can help you with that."}
{"type":"done"}

Example

curl -X POST https://ai.bickford.pro/api/chat \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello"}]}'

Limits

  • Maximum 60 messages per request
  • Maximum 12,000 characters per message
  • 3 requests per minute (sliding window)
  • 20 requests per hour (sliding window)
  • Rate limited by IP address