API Reference
Prompt Scans
Methods and input types for hosted system-prompt scans.
Prompt Scans
Methods
| Method | Returns |
|---|---|
scans.create(input) | CreateScanResponse |
scans.get(scanId, signal?) | ScanResult |
scans.list(options?) | ScanListResponse |
scans.wait(scanId, options?) | ScanResult |
scans.run(input, options?) | { scan, report } |
scans.cancel(scanId) | { success: boolean } |
CreateScanRequest
interface CreateScanRequest {
systemPrompt: string;
scanMode?: "extraction" | "injection" | "dual" | "sandbox" | "full";
targetModel?: string;
temperature?: number;
reasoningEffort?: "low" | "medium" | "high";
knowledgeProfile?: "baseline" | "production" | "research";
attackSurfaces?: AttackSurface[];
usePineconeKnowledge?: boolean;
maxAdaptiveCandidates?: number;
userTools?: ToolDefinition[];
autoDetectTools?: boolean;
sandboxScanType?: "both" | "extraction" | "injection";
workspaceId?: string;
}scans.run() creates the scan, polls until it reaches a terminal state, and returns the completed report. A failed or canceled scan throws ZeroLeaksScanError.