Run Prompt
Execute a prompt and get the LLM response
Request
Bearer tr_your_api_keygpt-4o, claude-sonnet-4-20250514)traceId, the trace ID is inherited from the parent span.role (system/developer/user/assistant/tool), content, and optionally toolCallId/toolName for tool result messages.Response
stop, max_tokens, or tool_callsmessages field to continue the conversation.Authorizations
API key starting with tr_
Path Parameters
The prompt slug to run
Body
Key-value pairs for template variables
Override the default model (e.g., gpt-4o, claude-sonnet-4-20250514)
Run a specific prompt version (uses latest if omitted)
Tags for filtering spans in the dashboard
End user identifier for tracking
Session identifier for grouping related spans
Group related spans together (session ID for multi-turn conversations)
Link to parent span (creates a chain)
Full conversation messages for multi-turn (skips template rendering when provided)
Response
Successful response
The generated text from the LLM
Unique identifier for this span
Session identifier (same as spanId if not part of session)
Version of the prompt that was used
Total request latency in milliseconds
Estimated cost in USD
Why the model stopped generating
stop, max_tokens, tool_calls Tool calls made by the model
Parsed JSON when the prompt has an output schema configured
Full conversation messages for multi-turn continuation (input messages + assistant response)

