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

# Quickstart

> Get started with Tracia in 5 minutes

## Prerequisites

* A Tracia account ([sign up](https://tracia.io))
* Node.js 18 or later
* An API key from a supported LLM provider (OpenAI, Anthropic, Google, Amazon Bedrock)

## Step 1: Get Your API Key

1. Log in to [tracia.io](https://tracia.io)
2. Navigate to **Settings** > **API Keys**
3. Click **Create API Key**
4. Copy your key (starts with `tr_`)

<Warning>
  Store your API key securely. It provides full access to your Tracia account.
</Warning>

## Step 2: Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install tracia
  ```

  ```bash pnpm theme={null}
  pnpm add tracia
  ```

  ```bash yarn theme={null}
  yarn add tracia
  ```
</CodeGroup>

## Step 3: Configure Your LLM Provider

1. Go to **Settings** > **Providers** in the Tracia dashboard
2. Add your OpenAI, Anthropic, Google, or Amazon Bedrock provider API key
3. Tracia encrypts and stores your key securely

## Step 4: Create Your First Prompt

1. Go to **Prompts** in the dashboard
2. Click **New Prompt**
3. Enter a name (e.g., "Welcome Email")
4. Add your prompt messages:

```
System: You are a helpful assistant that writes professional emails.

User: Write a welcome email for {{name}} who just signed up for {{product}}.
```

5. Click **Save**

<Tip>
  Use `{{variable}}` syntax to create dynamic prompts. Variables are replaced at runtime.
</Tip>

## Step 5: Run Your Prompt

```typescript theme={null}
import { Tracia } from 'tracia';

const tracia = new Tracia({
  apiKey: process.env.TRACIA_API_KEY
});

const result = await tracia.prompts.run('welcome-email', {
  name: 'Alice',
  product: 'Tracia'
});

console.log(result.text);
// Output: "Dear Alice, Welcome to Tracia!..."

console.log(result.usage);
// { inputTokens: 45, outputTokens: 120, totalTokens: 165 }
```

## Step 6: View Spans

After running your prompt:

1. Go to **Spans** in the dashboard
2. See the full execution details including:
   * Input/output content
   * Token usage and cost
   * Latency metrics
   * Variables used

## Next Steps

<CardGroup cols={2}>
  <Card title="Prompts SDK" icon="code" href="/sdk-node/prompts">
    Learn all prompt operations: list, get, create, update, delete
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/sdk-node/error-handling">
    Handle errors gracefully in your application
  </Card>
</CardGroup>
