# SDK overview (/sdk)



This page explains what the SDK is for today. For setup, see
[Install the SDK](/sdk/installation); for the first calls, see the
[SDK quick start](/sdk/quickstart); for every class and method, see the
[SDK API reference](/sdk/api).

`@alternatefutures/sdk` (0.2.x) is a TypeScript client for the Alternate
Clouds GraphQL API, with Node.js and browser builds. It predates the compute
platform: it was written for an earlier product, and only part of it maps onto
the API that runs today.

## What works against the current API [#what-works-against-the-current-api]

| Area           | Client                       | Use it for                                                          |
| -------------- | ---------------------------- | ------------------------------------------------------------------- |
| Authentication | `PersonalAccessTokenService` | Exchange a personal access token for a session, scoped to a project |
| Projects       | `sdk.projects()`             | `list()`, `create({ name })`                                        |
| Access tokens  | `sdk.user()`                 | `listPersonalAccessTokens()`                                        |
| Functions      | `sdk.functions()`            | list, get, create, update, deploy, delete                           |

## What the SDK does not cover [#what-the-sdk-does-not-cover]

Services, deployments, templates, regions, logs, custom domains, and billing
have no SDK client. For those, use the [`acc` CLI](/cli) (every command works
non-interactively with `AF_TOKEN`, `AF_PROJECT_ID`, and `-y`), the
[web app](/guides/dashboard), or the GraphQL API directly at
`https://api.alternatefutures.ai/graphql` with a personal access token as a
bearer token.

## Legacy clients: do not build on these [#legacy-clients-do-not-build-on-these]

<Callout type="warn" title="Present in the package, not backed by the current API">
  `sdk.sites()`, `sdk.storage()`, `sdk.ipfs()`, `sdk.ipns()`, `sdk.ens()`,
  `sdk.privateGateways()`, and `sdk.applications()` come from the retired
  hosting product. Against the current API their calls fail validation, hit
  fields that no longer exist, or return empty lists. `sdk.domains()` is that
  product's domain and zone client and is not verified against today's API;
  custom domains for services are not available yet (the old guide is
  [archived](/legacy/custom-domains)). All of these
  remain in the package and in the [API reference](/sdk/api) for compatibility
  only.
</Callout>

`ApplicationAccessTokenService` and `StaticAccessTokenService` are also
legacy: the first talks to a retired service, the second only carries a token
you obtained elsewhere.

## Two rules [#two-rules]

* Import from the package root, `@alternatefutures/sdk`, on Node too. The
  `/node` entry point in 0.2.4 fails to load; see
  [Install the SDK](/sdk/installation#troubleshooting).
* No endpoint setup. 0.2.4 targets `https://api.alternatefutures.ai/graphql`
  by default. Pass `graphqlServiceApiUrl` to the SDK and to the token service
  only to reach another host.

## Next steps [#next-steps]

* [Install the SDK](/sdk/installation)
* [SDK quick start](/sdk/quickstart)
* [Create and use access tokens](/guides/api-keys)
