Custom Integration
If you're using a platform not listed in our integration guides, you can integrate FlautoPsy with any application that can make HTTP requests.
Get Your Webhook URL
- Log in to FlautoPsy at https://flautopsy.stralocroft.com/dashboard
- Go to Settings → Setup (or /setup)
- Copy your unique webhook URL (looks like )texthttps://flautopsy.stralocroft.com/api/webhook?workspace_id=...
HTTP Request Format
Send a POST request to your webhook URL with the following JSON body:
URL
text
POST https://flautopsy.stralocroft.com/api/webhook?workspace_id=YOUR_WORKSPACE_ID Headers
text
Content-Type: application/json No authentication header is needed — your workspace ID is in the URL.
Request Body
json
{ "workflow_id": "string (required)", "prompt": "string (optional)", "output": "string (required)", "latency_ms": number (required), "cost_tokens": number (required), "model": "string (required)"} Field Definitions
| Field | Type | Required | Description | |-------|------|----------|-------------| |
text
workflow_idtext
"email-classifier"text
prompttext
outputtext
latency_mstext
cost_tokenstext
modeltext
"gpt-4"text
"claude-3-opus"Example: cURL
bash
curl -X POST https://flautopsy.stralocroft.com/api/webhook?workspace_id=YOUR_WORKSPACE_ID \ -H "Content-Type: application/json" \ -d '{ "workflow_id": "email-classifier", "prompt": "Classify this email as spam or not", "output": "not-spam", "latency_ms": 245, "cost_tokens": 1250, "model": "gpt-4" }' Replace
text
YOUR_WORKSPACE_IDExample: Python
python
import requestsimport time # Replace with your actual webhook URLwebhook_url = "https://flautopsy.stralocroft.com/api/webhook?workspace_id=YOUR_WORKSPACE_ID" # Your LLM call happens herestart_time = time.time()output = "not-spam" # Your LLM resultlatency_ms = int((time.time() - start_time) * 1000) # Send to FlautoPsypayload = { "workflow_id": "email-classifier", "prompt": "Classify this email as spam or not", "output": output, "latency_ms": latency_ms, "cost_tokens": 1250, "model": "gpt-4"} response = requests.post(webhook_url, json=payload)print(response.status_code) # Should be 200 Example: Node.js
javascript
const fetch = require('node-fetch'); async function sendToFlautoPsy() { const webhookUrl = 'https://flautopsy.stralocroft.com/api/webhook?workspace_id=YOUR_WORKSPACE_ID'; const payload = { workflow_id: 'email-classifier', prompt: 'Classify this email as spam or not', output: 'not-spam', latency_ms: 245, cost_tokens: 1250, model: 'gpt-4' }; const response = await fetch(webhookUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); console.log(response.status); // Should be 200} Response Format
On success, you'll receive a 200 OK response:
json
{ "success": true, "trace_id": "trace_abc123def456", "message": "Trace recorded"} Error Responses
- 400 Bad Request — Missing required fields or invalid JSON
- 401 Unauthorized — Invalid workspace ID
- 429 Too Many Requests — Rate limit exceeded (contact support for limits)
- 500 Server Error — FlautoPsy internal error (rare)
Best Practices
- Send traces as soon as possible after your LLM call completes
- Use a consistent for the same workflow (don't change it)textworkflow_id
- Don't retry failed requests indefinitely — if a request fails after 3 attempts, log it and move on
- Measure latency accurately — use server-side timestamps, not client-side
- Truncate long outputs to avoid oversized payloads (max 10,000 chars recommended)
Monitoring Traces
Once you've sent at least 10 traces:
- Go to FlautoPsy dashboard → Workflows
- Click your workflow to see:
- Individual traces (Traces tab)
- Alerts triggered (Alerts tab)
- Baseline stats (Overview tab)
Troubleshooting
"405 Method Not Allowed"
- Ensure you're using POST, not GET or PUT
"400 Bad Request"
- Check that the JSON is valid (use a JSON validator)
- Verify all required fields are present
- Ensure andtextlatency_msare numberstextcost_tokens
Traces not appearing
- Confirm the HTTP response status is 200
- Check that is consistent across requeststextworkflow_id
- Wait 5-10 seconds and refresh the dashboard
Rate limit exceeded
- Contact support@stralocroft.com to discuss your usage pattern
- Consider batching multiple traces into a single request (max 10 per batch)
Next Steps
- View your traces
- Learn about baselines
- Check the API reference for more endpoints