Get started with Apidepth
Instrument your app once and get latency percentiles, error rates, rate limit tracking, and fleet benchmarks across every vendor API you call — measured from your server, not a probe running somewhere else.
Prerequisites
- An Apidepth API key — get one from the API keys page
Install the SDK
Choose your language. Each SDK auto-instruments your HTTP layer — no changes to existing request code. Follow the full setup guide on GitHub for configuration options, framework integrations, and troubleshooting.
Gemfile
gem "apidepth"Configure
Apidepth.configure do |c|
c.api_key = ENV["APIDEPTH_API_KEY"]
endpip
pip install apidepthConfigure
apidepth.configure(
api_key=os.environ["APIDEPTH_API_KEY"],
)
apidepth.instrument()npm
npm install apidepthConfigure
Apidepth.configure({
apiKey: process.env.APIDEPTH_API_KEY,
});
Apidepth.instrument();Guided setup (optional)
Each SDK ships a setup subcommand that walks you through configuration interactively — detects your framework, generates the correct initializer snippet, and optionally writes it to disk:
# Ruby
bundle exec apidepth setup
# Python
python -m apidepth setup
# JavaScript / TypeScript
npx apidepth setupFor CI/CD or AI-assisted environments, skip all prompts with flags:
# Ruby
bundle exec apidepth setup --api-key $APIDEPTH_API_KEY --no-prompt
# Python
python -m apidepth setup --api-key $APIDEPTH_API_KEY --no-prompt
# JavaScript / TypeScript
npx apidepth setup --api-key $APIDEPTH_API_KEY --no-promptSee the CLI reference for the full flag list including --framework, --ignored-hosts, and --collector-url.
Confirm connectivity
After installing, send a synthetic test event to confirm the SDK is wired up and can reach the collector. This event is never counted in your vendor data or alerts — it only triggers the dashboard confirmation banner.
# Ruby
bundle exec apidepth test
# Python
python -m apidepth test
# JavaScript / TypeScript
npx apidepth testOn success you'll see ✓ Test event received by collector. The Overview page will show a green confirmation banner until your first real production event arrives.
Verify with real traffic
Make any outbound request to a supported vendor from your running app — Stripe, OpenAI, Anthropic, GitHub, Twilio, SendGrid, HubSpot, Datadog, and many more. Open the Overview page — your first event should appear within 30 seconds.
What gets captured
Every outbound HTTP request to a recognised vendor produces one event. All fields below are captured identically across every SDK.
| Field | Description |
|---|---|
| vendor | Vendor slug, e.g. "stripe", "openai" |
| endpoint | Normalized path, e.g. "/v1/charges/:id" |
| method | HTTP verb: "GET", "POST", etc. |
| status | HTTP status code, or null on timeout |
| outcome | "success", "client_error", "server_error", "timeout", "unknown" |
| duration_ms | Wall-clock time in milliseconds, including DNS and TLS on first connection |
| cold_start | true if this request paid for the TLS handshake; excluded from p95 calculations |
| env | Environment tag from your SDK config |
| ts | Unix timestamp in milliseconds |
| rl_remaining | Remaining quota — present when vendor rate limit headers are found |
| rl_limit | Total quota — present when vendor rate limit headers are found |
| rl_reset_at | Quota reset time in epoch milliseconds — present when vendor rate limit headers are found |
What is never captured
- Request or response bodies
- Request or response headers (including Authorization)
- Query string parameters
- Any credential, token, or secret your application uses to authenticate with a vendor
- User identifiers or PII of any kind
Path normalization strips resource IDs before the event leaves your server. /v1/charges/ch_3Ox4Kz2e becomes /v1/charges/:id.
Features
Latency monitoring
p50, p95, and p99 latency for every vendor endpoint, aggregated hourly. Measured from your server — the number your users actually feel.
Fleet benchmarking
Your latency percentiles are compared against anonymized fleet data from all Apidepth customers. See whether a slow Stripe response is isolated to your infrastructure or industry-wide.
Proof of Innocence
When all endpoints to a vendor spike together, Apidepth surfaces a verdict: isolated (your code or infra) or tracking (vendor-side). Tell ops "it's Stripe, not us" in one card.
Tracks 429 patterns and captures quota headers from every response to project burn-down before you hit the ceiling.
TCP/TLS probes and status-page polling every 60 seconds across all built-in vendors. Always current, independent of your SDK traffic.
Alerts fire on latency spikes, error rate thresholds, 429s, and quota burn-down. Delivered via email, Slack, or outbound webhook.
Next steps
- Rate Limit Intelligence — 429 tracking and burn-down prediction
- Notification channels — Slack, webhook, and email alerts
- Vendor status — live TCP probes and status-page monitoring
- Configuration reference — all SDK options (Ruby, Python, JavaScript)
- API reference — query the collector directly