POST
/api/v1/copilot/analyzeCopilot-style analysis on platform data
Natural-language analysis assistant: takes a question + scope, returns insights with citations to underlying data. Like Cursor/Copilot for the EvalGuard data plane.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/api-keys.
Request body required
Example
{
"orgId": "00000000-0000-0000-0000-000000000000",
"type": "security",
"findings": [
{
"type": "string",
"severity": "string",
"title": "string",
"description": "string",
"passed": false,
"pluginId": "string"
}
],
"cases": [
{
"input": "string",
"score": 0,
"passed": false,
"scorerType": "string"
}
],
"passRate": 0,
"score": 0,
"model": "string",
"systemPrompt": "string",
"deploymentContext": {
"useCase": "string",
"industry": "string",
"userBase": "string",
"dataClassification": "string",
"region": "string"
}
}Schema
{
"application/json": {
"schema": {
"type": "object",
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"enum": [
"security",
"eval",
"contextual"
]
},
"findings": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"maxLength": 120
},
"severity": {
"type": "string",
"maxLength": 60
},
"title": {
"type": "string",
"maxLength": 500
},
"description": {
"type": "string",
"maxLength": 20000
},
"passed": {
"type": "boolean"
},
"pluginId": {
"type": "string",
"maxLength": 200
}
},
"required": [
"type",
"severity",
"title",
"description",
"passed"
],
"additionalProperties": false
}
},
"cases": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"input": {
"type": "string",
"maxLength": 50000
},
"score": {
"type": "number"
},
"passed": {
"type": "boolean"
},
"scorerType": {
"type": "string",
"maxLength": 120
}
},
"required": [
"input",
"score",
"passed"
],
"additionalProperties": false
}
},
"passRate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"score": {
"type": "number"
},
"model": {
"type": "string",
"maxLength": 120
},
"systemPrompt": {
"type": "string",
"maxLength": 100000
},
"deploymentContext": {
"type": "object",
"properties": {
"useCase": {
"type": "string",
"maxLength": 500
},
"industry": {
"type": "string",
"maxLength": 120
},
"userBase": {
"type": "string",
"maxLength": 500
},
"dataClassification": {
"type": "string",
"maxLength": 120
},
"region": {
"type": "string",
"maxLength": 120
}
},
"additionalProperties": false
}
},
"required": [
"type"
],
"additionalProperties": false
}
}
}Response
200 example
{
"success": true
}All status codes
200Analysis with citations.
400(no description)
401(no description)
429(no description)
Code samples
cURL
curl -X POST \
https://evalguard.ai/api/v1/copilot/analyze \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "orgId": "00000000-0000-0000-0000-000000000000", "type": "security", "findings": [ { "type": "string", "severity": "string", "title": "string", "description": "string", "passed": false, "pluginId": "string" } ], "cases": [ { "input": "string", "score": 0, "passed": false, "scorerType": "string" } ], "passRate": 0, "score": 0, "model": "string", "systemPrompt": "string", "deploymentContext": { "useCase": "string", "industry": "string", "userBase": "string", "dataClassification": "string", "region": "string" } }'TypeScript
import { EvalGuard } from "@evalguard/sdk";
const client = new EvalGuard({ apiKey: process.env.EVALGUARD_API_KEY });
const response = await client.request({
method: "POST",
path: "/api/v1/copilot/analyze",
body: {
"orgId": "00000000-0000-0000-0000-000000000000",
"type": "security",
"findings": [
{
"type": "string",
"severity": "string",
"title": "string",
"description": "string",
"passed": false,
"pluginId": "string"
}
],
"cases": [
{
"input": "string",
"score": 0,
"passed": false,
"scorerType": "string"
}
],
"passRate": 0,
"score": 0,
"model": "string",
"systemPrompt": "string",
"deploymentContext": {
"useCase": "string",
"industry": "string",
"userBase": "string",
"dataClassification": "string",
"region": "string"
}
},
});
console.log(response);Python
from evalguard import EvalGuard
import os
client = EvalGuard(api_key=os.environ["EVALGUARD_API_KEY"])
response = client.request(
method="POST",
path="/api/v1/copilot/analyze",
body={
"orgId": "00000000-0000-0000-0000-000000000000",
"type": "security",
"findings": [
{
"type": "string",
"severity": "string",
"title": "string",
"description": "string",
"passed": False,
"pluginId": "string"
}
],
"cases": [
{
"input": "string",
"score": 0,
"passed": False,
"scorerType": "string"
}
],
"passRate": 0,
"score": 0,
"model": "string",
"systemPrompt": "string",
"deploymentContext": {
"useCase": "string",
"industry": "string",
"userBase": "string",
"dataClassification": "string",
"region": "string"
}
},
)
print(response)Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"orgId":"00000000-0000-0000-0000-000000000000","type":"security","findings":[{"type":"string","severity":"string","title":"string","description":"string","passed":false,"pluginId":"string"}],"cases":[{"input":"string","score":0,"passed":false,"scorerType":"string"}],"passRate":0,"score":0,"model":"string","systemPrompt":"string","deploymentContext":{"useCase":"string","industry":"string","userBase":"string","dataClassification":"string","region":"string"}}`)
req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/copilot/analyze", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}Errors
400401429