Skip to main content
Access comprehensive logs of all your API requests and swarm executions. The /v1/swarm/logs endpoint provides detailed information about your API usage history, including request timestamps, status codes, and execution details.
Logs are filtered to exclude any entries containing client IP addresses for privacy protection. Access is limited to logs associated with your API key.

Quick Start

Understanding Log Response

The logs endpoint returns structured information about your API usage. Each log entry is a stored record with a category (e.g. completion) and a data payload containing the completion response that was logged:
The top-level count field is always returned as null — compute the number of entries from len(logs) (or logs.length in JavaScript) instead. The shape of data depends on what was logged: agent completions carry usage.total_cost, while swarm completions carry usage.billing_info.total_cost, swarm_name, and execution_time. Entries containing client IP data, telemetry, and raw request inputs are excluded.

Log Analysis and Filtering

Log Export and Backup

Log Monitoring Dashboard

Privacy and Security

Data Protection

  • IP Address Filtering: All client IP addresses are automatically filtered from logs
  • PII Protection: Personal identifiable information is not logged
  • Secure Storage: Logs are stored securely with encryption at rest
  • Access Control: Only accessible via your API key

Compliance

  • GDPR Compliant: Adheres to data protection regulations
  • Audit Trail: Maintains complete audit trail of API usage
  • Data Retention: Logs retained for compliance and debugging purposes
  • Access Logging: All log access is itself logged for security

Best Practices

Log Management

  1. Regular Monitoring: Check logs regularly for unusual patterns
  2. Error Analysis: Investigate error spikes promptly
  3. Cost Tracking: Monitor API costs and optimize usage
  4. Performance Analysis: Track response times and identify bottlenecks
  5. Security Monitoring: Watch for unauthorized access attempts

Data Analysis

  1. Trend Analysis: Identify usage patterns and growth trends
  2. Error Pattern Recognition: Detect recurring issues
  3. Cost Optimization: Find opportunities to reduce API costs
  4. Performance Optimization: Identify slow endpoints and optimize
  5. Capacity Planning: Plan for future usage growth

Automation

  1. Alert Setup: Set up alerts for high error rates or costs
  2. Automated Reports: Generate regular usage reports
  3. Anomaly Detection: Automatically detect unusual patterns
  4. Cost Controls: Implement automatic cost limiting
  5. Performance Monitoring: Continuous performance tracking

Troubleshooting

Common Issues

Empty Logs Response
Missing Log Entries
  • Logs are filtered for privacy (no IP addresses)
  • Some requests may not be logged due to high volume
  • Check your API key permissions
Performance Issues
Cost Analysis