API Reference

Public API v1 Usage

Usage analytics endpoints for API consumers.

Endpoints

EndpointMethodDescription
/v1/usage/summary?days=7GETDaily aggregates and totals
/v1/usage/events?limit=20GETRecent call events

Summary Example

curl -X GET "https://api.removebgvideo.com/v1/usage/summary?days=7" \
  -H "X-Api-Key: YOUR_API_KEY"

Events Example

curl -X GET "https://api.removebgvideo.com/v1/usage/events?limit=20" \
  -H "X-Api-Key: YOUR_API_KEY"

Notes

  • summary supports days=1..90
  • events supports limit=1..100
  • both endpoints require X-Api-Key

API Contract Notes

  • All clients should handle non-2xx responses as structured error payloads.
  • Use explicit JSON schema validation for request payloads on your side.
  • Treat output_url as an asynchronous artifact and not an immediate response contract.
  • Persist job lifecycle state transitions for auditing and support.

Integration Verification

CheckHow to Verify
AuthenticationCall endpoint with valid and invalid key, confirm 200 vs 401
Rate limitsBurst test and confirm 429 handling with backoff
IdempotencyRetry same request and verify no duplicate side effects
ObservabilityConfirm request_id/job_id appears in logs and dashboards

Usage Analytics Recommendations

  1. Aggregate usage by model and customer segment daily.
  2. Detect abnormal spikes in failed jobs or spend.
  3. Feed usage summary into quota/budget enforcement automation.