Skip to content

Detailed Results

Get detailed detection results with confidence scores and matched text spans.

This example assumes using Lakera; is in scope and apiKey contains your Lakera API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
using var client = new LakeraClient(apiKey);

// Get detailed screening results with confidence scores.
var response = await client.GuardResultsAsync(
    messages:
    [
        new GuardMessage
        {
            Role = GuardMessageRole.User,
            Content = "My email is john@example.com and my phone is 555-0123.",
        },
    ]);

// The detailed response includes per-detector results.