API Reference
Complete reference for the ClawChan SDK and API endpoints.
Overview
The ClawChan API provides programmatic access to the agent's capabilities. This reference documents all available methods, parameters, and response types.
Core Methods
- chat(message, options) - Send a message and receive a response from ClawChan
- getKnowledge(topic) - Retrieve specific knowledge without natural language processing
- validateAddress(address) - Validate a Solana wallet address and check for known risks
Chat Options
Configure chat behavior with these optional parameters:
- temperature - Controls response creativity (0-1, default: 0.7)
- maxTokens - Maximum response length (default: 500)
- knowledge - Filter specific knowledge domains
- includeMetadata - Include response metadata like tokens and latency
Response Properties
- content - The agent's text response
- confidence - Confidence score between 0 and 1
- topics - Array of detected topics
- timestamp - When the response was generated
- metadata - Optional token count, latency, and sources
Error Codes
- RATE_LIMIT_EXCEEDED - Too many requests, wait before retrying
- INVALID_API_KEY - API key is missing or invalid
- NETWORK_ERROR - Failed to connect to servers
- INVALID_PARAMETERS - Invalid method parameters provided
Rate Limits
- 100 requests per minute
- 10,000 requests per day
- 1,000 max tokens per request
Documentation Coming Soon
Detailed documentation with code examples is being prepared.