Docs

Quickstart

This guide takes you from zero to your first API call in about five minutes. You'll create an API key, install the SDK, and list the projects on your account.

1. Create an account and API key

  1. Sign in or create an account at trainingpipes.com/buckets.
  2. Open Settings → API Keys and click Create API Key.
  3. Copy the key (it's shown only once). Store it in a secrets manager or your local .env.

2. Install the SDK

npm install @trainingpipes/sdk

3. Make your first request

import { TrainingPipes } from '@trainingpipes/sdk'

const tp = new TrainingPipes({
  token: process.env.TRAINING_PIPES_TOKEN,
})

const { data, error } = await tp.raw.listProjects()
if (error) throw error

console.log(data.items)

That's it. The tp.raw.* namespace exposes every endpoint from the API reference, fully typed from the OpenAPI spec.

4. (Optional) Curl equivalent

curl https://api.trainingpipes.com/v1/projects \
  -H "Authorization: Bearer $TRAINING_PIPES_TOKEN"

Next steps