Selected text events allow you to track when a user selects text generated by your LLM application, indicating the response was useful enough to be copied and used elsewhere.Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
REST API Specification
Endpoint
POST /api/track_event
Headers
X-Auth-Token: Your LangWatch API key.
Request Body
Example
text_length metric is mandatory and should reflect the length of the selected text. The selected_text field in event_details is optional if you also want to capture the actual text that was selected by the user.