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 an Evaluation
Initialize a client with your API key and create an evaluation by sendingmodel_input
(with atleast system_prompt
or user_prompt
), model_output
, and guardrail_metrics
.
Tip: You can check all of your evaluations via the DeepRails API Console.
- Python
- TypeScript / Node
- Ruby
- Go
Required Parameters
Field | Type | Description |
---|---|---|
model_input | object | Must include atleast system_prompt or user_prompt . |
model_output | string | The LLM output to be evaluated. |
guardrail_metrics | string[] | Metrics to score (e.g., correctness , completeness , instruction_adherence , context_adherence , ground_truth_adherence , comprehensive_safety ). |
Optional Parameters
Field | Type | Description |
---|---|---|
model_used | string | The model that produced model_output (e.g., gpt-4o-mini ). |
run_mode | string | Evaluation run mode (defaults to “smart” ). |
nametag | string | Custom identifier for this run (e.g., a ticket or test name). |
Retrieve an Evaluation
Evaluations are processed asynchronously. You’ll need to poll the evaluation using itseval_id
to check the evaluation_status
. Once complete, the evaluation_result
field will be populated with scores and rationales.
- Python
- TypeScript / Node
- Ruby
- Go
Check Evaluation History via the API Console
- Open your DeepRails API Console → Evaluate.
- Browse historical runs and filter by model or search by
nametag
. - Compare prompts, completions, and evaluations side-by-side.

You can browse and filter your evaluation history in the API Console.