> ## Documentation Index
> Fetch the complete documentation index at: https://voyant.travel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud quickstart

> Install the Cloud SDK, authenticate with an API token, and make your first call to a managed service.

This guide gets you calling Voyant services from a TypeScript project in a few minutes.

## Prerequisites

* A Voyant account and an API token. Mint one in the dashboard tokens UI, or with the [CLI](/docs/cli/overview) after `voyant login`.
* Node.js 22.12 or newer.

## Install the SDK

```bash theme={null}
pnpm add @voyant-travel/cloud-sdk
```

## Create a client

The client reads your API token and points at `https://api.voyant.travel` by default.

```ts theme={null}
import { createVoyantCloudClient } from "@voyant-travel/cloud-sdk";

const client = createVoyantCloudClient({
  apiKey: process.env.VOYANT_API_KEY!,
});
```

<Warning>
  Keep your API token on the server. It carries the scopes that authorize real actions like sending messages and reading secrets. For browser clients that need realtime, mint a short-lived client token instead. See [Realtime](/docs/services/realtime).
</Warning>

## Make a call

Each service is a group on the client. Here are one-line examples across several services:

```ts theme={null}
// Send an SMS
await client.sms.sendMessage({
  to: "+14155551234",
  body: "Hello from Voyant",
});

// Send an email
await client.email.sendMessage({
  to: "traveler@example.com",
  subject: "Your itinerary",
  html: "<p>See you soon.</p>",
});

// Read a secret from a vault
const secret = await client.vault.getSecret("production", "STRIPE_KEY");

// Fetch rendered page content
const markdown = await client.browser.markdown({ url: "https://example.com" });

// Publish a realtime message
await client.realtime.publish("orders:eu", {
  event: "order.updated",
  data: { orderId: "ord_1" },
});
```

## Handle errors

Any non-2xx response throws a `VoyantApiError` carrying the HTTP `status`, a `requestId`, and the response `body`. Always preserve the request id in logs and support requests:

```ts theme={null}
import { VoyantApiError } from "@voyant-travel/cloud-sdk";

try {
  await client.sms.sendMessage({ to: "+10000000000", body: "test" });
} catch (error) {
  if (error instanceof VoyantApiError) {
    console.error(error.status, error.requestId, error.body);
  }
  throw error;
}
```

See [Errors and transport](/docs/sdks/errors-and-transport) for the full transport behavior shared across the SDKs.

## Next steps

<CardGroup cols={2}>
  <Card title="Messaging" icon="paper-plane" href="/docs/services/messaging">
    SMS, email, and verification in depth.
  </Card>

  <Card title="All services" icon="cloud" href="/docs/services/overview">
    Browse the full Cloud service catalog.
  </Card>
</CardGroup>
