
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@subscribe.dev/replicate-frontend-proxy
Advanced tools
AWS Lambda function that serves as a secure proxy for the Replicate API
A secure, serverless proxy service that enables frontend applications to safely interact with Replicate AI models without exposing API credentials in client-side code.
This package provides a ready-to-deploy AWS Lambda function that acts as an intermediary between your frontend applications and the Replicate API. By routing requests through this proxy, you can integrate AI models into your web applications while maintaining security best practices and keeping sensitive API keys on the server side.
The proxy is designed for easy deployment and requires minimal configuration, making it simple to add AI capabilities to any frontend project.
The proxy provides a simple HTTP API that forwards requests to Replicate while maintaining security:
POST /api/replicate - Main proxy endpoint for model predictionsGET /api/replicate - Returns usage instructionsGET /health - Service health checkOPTIONS /api/replicate - CORS preflight supportSend a POST request to your deployed proxy endpoint:
const response = await fetch('https://your-lambda-url.amazonaws.com/api/replicate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'black-forest-labs/flux-schnell',
input: {
prompt: 'a professional headshot of a person',
num_outputs: 1
},
apiKey: 'your-replicate-api-key'
})
});
const result = await response.json();
console.log(result);
bun install
bun run test - Run tests with coveragebun run test:ci - Run tests with CI reporting (JUnit + LCOV)bun run typecheck - Type check TypeScriptbun run build - Build for AWS Lambda deploymentbun run dev - Run locallybun run clean - Clean build and coverage directoriesThe project includes comprehensive tests with:
The project includes automated testing and deployment workflows:
Build the project:
bun run build
Deploy the generated dist/proxy.js to AWS Lambda
Configure your Lambda function with appropriate environment variables and permissions
You can also import this package directly in your own Lambda function:
// Your Lambda handler
module.exports = require('@subscribe.dev/replicate-frontend-proxy');
Ensure your Lambda function has:
This proxy is designed with security as a primary concern:
The proxy acts as a security boundary, ensuring that sensitive API credentials never reach client-side code while maintaining full functionality.
MIT License - see LICENSE file for details.
FAQs
AWS Lambda function that serves as a secure proxy for the Replicate API
The npm package @subscribe.dev/replicate-frontend-proxy receives a total of 129 weekly downloads. As such, @subscribe.dev/replicate-frontend-proxy popularity was classified as not popular.
We found that @subscribe.dev/replicate-frontend-proxy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.