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

# Get Started

## Overview

Install the TS client

```
bun i comfydeploy
```

For example setting up the ts client, get your api key [here](https://www.comfydeploy.com/api-keys)

```typescript client.ts theme={null}
import { ComfyDeploy } from "comfydeploy";

export const cd = new ComfyDeploy({
    bearer: "<api-key>",
});
```

Running any workflow as API, for more types definitions see [here](https://api.comfydeploy.com/)

<Tabs>
  <Tab title="Queue Run">
    When using queue run, an run id is returned immediately, which you can later use to check the status of the run or get the output.
    Webhook callback is suggested making sure you have a way to receive the response.

    ```typescript theme={null}
    const run = await cd.run.deployment.queue({
      deploymentId: "<deployment-id>",
      inputs: {
        prompt: "A beautiful landscape",
      },
      webhook: "<your domain>/webhook"
    })

    // run.runId
    ```
  </Tab>
</Tabs>

## Getting your workflow on to the platform

<CardGroup cols={2}>
  <Card title="Import Workflow" icon="file-import" href="/v2/workflows/import">
    Import a workflow from a JSON file
  </Card>

  <Card title="Deploy Workflow" icon="cloud" href="/v2/deployments/create">
    Deploy your workflow
  </Card>
</CardGroup>
