| title | Quickstart |
|---|---|
| description | Get started with Tracia in 5 minutes |
- A Tracia account (sign up)
- Node.js 18 or later
- An API key from a supported LLM provider (OpenAI, Anthropic, Google, Amazon Bedrock)
- Log in to tracia.io
- Navigate to Settings > API Keys
- Click Create API Key
- Copy your key (starts with
tr_)
pnpm add traciayarn add tracia- Go to Settings > Providers in the Tracia dashboard
- Add your OpenAI, Anthropic, Google, or Amazon Bedrock provider API key
- Tracia encrypts and stores your key securely
- Go to Prompts in the dashboard
- Click New Prompt
- Enter a name (e.g., "Welcome Email")
- 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}}.
- Click Save
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 }After running your prompt:
- Go to Spans in the dashboard
- See the full execution details including:
- Input/output content
- Token usage and cost
- Latency metrics
- Variables used