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.
All prompt operations are available under the tracia.prompts namespace.
import { Tracia } from 'tracia';
const tracia = new Tracia({ apiKey: process.env.TRACIA_API_KEY });
// Run a prompt
const result = await tracia.prompts.run('welcome-email', { name: 'Alice' });
// List all prompts
const { prompts } = await tracia.prompts.list();
// Get a single prompt
const prompt = await tracia.prompts.get('welcome-email');
// Create a prompt
const newPrompt = await tracia.prompts.create({ name: 'My Prompt', content: [...] });
// Update a prompt
const updated = await tracia.prompts.update('welcome-email', { name: 'New Name' });
// Delete a prompt
await tracia.prompts.delete('welcome-email');
Available Methods
Run
Execute a prompt and get the LLM response
List
Get all prompts for your account
Get
Retrieve a single prompt with its content
Create
Create a new prompt
Update
Update an existing prompt
Delete
Delete a prompt and all its versions
Types
Prompt
interface Prompt {
id: string;
slug: string;
name: string;
description: string | null;
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'AMAZON_BEDROCK' | null;
model: string | null;
temperature: number | null;
topP: number | null;
maxOutputTokens: number | null;
currentVersion: number;
content: PromptMessage[];
variables: string[];
createdAt: string;
updatedAt: string;
}
PromptMessage
interface PromptMessage {
id: string;
role: 'system' | 'user' | 'assistant';
content: string;
}
PromptListItem
interface PromptListItem {
id: string;
slug: string;
name: string;
description: string | null;
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'AMAZON_BEDROCK' | null;
model: string | null;
temperature: number | null;
topP: number | null;
maxOutputTokens: number | null;
currentVersion: number;
variables: string[];
createdAt: string;
updatedAt: string;
}