Multi-Modal Guardrails
Verify images, audio, documents, and code alongside text prompts.
Palveron accepts attachments (images, audio, documents, code) alongside text in a single Verify API request. The gateway auto-detects the request's content type.
What is checked today. Through the Gateway Proxy, Palveron checks only the text of the messages; images and files in them are forwarded unchanged to your model provider. Through the Verify API, Palveron governs the request's text content (personal data, prompt injection, policies); attachments are checked by type and size and forwarded to your model provider. Multi-modal is available on the Enterprise plan only.
Content Types
Today the gateway governs the text content of every Verify request. It accepts attachments, checks their type and size, and forwards them to your model provider; it does not read the binary content of an image or audio file today.
| Content type | What happens today |
|---|---|
| Text | detection of personal data, prompt injection, and policy evaluation |
| Code | secret scan over the prompt text (see Code Secret Scanning) |
| Document | Palveron checks already-extracted text that you send in the extracted_text field. Extracting PDF or Word files does not happen in the gateway. |
| Image, audio, video | the attachment is checked by size and forwarded; dedicated image, audio, or video analysis in the gateway is not available today. |
Sending Attachments
Attachments are sent base64-encoded with a MIME type. The SDK handles encoding automatically when using the file helpers.
TypeScript
// From file path
const result = await palveron.verifyWithFile(
'Analyze this document for compliance issues',
'./contract.pdf'
);
// From base64
const result = await palveron.verify({
prompt: 'Check this image for sensitive content',
attachments: [{
contentType: 'image/png',
data: base64EncodedImage,
filename: 'screenshot.png',
metadata: { source: 'user-upload' },
}],
});Python
from palveron import Palveron, VerifyRequest, Attachment
client = Palveron(api_key="pv_live_...")
# From file
result = client.verify_file("Check this", "/path/to/image.png")
# Programmatic
result = client.verify(VerifyRequest(
prompt="Analyze this code for secrets",
attachments=[Attachment.from_file("app.py")],
))
# From raw bytes
att = Attachment.from_bytes(image_bytes, "image/jpeg", "photo.jpg")Go
att, _ := palveron.AttachmentFromFile("/path/to/contract.pdf")
result, _ := client.Verify(ctx, &palveron.VerifyRequest{
Prompt: "Check this document",
Attachments: []palveron.Attachment{*att},
})cURL
BASE64=$(base64 -i photo.jpg)
curl -X POST https://gateway.palveron.com/api/v1/verify \
-H "Authorization: Bearer pv_live_..." \
-H "Content-Type: application/json" \
-d "{
\"prompt\": \"Check this image\",
\"attachments\": [{
\"type\": \"image/jpeg\",
\"data\": \"$BASE64\",
\"filename\": \"photo.jpg\"
}]
}"On the wire, the attachment's MIME field is named type (the SDKs' contentType/content_type options map to it). data is required; filename and metadata are optional.
Response
Multi-modal responses include content_type and findings:
{
"decision": "BLOCKED",
"reason": "Multi-Modal code analysis: Secret exposed (aws_access_key) (CRITICAL)",
"content_type": "code",
"findings": [
{
"risk": "CRITICAL",
"category": "secret_exposure",
"description": "Secret exposed (aws_access_key)",
"confidence": 0.9
}
],
"trace_id": "clx...",
"integrity_hash": "sha256:abc...",
"should_anchor": true
}Code Secret Scanning
With multi-modal analysis enabled, Palveron scans the prompt text for hardcoded secrets, regardless of programming language:
| Pattern | Example |
|---|---|
| AWS Access Keys | AKIAIOSFODNN7EXAMPLE |
| AWS Secret Keys | wJalrXUtnFEMI/K7MDENG/bPxRfiCY |
| GitHub Tokens | ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| Stripe Keys | sk_live_..., sk_test_... |
| Generic API keys | sk-proj-..., Bearer ... |
| Private Keys | -----BEGIN RSA PRIVATE KEY----- |
Configuration
Configure multi-modal under Settings → General:
| Mode | Description |
|---|---|
| Self-Hosted | Your own analysis instances, whose address you configure per content type. Full data sovereignty. |
| Disabled | Multi-modal analysis off. Only text is verified. |
Architecture
verify({ prompt, attachments })
→ Content-type detection of the request
→ Text analysis: personal data, prompt injection, policies
→ Secret scan over the text (when multi-modal analysis is enabled)
→ Merge findings
→ Apply sensitivity filter
→ Decision (PASSED / BLOCKED / MODIFIED)
→ Trace + Flare anchoringAll content types pass through the same Flare blockchain anchoring pipeline. contentType and contentMetadata.findings are stored on every trace for audit purposes.