📡 Claude API Documentation

Model: Opus 4.5

Authentication

Include your API token in requests:

Authorization: Bearer YOUR_TOKEN

Or as query param: ?token=YOUR_TOKEN

Endpoints

POST/api/message

Send a message to Claude

{
  "message": "Hello Claude!",
  "image": "base64..."  // optional
}

Response: Streaming text

GET/api/status

Check API status and your usage

{
  "ok": true,
  "busy": false,
  "usage": {"today": 5, "limit": 100}
}
POST/api/newchat

Start a fresh conversation

Example (Python)

import requests

API = "http://localhost:5000"
TOKEN = "your-api-token"

# Send message
r = requests.post(f"{API}/api/message",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={"message": "Hello!"},
    stream=True)

for chunk in r.iter_content(decode_unicode=True):
    print(chunk, end="", flush=True)

Rate Limits

Default: 10 requests/minute, 100 requests/day