Integrate AI-powered customer service into your applications
Get started with ClawCuber API in 3 simple steps:
Sign up at claw.zzdv.com, create an Agent, and generate an API key from the dashboard.
curl -X POST https://claw.zzdv.com/v1/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, how can you help me?"
}'
{
"reply": "Hi! I'm here to help. What can I do for you today?",
"conversation_id": "api_abc123",
"tokens_in": 8,
"tokens_out": 15
}
All API requests require authentication using Bearer tokens:
Authorization: Bearer sk_live_your_api_key_here
Keep your API keys secure and never expose them in client-side code.
/v1/chat
Send a message to your AI agent
Request body:
{
"message": "Your message here",
"conversation_id": "optional_session_id" // For multi-turn conversations
}
Response:
{
"reply": "AI response",
"conversation_id": "session_id",
"tokens_in": 10,
"tokens_out": 25
}
/v1/conversations
List all conversations
Query parameters: ?limit=20
Response:
[
{
"conversation_id": "api_abc123",
"message_count": 5,
"created_at": "2026-03-17T10:00:00Z",
"last_message_at": "2026-03-17T10:05:00Z"
}
]
/v1/usage
Get API usage statistics
Response:
{
"api_key_name": "Production Key",
"total_tokens_in": 1500,
"total_tokens_out": 3200,
"total_requests": 150,
"rate_limit": 100,
"created_at": "2026-03-01T00:00:00Z",
"last_used_at": "2026-03-17T10:00:00Z"
}
import requests
API_KEY = "sk_live_your_api_key"
BASE_URL = "https://claw.zzdv.com"
def chat(message, conversation_id=None):
response = requests.post(
f"{BASE_URL}/v1/chat",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"message": message, "conversation_id": conversation_id}
)
return response.json()
# Single message
result = chat("Hello!")
print(result["reply"])
# Multi-turn conversation
conv_id = None
for msg in ["Hi", "What's the weather?", "Thanks!"]:
result = chat(msg, conv_id)
conv_id = result["conversation_id"]
print(f"User: {msg}")
print(f"AI: {result['reply']}\n")
const axios = require('axios');
const API_KEY = 'sk_live_your_api_key';
const BASE_URL = 'https://claw.zzdv.com';
async function chat(message, conversationId = null) {
const response = await axios.post(
`${BASE_URL}/v1/chat`,
{ message, conversation_id: conversationId },
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
return response.data;
}
// Usage
(async () => {
const result = await chat('Hello!');
console.log(result.reply);
})();
# Single message
curl -X POST https://claw.zzdv.com/v1/chat \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"message": "Hello!"}'
# Multi-turn conversation
curl -X POST https://claw.zzdv.com/v1/chat \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"message": "Follow-up question", "conversation_id": "api_abc123"}'
API keys have rate limits to ensure fair usage:
When you exceed the rate limit, you'll receive a 429 Too Many Requests response.
| Code | Description |
|---|---|
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid or missing API key |
404 |
Not Found - Agent or resource doesn't exist |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error - Something went wrong |