# Quickstart
Source: https://docs.aden.space/docs/developers/sdk/quickstart

Install the SDK, authenticate, and make your first request.
Five steps, each wired once. After this you don't touch it again.

## Prerequisites [#prerequisites]

* Node.js `>= 20`, Bun, or Deno
* A team you can create an API key in

<Callout type="warn">
  Treat API keys like passwords. Anyone holding one can read and write your
  team's data. Keep them in a secret manager, never in git.
</Callout>

<Steps>
  <Step>
    ### Install the package [#install-the-package]

    <Tabs groupId="package-manager" items="['npm', 'pnpm', 'yarn', 'bun']">
      <Tab value="npm">
        ```bash
        npm install @adenspace/sdk
        ```
      </Tab>

      <Tab value="pnpm">
        ```bash
        pnpm add @adenspace/sdk
        ```
      </Tab>

      <Tab value="yarn">
        ```bash
        yarn add @adenspace/sdk
        ```
      </Tab>

      <Tab value="bun">
        ```bash
        bun add @adenspace/sdk
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step>
    ### Create a team API key [#create-a-team-api-key]

    Keys are scoped to one team. In the Aden web app, open your team, go to
    **Settings → API keys**, and click **New key**. The value starts with
    `aden_live_` and is shown once. Copy it into your secret manager now.
  </Step>

  <Step>
    ### Create a client [#create-a-client]

    ```ts title="lib/aden.ts"
    import { createAdenClient } from '@adenspace/sdk'

    export const aden = createAdenClient({
        apiKey: process.env.ADEN_API_KEY,
    })
    ```
  </Step>

  <Step>
    ### Make a request [#make-a-request]

    Every path in the API is mirrored on the client, so autocomplete guides you.

    ```ts
    const { data: tracks, error } = await aden.api.v1.tracks.get({
        query: { limit: 10 },
    })

    if (error) {
        console.error(error.status, error.value)
        process.exit(1)
    }

    for (const track of tracks) {
        console.log(`${track.title}, ${track.status}`)
    }
    ```

    Path parameters are function calls, and POST bodies go as the first argument:

    ```ts
    const { data: track } = await aden.api.v1.tracks({ id: 42 }).get()

    const { data: created } = await aden.api.v1.tracks.post({
        title: 'New demo',
        teamId: 123,
    })
    ```
  </Step>

  <Step>
    ### Check the API is up [#check-the-api-is-up]

    ```ts
    if (!(await aden.ping())) {
        throw new Error('Aden API is unreachable')
    }
    ```
  </Step>
</Steps>

## Custom base URL [#custom-base-url]

Point the client at local dev, a staging environment, or self-hosted Aden:

```ts
const aden = createAdenClient({
    baseUrl: 'http://localhost:3000',
    apiKey: process.env.ADEN_API_KEY,
})
```

## Next [#next]

<Cards>
  <Card title="Authentication" href="/docs/developers/sdk/authentication" description="API keys vs Supabase session tokens." />

  <Card title="Examples" href="/docs/developers/sdk/examples" description="Real patterns from the Aden apps." />

  <Card title="API reference" href="/docs/developers/api" description="Every endpoint, grouped by resource." />
</Cards>