OpenAI, Anthropic & Cohere Compatible API Gateway for Amazon Bedrock and AWS AI Services
Run your favorite OpenAI, Anthropic, and Cohere-compatible applications on Amazon Bedrock. Access 100+ models including Claude, OpenAI GPT, xAI Grok, Kimi, DeepSeek, Qwen with enterprise privacy, compliance controls, and pay-per-use AWS pricing.
14-day free trial on AWS Marketplace · $0.10/container-hour
Free for local development · Try Locally with Docker
Run stdapi.ai locally with the free community image. Requires AWS credentials configured (e.g. via aws sso login or access keys).
docker run --rm -p 8000:8000 \
-v ~/.aws:/home/nonroot/.aws:ro \
-e AWS_BEDROCK_REGIONS=us-east-1,us-west-2 \
-e ENABLE_DOCS=true \
ghcr.io/stdapi-ai/stdapi.ai-community:latestPodman on Fedora/RHEL (SELinux): Add
--userns=keep-idand use:ro,zinstead of:ro
Open http://localhost:8000/docs in your browser — Swagger UI lets you explore all endpoints and send live requests without writing any code.
Or test from the terminal with curl:
List available models:
# All discovered models with capabilities, modalities, and supported routes
curl http://localhost:8000/search_models
# Filter — e.g. vision-capable chat models only
curl "http://localhost:8000/search_models?route=/v1/chat/completions&input_modalities=IMAGE"
# OpenAI-compatible model list
curl http://localhost:8000/v1/modelsOpenAI-compatible chat:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "amazon.nova-micro-v1:0",
"messages": [{"role": "user", "content": "Hello from Amazon Bedrock!"}]
}'Anthropic-compatible chat:
curl http://localhost:8000/anthropic/v1/messages \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "amazon.nova-micro-v1:0",
"max_tokens": 1000,
"messages": [{"role": "user", "content": "Hello from Amazon Bedrock!"}]
}'Using the official SDKs? Point base_url at http://localhost:8000/v1 (OpenAI SDK), http://localhost:8000/anthropic (Anthropic SDK), or http://localhost:8000/cohere (Cohere SDK) — no other code changes.
Deploy to AWS with Terraform — two commands. The AWS Marketplace subscription includes a 14-day free trial on the license.
module "stdapi_ai" {
source = "stdapi-ai/stdapi-ai/aws"
version = "~> 1.0"
}That deploys an auto-scaling ECS Fargate service in private subnets, with KMS-encrypted S3 storage and least-privilege IAM — reachable from inside the VPC only. A public HTTPS endpoint, WAF and API key authentication are opt-in:
module "stdapi_ai" {
source = "stdapi-ai/stdapi-ai/aws"
version = "~> 1.0"
# Public HTTPS endpoint on a custom domain (ACM cert auto-issued via Route 53)
alb_enabled = true
alb_public = true
alb_domain_name = "api.example.com"
alb_route53_zone_name = "example.com"
# Optional protection and authentication
alb_waf_enabled = true
api_key_create = true
}The default deploys one task per availability zone, so a 3-AZ region runs 3 containers (~$216/month in license at $0.10/container-hour), before ALB, NAT, Fargate and KMS costs.
Full deployment guide → · Advanced deployment → · Cost management →
Prefer a hands-off setup? A managed deployment service is available.
- 🔌 Drop-in replacement — Change only the base URL. Standard OpenAI, Anthropic and Cohere SDKs connect on the base URL alone, and hundreds of applications and tools build on them. Twelve clients are driven end to end against a live gateway by the automated test suite: Claude Code, Codex, pi, OpenClaw, Hermes, Qwen Code, n8n, Haystack, Open WebUI, wyoming-openai, LangChain, Pydantic AI.
- 🔒 Runs in your AWS account — No third party sits between your users and your models. Amazon Bedrock does not share your prompts with model providers or use them for training. Configure region allow-lists to match your own requirements — AWS compliance certifications apply to the AWS services and regions you choose, and are not inherited by stdapi.ai or by your application. Compliance guide →
- 🌍 Add a region, add its quota — Every AWS region has its own Bedrock quota, and every region you enable adds its own. Eligible throttling and availability failures retry in another enabled region, with no client changes. Streaming retries only before the stream opens, and asynchronous jobs stay in the region that accepted them. Resilience guide →
- 💰 Pay only what you use — Amazon Bedrock rates with 0% markup: model usage is billed to you directly by AWS, with no minimum commitment. The gateway license itself is metered per container-hour.
- ⚡ Advanced Bedrock features — Reasoning modes (Claude, Nova), prompt caching, guardrails, service tiers, inference profiles, prompt routers, stored conversations—all through standard OpenAI and Anthropic API parameters.
- 🧠 100+ models — Claude, OpenAI GPT, xAI Grok, Kimi, DeepSeek, Qwen, GLM, Nova, Llama, Stability AI, and more. Switch model by name — no vendor lock-in.
- 🎨 Complete multi-modal API — Chat, embeddings, image generation/editing/variations, video generation, audio speech/transcription/translation, content moderation. Amazon Bedrock, Bedrock Mantle, Polly, Transcribe and Comprehend are discovered automatically and surface as one catalog under OpenAI-compatible endpoints — no model list to maintain. Amazon Translate backs audio translation.
- 📊 Full observability — OpenTelemetry integration, request/response logging, Swagger and ReDoc API documentation, and opt-in per-request cost tracking — off by default, and estimated from published AWS prices rather than read back from your invoice.
- 🤖 Integrated MCP server — Every API endpoint exposed as a Model Context Protocol tool. AI agents connect directly—no HTTP client code required. Streamable HTTP and SSE transports with configurable tool selection.
- 🔄 Automatic deprecated model fallback — When AWS retires a model, requests are transparently redirected to its replacement. Applications survive model deprecations without code changes.
Measured, not asserted: <1 ms gateway overhead (0.8 ms of gateway CPU on a 2.5 KB chat request) · 5,000+ automated test cases run against real AWS services · 12 third-party clients driven end to end against a live gateway · 50+ API operations exposed as MCP tools.
See all features → · Browse the test suite →
| Category | What You Can Build | Tools | Guide |
|---|---|---|---|
| 💬 Chat Interfaces | Private ChatGPT alternative, team chat, knowledge base with RAG | Open WebUI, AnythingLLM, LibreChat | Guide → |
| 💻 Coding Assistants | AI pair programming, code completion, codebase chat | Claude Code, Codex, Qwen Code, pi, Cline, OpenCode, Zed | Guide → |
| 🔄 Workflow Automation | AI-powered ticket routing, content creation, data processing | n8n, Langflow, Dify, Flowise | Guide → |
| 🤖 Chatbots | Slack/Discord/Teams bots, documentation assistants | Dify, Chatwoot, Typebot | |
| 🧠 Autonomous Agents | Personal AI assistants, research agents, multi-agent systems, code agents | OpenClaw, Hermes, Pydantic AI, LangGraph, CrewAI | |
| 🔍 RAG & Voice | Semantic search, document pipelines, speech assistants | LangChain, Haystack, wyoming-openai |
Bold = driven end to end against a live gateway by the automated test suite. The others have a documented setup and use the same standard SDKs.
All use cases and integration guides →
The commercial license via AWS Marketplace is for production, internal tools, and proprietary applications:
- ✅ 14-day free trial — the licence is free for 14 days; AWS resources and model usage bill as usual
- ✅ Commercial license — no AGPL obligations, keep your code private
- ✅ Hardened containers — security-optimized with regular updates
- ✅ Terraform module — production-ready infrastructure from two Terraform commands
- ✅ Streamlined AWS billing — consolidated with your existing AWS costs
- ✅ $0.10/container-hour — no markup on model usage; pay Amazon Bedrock rates directly
Buy through an AWS Marketplace private offer: custom terms and duration, committed usage, and a preferential rate. Procured through your existing AWS relationship — no new vendor onboarding, billed on your existing AWS invoice. Marketplace spend may count toward an EDP or Private Pricing Agreement; check your agreement. The private-offer rate is $0.09/container-hour, same pay-per-use model, 14-day free trial included, no upfront payment or minimum usage. Contact us with your AWS account ID to request one.
stdapi.ai is an AWS Qualified Software solution, verified against AWS technical and security requirements for AWS Marketplace.
For contributors working on stdapi.ai itself:
- Python 3.14+
- uv package manager
- AWS credentials configured
git clone https://github.com/stdapi-ai/stdapi.ai.git
cd stdapi.ai
uv sync --frozen --extra uvicorn
aws sso login --profile your-profile-name
export AWS_BEDROCK_REGIONS=us-east-1
export ENABLE_DOCS=true
uv run uvicorn stdapi.main:app --host 0.0.0.0 --port 8000- Follow existing code style and conventions
- Add tests for new features
- Update documentation for user-facing changes
- Ensure all tests pass before submitting PR
Dual-licensed:
- AGPL-3.0-or-later — Free for open-source projects that share alike
- Commercial License — AWS Marketplace, for proprietary applications (14-day free trial)
We welcome contributions! Whether it's bug reports, new features, documentation improvements, or ideas — please feel free to open issues or submit pull requests.
- Issues: GitHub Issue Tracker
- Documentation: stdapi.ai
- Commercial support: Contact page — Marketplace subscribers get a response within 1 business day
- Sponsor: GitHub Sponsors — Priority support, feature prioritization, and influence on the roadmap.
Ready to run 100+ AI models securely on AWS?
Start 14-Day Free Trial on AWS Marketplace · Deployment guide · Terraform examples · Try Locally with Docker