curl -X GET https://app.tracia.io/api/v1/prompts/welcome-email \
-H "Authorization: Bearer tr_your_api_key"
const prompt = await tracia.prompts.get('welcome-email');
{
"id": "clx1abc123",
"slug": "welcome-email",
"name": "Welcome Email",
"description": "A welcome email template",
"provider": "OPENAI",
"model": "gpt-4",
"temperature": 0.7,
"topP": null,
"maxOutputTokens": null,
"currentVersion": 3,
"content": [
{
"id": "msg_1",
"role": "system",
"content": "You are a helpful assistant that writes professional emails."
},
{
"id": "msg_2",
"role": "user",
"content": "Write a welcome email for {{name}} who just signed up for {{product}}."
}
],
"variables": ["name", "product"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:22:00.000Z"
}
{
"code": "NOT_FOUND",
"message": "Prompt not found: welcome-email"
}
Prompts
Get Prompt
Get a single prompt with its content
GET
/
prompts
/
{slug}
curl -X GET https://app.tracia.io/api/v1/prompts/welcome-email \
-H "Authorization: Bearer tr_your_api_key"
const prompt = await tracia.prompts.get('welcome-email');
{
"id": "clx1abc123",
"slug": "welcome-email",
"name": "Welcome Email",
"description": "A welcome email template",
"provider": "OPENAI",
"model": "gpt-4",
"temperature": 0.7,
"topP": null,
"maxOutputTokens": null,
"currentVersion": 3,
"content": [
{
"id": "msg_1",
"role": "system",
"content": "You are a helpful assistant that writes professional emails."
},
{
"id": "msg_2",
"role": "user",
"content": "Write a welcome email for {{name}} who just signed up for {{product}}."
}
],
"variables": ["name", "product"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:22:00.000Z"
}
{
"code": "NOT_FOUND",
"message": "Prompt not found: welcome-email"
}
Request
string
required
Bearer token with your API key:
Bearer tr_your_api_keystring
required
The prompt slug
Response
string
Unique identifier for the prompt
string
URL-friendly identifier
string
Display name of the prompt
string | null
Description of the prompt
string | null
Model provider:
OPENAI, ANTHROPIC, GOOGLE, or AMAZON_BEDROCKstring | null
Default model for this prompt
number | null
Temperature setting for the model (0-2)
number | null
Top-p (nucleus) sampling setting (0-1)
number | null
Maximum output tokens limit
number
Current version number
array
string[]
List of template variables extracted from content
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
curl -X GET https://app.tracia.io/api/v1/prompts/welcome-email \
-H "Authorization: Bearer tr_your_api_key"
const prompt = await tracia.prompts.get('welcome-email');
{
"id": "clx1abc123",
"slug": "welcome-email",
"name": "Welcome Email",
"description": "A welcome email template",
"provider": "OPENAI",
"model": "gpt-4",
"temperature": 0.7,
"topP": null,
"maxOutputTokens": null,
"currentVersion": 3,
"content": [
{
"id": "msg_1",
"role": "system",
"content": "You are a helpful assistant that writes professional emails."
},
{
"id": "msg_2",
"role": "user",
"content": "Write a welcome email for {{name}} who just signed up for {{product}}."
}
],
"variables": ["name", "product"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:22:00.000Z"
}
{
"code": "NOT_FOUND",
"message": "Prompt not found: welcome-email"
}
Authorizations
API key starting with tr_
Path Parameters
The prompt slug
Response
Successful response
Unique identifier for the prompt
URL-friendly identifier
Display name of the prompt
Description of the prompt
Model provider
Available options:
OPENAI, ANTHROPIC, GOOGLE, AMAZON_BEDROCK Default model for this prompt
Temperature setting for the model (0-2)
Top-p (nucleus) sampling setting (0-1)
Maximum output tokens limit
Current version number
Array of prompt messages
Show child attributes
Show child attributes
List of template variables extracted from content
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update

