Agents

Quick start

Get an API key and make your first Agents API call.

1) Get an API key

To call the Agents API, you need a project-scoped API key:

Don’t have an account yet? Start a free 14-day trial: app.calypso.ms/signup
  1. Sign in to Calypso
  2. Go to Settings → API Keys
  3. Create a new API key
Treat API keys like passwords. Do not commit them to git or ship them to untrusted clients.

2) Make your first API call

This example uses the Responses endpoint with the Calypso Agent (recommended).

Python

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_CALYPSO_API_KEY",
    base_url="http://ai.calypso.day/v1"
)

resp = client.responses.create(
    model="calypso-agent",
    instructions=(
        "You are a Calypso routing agent. Draft WhatsApp-ready outputs and "
        "propose templates/campaigns as drafts when appropriate."
    ),
    input="Draft a WhatsApp template to confirm an appointment tomorrow at 10:00 for {{name}}."
)

print(resp.output_text)

JavaScript (Node.js)

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CALYPSO_API_KEY,
  baseURL: "http://ai.calypso.day/v1",
});

const resp = await client.responses.create({
  model: "calypso-agent",
  instructions:
    "You are a Calypso routing agent. Draft WhatsApp-ready outputs and propose templates/campaigns as drafts when appropriate.",
  input: "Draft a WhatsApp template to confirm an appointment tomorrow at 10:00 for {{name}}.",
});

console.log(resp.output_text);

cURL

curl -X POST "http://ai.calypso.day/v1/responses" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_CALYPSO_API_KEY" \
  -d '{
    "model": "calypso-agent",
    "instructions": "You are a Calypso routing agent. Draft WhatsApp-ready outputs and propose templates/campaigns as drafts when appropriate.",
    "input": "Draft a WhatsApp template to confirm an appointment tomorrow at 10:00 for {{name}}."
  }'

Next steps