SweetPilot SweetPilot by EXLAC
Back to Home

API Documentation

Build powerful integrations with the SweetPilot REST API.

Quick Start

1. Get API Key

Generate an API key from your dashboard settings.

2. Make Requests

Use our REST API with any language or HTTP client.

3. Automate

Start interacting with AI employees programmatically.

Base URL

All API requests should be made to:
https://sweetpilot.com/api/v1

Authentication

All API requests require authentication using a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can generate an API key from your dashboard settings.

Keep your API key secure. Never expose it in client-side code or public repositories.

Endpoints

GET/v1/healthCheck that the API is reachable
GET/v1/employeesList the AI employees with their id, name, role and description
POST/v1/employees/:id/chatSend a message to one AI employee and get its reply. Add ?stream=true to receive it as a stream
POST/v1/employees/:id/chat-with-fileThe same, with a file attached (multipart form with "message" and "file")
POST/v1/brain/askAsk a question that is answered from your Brain AI knowledge base
GET/v1/workflowsList your Canvas workflows
POST/v1/workflows/:id/runStart a Canvas workflow. A run costs 3 credits
GET/v1/workflows/:id/runs/:runIdCheck the status of a run

Code Example

example.ts
// Using the SweetPilot REST API
const API_KEY = process.env.SWEETPILOT_API_KEY;

// List the AI employees
const employees = await fetch('https://sweetpilot.com/api/v1/employees', {
  headers: { 'Authorization': `Bearer ${API_KEY}` },
}).then((res) => res.json());

// Chat with an AI employee (Ink is the copywriter)
const response = await fetch('https://sweetpilot.com/api/v1/employees/ink/chat', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json',
    // Optional: makes a retry safe. The same key replays the first reply.
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    message: 'Write a two sentence description for a stainless steel water bottle',
  }),
});

console.log(await response.json());

// Each request stands on its own. To continue a conversation, send the
// earlier turns as a "messages" array instead of a single "message".

Rate Limits

LimitRequests/minApplies to
Each API key120Every plan
One IP address to one endpoint100Every plan

Get Started

Sign up for SweetPilot, generate your API key, and start building integrations today.

Get Started