Metrics Docs

Metrics API

Use the hosted Metrics API directly when you need raw HTTP access instead of the JavaScript client.

When to use the raw API

Use the raw Metrics API when:

  • you are writing a non-JavaScript client
  • you need direct HTTP control
  • you want to inspect the exact request and response shape

For most JavaScript apps, start with @distlang/client.

Reference

The hosted API reference lives at:

Authentication

Pass your Distlang API token as a bearer token when calling api.distlang.com.

curl -H "Authorization: Bearer $DISTLANG_ACCESS_TOKEN" \
  https://api.distlang.com/docs
  1. Create your token in dash.distlang.com/auth
  2. Start with Quickstart
  3. Use the JavaScript client unless you have a reason not to