AgencyAPI Documentation

API Reference

Cameron API Documentation

Integrate Cameron's AI intelligence into your applications

Base URLhttps://api.waymaker.cx/api/v1

Authentication

All API requests require an API key passed in the Authorization header. API keys use the wm_live_ prefix.

Authorization Header
Authorization: Bearer wm_live_YOUR_KEY

Getting 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.

POST/cameron/chat

Chat with Cameron AI. Supports streaming (SSE) and JSON response modes.

Request Body

ParameterTypeRequiredDefaultDescription
messagestringYesUser message to Cameron
product_plan_idstringNonullProduct context ID
historyarrayNonullPrevious messages [{role, content}] (max 10)
context_tierstringNo"standard"Context depth: minimal, standard, deep
streambooleanNotrueSSE streaming or JSON response
user_idstringNonullClient user_id (must belong to agency)

Streaming Response

When stream is true (default), the response is delivered as Server-Sent Events (SSE).

SSE Event Types
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.

JSON Response (stream=false)
{
  "response": "Here's my analysis...",
  "usage": {"tokens_estimated": 150}
}

Code Examples

curl
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.

JavaScript (SSE Streaming)
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);
    }
  }
}
GET/cameron/health

Simple health check endpoint. No authentication required.

Response
{
  "status": "ok",
  "service": "cameron-api",
  "version": "1.0.0"
}

Error Codes

CodeMeaning
401Invalid or revoked API key
403API key lacks required permission, or user_id not in agency
400Could not resolve user context
429Rate limit exceeded (60 req/min per key)
500Cameron 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 window
X-RateLimit-ResetUnix timestamp when the window resets

When rate limited

You will receive a 429 status code with a Retry-After header indicating the number of seconds to wait before retrying.

Ready to integrate?

Get your API key and start building with Cameron in minutes.