AWS Bedrock + SemanticGuard
Add intelligent caching to your Bedrock models. Supports Llama, Titan, Cohere, and Claude. Your prompts stay in AWS. One line of code.
import OpenAI from "openai";const client = new OpenAI({baseURL: "https://semanticguard.dev/api/proxy/v1",apiKey: "not-used",defaultHeaders: {"x-sg-api-key": "sg-your-key-here","x-sg-aws-access-key": process.env.AWS_ACCESS_KEY_ID,"x-sg-aws-secret-key": process.env.AWS_SECRET_ACCESS_KEY,"x-sg-aws-region": "us-east-1",},});const response = await client.chat.completions.create({model: "meta.llama3-70b-instruct-v1:0",messages: [{ role: "user", content: "Summarize this report..." }],});
Requests route through your Bedrock deployment. SemanticGuard caches responses so identical or similar prompts never hit the API twice.
Intelligent caching understands when two prompts mean the same thing. 100% measured correctness on our public benchmark — see /benchmark. Cache hits return in under 50ms.
Your prompts never leave your contracted provider. Entity extraction uses your Bedrock models. Full data residency compliance.
Use the OpenAI SDK with SemanticGuard's base URL and your AWS credentials. No Bedrock SDK required.
SemanticGuard signs requests with SigV4 and forwards them to your Bedrock endpoint. Your data stays in AWS.
Similar prompts return cached responses in under 50ms. Your Bedrock spend drops without sacrificing response quality — 100% measured correctness on our public benchmark.
OpenAI-compatible API
Use the OpenAI SDK to call Bedrock models through SemanticGuard. No Bedrock SDK needed.
Same-vendor routing
All auxiliary calls use your Bedrock models. No data shared with other providers.
Full visibility
Real-time cost dashboard shows spend by model, project, and request. See exactly what you save.
Edge-native signing
Lightweight AWS SigV4 signing runs on the edge. No AWS SDK dependency, no cold starts.
Free tier includes 10K requests/mo with Shadow Mode. See your potential savings before enabling caching.