---
title: Quickstart
description: From zero to your first agent run in under a minute.
section: getting-started
order: 1
---

# Quickstart

Capture your first agent run in 60 seconds. Create a team, drop in one of the
paths below, and watch the run land in your dashboard.

## 1. Get your API key

Create a team at [agentping.io/register](/register), choose `eu` or `us` data
residency, and copy your key from the agent settings page:

- `apk_<region>_...`: team API key, for the SDK.
- `ping_<region>_...`: per-agent token, safe in URLs (cron, curl). See [Authentication](/docs/api/auth).

## Pick your path

There are two ways to send your first run. Pick the one that matches how your
agent runs today; you can mix and match later.

- **Path A** if you call Anthropic or OpenAI from your own code.
- **Path B** if your agent is a scheduled job with no SDK, or anything else
  that can make an HTTP call.

## Path A: SDK auto-instrumentation

Install the SDK, call `init()`, and instrument your provider. Every Anthropic
or OpenAI call inside a run is captured automatically, with tokens, latency,
and cost.

:::codetabs
```bash
pip install "agentping-sdk @ git+https://github.com/agent-ping/agent-ping-python.git"
```
```bash
npm install github:agent-ping/agent-ping-typescript
```
:::

Then put your team key in the environment the agent runs in:

```bash
export AGENTPING_API_KEY=apk_eu_...   # the team key from step 1
```

:::codetabs
```python
import agentping, anthropic

agentping.init()                  # reads AGENTPING_API_KEY
agentping.instrument_anthropic()  # capture every Anthropic call

client = anthropic.Anthropic()
with agentping.run("support-triage", customer_id="acme",
                   goal="Triage the ticket and route it to the right queue"):
    client.messages.create(
        model="claude-sonnet-4-5",
        max_tokens=512,
        messages=[{"role": "user", "content": "summarise this ticket"}],
    )
```
```typescript
import * as agentping from "@agentping/sdk";
import Anthropic from "@anthropic-ai/sdk";

agentping.init();                  // reads AGENTPING_API_KEY

const run = agentping.run("support-triage", {
  customerId: "acme",
  goal: "Triage the ticket and route it to the right queue",
});
const client = agentping.instrumentAnthropic(new Anthropic(), { run });

await client.messages.create({
  model: "claude-sonnet-4-5",
  max_tokens: 512,
  messages: [{ role: "user", content: "summarise this ticket" }],
});
await run.finish({ status: "success" });
```
:::

The run closes when the block exits. The `goal` is optional but worth
setting: it tells evaluations what the run was supposed to achieve, and
the review is much sharper with it.

**Check it landed:** open your dashboard and look at the activity feed. You
should see one run named `support-triage` with status `ok`, a token count, and
a cost figure, usually within a second of the block exiting. If it is there,
you are done; Spend is attributing cost and Pulse is tracking freshness from
this point on. If it is not, check that `AGENTPING_API_KEY` is set in the
process that ran the agent.

Calling a different provider, or going through a framework? Report the call
yourself with `r.event("llm_call", {...})` (the token counts are on the
response object your provider returns) and cost is computed server-side from
the same rate card. See [Runs and events](/docs/concepts/runs-and-events).

## Path B: Webhook heartbeats

No SDK, or a scheduled job that just needs to prove it ran? Send one HTTP call
per run with a `ping_` token. Everything goes in the query string, so it drops
straight into a cron line, an n8n HTTP node, or a CI step. The response is `OK`.

```bash
curl 'https://eu.ingest.agentping.io/v1/ping?key=ping_eu_...&agent=nightly-report&status=ok'
```

Send `eu` or `us` credentials to the matching region host. For a richer payload
(cost, timestamps, metadata) use the JSON [POST /v1/heartbeats](/docs/api/heartbeats).

**Check it landed:** the curl response is `OK`, and the dashboard activity
feed shows a run named `nightly-report` with status `ok` and the timestamp the
ping arrived. That single line is your heartbeat baseline; once you set the
agent's expected schedule, Pulse pages you when a window passes silently.

A missed call inside the expected schedule window raises a freshness alert in
Pulse. See [curl](/docs/integrations/curl), [cron](/docs/integrations/cron),
[GitHub Actions](/docs/integrations/github-actions), [n8n](/docs/integrations/n8n),
[Make](/docs/integrations/make), [Zapier](/docs/integrations/zapier), and
[Claude Routines](/docs/integrations/claude-routines).

Next: [Runs and events](/docs/concepts/runs-and-events) for the data model.
