Skip to main content
The /v1/metrics/summary endpoint gives you all of your core usage metrics in a single call — perfect for powering a dashboard. In this tutorial you’ll fetch your metrics and print a small summary.

Step 1 — Get your API key

Create an API key in your dashboard: https://swarms.world/platform/api-keys

Step 2 — Add it to .env

Step 3 — Fetch your metrics

Step 4 — Render the dashboard tiles

Pull the headline numbers out of the response and compute a success rate. These are the values you’d wire into dashboard cards.
Example output:

What you get back

For a full field reference and use cases, see the User Metrics Summary capability page.