Skip to main content
Execute a prompt with variable substitution and get the generated response. Tracia handles template rendering, LLM API calls, and automatically logs a span.

Parameters

Response

Examples

Basic Usage

With Options

Pinning a Version

Run a specific prompt version instead of the latest. Useful for production deployments where you want to lock a known-good version while continuing to iterate on the prompt.

Accessing Metadata

Async Usage

Multi-Turn Tool Calling

When a prompt has tools configured, the model may return tool_calls instead of text. Use messages to continue the conversation with tool results.

Trace Grouping

Use trace_id and parent_span_id to group related runs in the dashboard.

Error Handling