Create an API Key
- In your organization’s DeepRails API Console, go to API Keys.
- Click Create key, name it, then copy the key.
- (Optional) Save it as the
DEEPRAILS_API_KEY
environment variable.

Create and manage API keys in the API Console.
Install the SDK
- Python
- TypeScript / Node
- Ruby
- Go
Create a Monitor
Before you can send events, you need to create a monitor. A monitor is a container for tracking production events and their evaluations.Tip: You can also create a monitor via the DeepRails API Console.
- Python
- TypeScript / Node
- Ruby
- Go
Send Your First Monitor Event
Use the SDK to log a production event (input + output). The SDK automatically triggers an evaluation using the guardrail metrics you pass and links the result to the event.- Python
- TypeScript / Node
- Ruby
- Go
Required Parameters
Field | Type | Description |
---|---|---|
monitor_id | string | The ID of the monitor to receive the event (find it in Console → Monitor → Manage Monitors). |
model_input | object | Must include atleast system_prompt or user_prompt . |
model_output | string | The LLM output to be evaluated and recorded with the event. |
Optional Parameters
Field | Type | Description |
---|---|---|
model_used | string | The model that produced model_output (e.g., gpt-4o-mini ). |
guardrail_metrics | string[] | Metrics to score (e.g., correctness , completeness , instruction_adherence , context_adherence , ground_truth_adherence , comprehensive_safety ). |
Retrieve Monitor Data
You can retrieve monitor details including stats on evaluation progress.- Python
- TypeScript / Node
- Ruby
- Go
Check Monitor Analytics via the API Console
- Open DeepRails API Console → Monitor → Data.
- Filter by model, time range, or search by
monitor_id
to find events. - Open any event to see the linked evaluation scores and rationales.

Browse real-time monitor events, filters, and linked evaluation details.