POST
/api/v1/ai-sbom/generateGenerate fresh AI-BoM (synchronous)
Synchronous variant of /security/ai-bom POST — returns the generated AI-BoM in the response body for small orgs. Async variant available at /security/ai-bom POST.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/api-keys.
Request body required
Example
{
"projectName": "string",
"projectVersion": "string",
"format": "json",
"pythonRequirements": "string",
"poetryLock": "string",
"goSum": "string",
"goMod": "string",
"pomXml": "string",
"buildGradle": "string",
"gradleLockfile": "string",
"providerKeys": [
"string"
],
"agents": [
{
"name": "string",
"model": "string",
"provider": "string",
"tools": [
"string"
],
"guardrails": [
"string"
],
"source": "string"
}
],
"liveCveScan": false
}Schema
{
"application/json": {
"schema": {
"type": "object",
"properties": {
"projectName": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"projectVersion": {
"type": "string",
"maxLength": 50
},
"format": {
"type": "string",
"enum": [
"json",
"cyclonedx",
"spdx"
]
},
"packageJson": {},
"pythonRequirements": {
"type": "string",
"maxLength": 500000
},
"packageLockJson": {},
"poetryLock": {
"type": "string",
"maxLength": 2000000
},
"goSum": {
"type": "string",
"maxLength": 2000000
},
"goMod": {
"type": "string",
"maxLength": 500000
},
"pomXml": {
"type": "string",
"maxLength": 2000000
},
"buildGradle": {
"type": "string",
"maxLength": 500000
},
"gradleLockfile": {
"type": "string",
"maxLength": 2000000
},
"evalguardConfig": {},
"providerKeys": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
"promptRegistry": {},
"datasetRegistry": {},
"agents": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"model": {
"type": "string",
"maxLength": 256
},
"provider": {
"type": "string",
"maxLength": 128
},
"tools": {
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"maxLength": 256
}
},
"guardrails": {
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"maxLength": 256
}
},
"source": {
"type": "string",
"maxLength": 256
}
},
"required": [
"name",
"source"
],
"additionalProperties": false
}
},
"liveCveScan": {
"type": "boolean"
}
},
"required": [
"projectName"
],
"additionalProperties": false
}
}
}Response
200 example
{}All status codes
200Generated AI-BoM (CycloneDX).
400(no description)
401(no description)
403Forbidden — insufficient role for this operation.
429(no description)
Code samples
cURL
curl -X POST \
https://evalguard.ai/api/v1/ai-sbom/generate \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "projectName": "string", "projectVersion": "string", "format": "json", "pythonRequirements": "string", "poetryLock": "string", "goSum": "string", "goMod": "string", "pomXml": "string", "buildGradle": "string", "gradleLockfile": "string", "providerKeys": [ "string" ], "agents": [ { "name": "string", "model": "string", "provider": "string", "tools": [ "string" ], "guardrails": [ "string" ], "source": "string" } ], "liveCveScan": false }'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/ai-sbom/generate",
body: {
"projectName": "string",
"projectVersion": "string",
"format": "json",
"pythonRequirements": "string",
"poetryLock": "string",
"goSum": "string",
"goMod": "string",
"pomXml": "string",
"buildGradle": "string",
"gradleLockfile": "string",
"providerKeys": [
"string"
],
"agents": [
{
"name": "string",
"model": "string",
"provider": "string",
"tools": [
"string"
],
"guardrails": [
"string"
],
"source": "string"
}
],
"liveCveScan": false
},
});
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/ai-sbom/generate",
body={
"projectName": "string",
"projectVersion": "string",
"format": "json",
"pythonRequirements": "string",
"poetryLock": "string",
"goSum": "string",
"goMod": "string",
"pomXml": "string",
"buildGradle": "string",
"gradleLockfile": "string",
"providerKeys": [
"string"
],
"agents": [
{
"name": "string",
"model": "string",
"provider": "string",
"tools": [
"string"
],
"guardrails": [
"string"
],
"source": "string"
}
],
"liveCveScan": False
},
)
print(response)Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"projectName":"string","projectVersion":"string","format":"json","pythonRequirements":"string","poetryLock":"string","goSum":"string","goMod":"string","pomXml":"string","buildGradle":"string","gradleLockfile":"string","providerKeys":["string"],"agents":[{"name":"string","model":"string","provider":"string","tools":["string"],"guardrails":["string"],"source":"string"}],"liveCveScan":false}`)
req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/ai-sbom/generate", 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
400401403429