API Reference
Cameron API Documentation
Integrate Cameron's AI intelligence into your applications
https://api.waymaker.cx/api/v1Authentication
All API requests require an API key passed in the Authorization header. API keys use the wm_live_ prefix.
Authorization: Bearer wm_live_YOUR_KEYGetting your API key
Navigate to app.waymaker.cx/white-label and open the API Access tab to generate your key. Keep your key secret and never expose it in client-side code.
/cameron/chatChat with Cameron AI. Supports streaming (SSE) and JSON response modes.
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
message | string | Yes | — | User message to Cameron |
product_plan_id | string | No | null | Product context ID |
history | array | No | null | Previous messages [{role, content}] (max 10) |
context_tier | string | No | "standard" | Context depth: minimal, standard, deep |
stream | boolean | No | true | SSE streaming or JSON response |
user_id | string | No | null | Client user_id (must belong to agency) |
Streaming Response
When stream is true (default), the response is delivered as Server-Sent Events (SSE).
data: {"type": "text", "text": "Here's my analysis..."}
data: {"type": "tool_call", "tool": "web_search"}
data: {"type": "tool_result", "tool": "web_search"}
data: {"type": "done", "text": "Full response..."}
data: [DONE]JSON Response
When stream is false, the full response is returned as a single JSON object.
{
"response": "Here's my analysis...",
"usage": {"tokens_estimated": 150}
}Code Examples
curl -X POST https://api.waymaker.cx/api/v1/cameron/chat \
-H "Authorization: Bearer wm_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Analyze my competitive landscape", "stream": false}'SSE Streaming Example
Use the Fetch API with a ReadableStream to consume SSE events from a POST request.
const response = await fetch("https://api.waymaker.cx/api/v1/cameron/chat", {
method: "POST",
headers: {
"Authorization": "Bearer wm_live_YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ message: "What should I build next?" })
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const text = decoder.decode(value);
// Parse SSE lines: "data: {...}\n\n"
for (const line of text.split("\n")) {
if (line.startsWith("data: ") && line !== "data: [DONE]") {
const event = JSON.parse(line.slice(6));
if (event.type === "text") process.stdout.write(event.text);
}
}
}/cameron/healthSimple health check endpoint. No authentication required.
{
"status": "ok",
"service": "cameron-api",
"version": "1.0.0"
}Error Codes
| Code | Meaning |
|---|---|
401 | Invalid or revoked API key |
403 | API key lacks required permission, or user_id not in agency |
400 | Could not resolve user context |
429 | Rate limit exceeded (60 req/min per key) |
500 | Cameron processing failed |
Rate Limits
API requests are rate limited to 60 requests per minute per API key.
Response Headers
X-RateLimit-LimitMaximum requests per window (60)X-RateLimit-RemainingRequests remaining in current windowX-RateLimit-ResetUnix timestamp when the window resetsWhen rate limited
You will receive a 429 status code with a Retry-After header indicating the number of seconds to wait before retrying.