Blossom API Access

Generate your API key to integrate our powerful engagement agents

Generate New API Key

Give your API key a memorable name for reference

Your API Keys

Name Created Last Used Status Actions
rrr 2025-03-21 02:46 2025-03-21 03:41 Inactive
Current 2025-04-02 00:16 Never Inactive
test 2025-04-01 23:30 Never Inactive

API Playground

Test your API key with our sample endpoints

API Endpoint URLs

Complete POST URLs for all available endpoints

Generate Response
POST https://[your-domain]/api/v1/generate
Analyze Engagement
POST https://[your-domain]/api/v1/analyze
Agent Interaction
POST https://[your-domain]/api/v1/agents/{agent_id}/interact
Behavioral Monitoring
POST https://[your-domain]/api/v1/monitor/behavior

API Endpoints Reference

Realtime Connection

URL
wss://api.openai.com/v1/realtime
Query Parameters

model

Realtime model ID to connect to, like gpt-4o-realtime-preview-2024-12-17

Headers
Authorization: Bearer YOUR_API_KEY

OpenAI-Beta: realtime=v1

Substitute YOUR_API_KEY with a standard API key on the server, or an ephemeral token on insecure clients (note that WebRTC is recommended for this use case).

This header is required during the beta period.

Sample Code
import WebSocket from "ws";

const url = "wss://api.openai.com/v1/realtime?model=gpt-4o-realtime-preview-2024-12-17";
const ws = new WebSocket(url, {
  headers: {
    "Authorization": "Bearer " + process.env.OPENAI_API_KEY,
    "OpenAI-Beta": "realtime=v1",
  },
});

ws.on("open", function open() {
  console.log("Connected to server.");
});

ws.on("message", function incoming(message) {
  console.log(JSON.parse(message.toString()));
});

Generate Response

URL
https://[your-domain]/api/v1/generate
Query Parameters

agent

Agent type to use for generation (e.g., motivation_mapping, habit_formation)

Headers
Authorization: Bearer YOUR_API_KEY

Content-Type: application/json

Substitute YOUR_API_KEY with the API key generated from your account.

Sample Code
import axios from 'axios';

const apiKey = 'YOUR_API_KEY';
const url = 'https://[your-domain]/api/v1/generate?agent=motivation_mapping';

async function generateResponse() {
    try {
        const response = await axios.post(url, {
            prompt: 'What motivates successful community engagement?'
        }, {
            headers: {
                'Authorization': `Bearer ${apiKey}`,
                'Content-Type': 'application/json'
            }
        });
        console.log(response.data);
    } catch (error) {
        console.error('Error:', error.response?.data || error.message);
    }
}

generateResponse();

Analyze Engagement

URL
https://[your-domain]/api/v1/analyze
Query Parameters

user_id

User identifier for engagement analysis

timeframe

Analysis timeframe (e.g., last_7_days, last_30_days)

Headers
Authorization: Bearer YOUR_API_KEY

Content-Type: application/json

Substitute YOUR_API_KEY with the API key generated from your account.

Sample Code
import axios from 'axios';

const apiKey = 'YOUR_API_KEY';
const url = 'https://[your-domain]/api/v1/analyze?user_id=example_user&timeframe=last_7_days';

async function analyzeEngagement() {
    try {
        const response = await axios.post(url, {
            metrics: ['participation', 'consistency']
        }, {
            headers: {
                'Authorization': `Bearer ${apiKey}`,
                'Content-Type': 'application/json'
            }
        });
        console.log(response.data);
    } catch (error) {
        console.error('Error:', error.response?.data || error.message);
    }
}

analyzeEngagement();

Using Your API Key

Include your API key in the Authorization header of your requests:

Authorization: Bearer YOUR_API_KEY