stdapi.ai

mcp
Security Audit
Pass
Health Pass
  • License — License: AGPL-3.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 23 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Self-hosted AI gateway for Amazon Bedrock. OpenAI, Anthropic and Cohere compatible APIs, plus Polly, Transcribe and Rekognition.

README.md
stdapi.ai logo

stdapi.ai

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.


AWS Marketplace
Terraform Module
OpenTofu Module

14-day free trial on AWS Marketplace · $0.10/container-hour


Community Edition Docker image
Community Edition TrueNAS App
Community Edition License

Free for local development · Try Locally with Docker


Documentation
Samples
Lint
Code quality


⚡ Try It 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:latest

Podman on Fedora/RHEL (SELinux): Add --userns=keep-id and use :ro,z instead 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/models

OpenAI-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.

Local development guide →


🚀 Production Deployment

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.


🎯 Why stdapi.ai?

  • 🔌 Same API, wider catalogue — Adoption is quick: standard OpenAI, Anthropic and Cohere SDKs connect on the base URL alone, and hundreds of applications and tools build on them; the model you then name is drawn from every provider in the catalogue, not one vendor's list. Twenty 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, LiteLLM, Docling Serve, OpenAI Agents SDK, LiveKit Agents, Pipecat, inspect-ai, Agno, LlamaIndex.
  • 🔒 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. Each end user's model calls can run under their own short-lived role session, so AWS reports their spend separately in Cost Explorer and the CUR — from the invoice, not from an estimate. 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, batch inference at the discounted batch price, server-side conversations continued by id—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. When AWS retires a model, requests are transparently redirected to its replacement, so applications survive deprecations without code changes.
  • 🎨 Complete multi-modal API — Chat, embeddings, image generation/editing/variations, video generation, audio speech/transcription/translation, live speech-to-speech over a WebSocket, 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.
  • 🔎 Retrieval without a second stack — Attach a file and it is chunked, embedded and indexed in a vector bucket in your own account, then searched by meaning; an Amazon Bedrock knowledge base you already run answers through the same endpoints. Hand the stores to any chat model on the Responses API with file_search and it runs the searches itself and cites the files it drew on.
  • 📊 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.
  • 🔑 Identity per caller — Accept Amazon Cognito user pool tokens instead of, or alongside, the API key, and publish an OAuth 2.0 protected resource metadata document so an agent discovers how to authenticate on its own.

Measured, not asserted: <1 ms gateway overhead (0.8 ms of gateway CPU on a 2.5 KB chat request) · 6,000+ automated test cases run against real AWS services, at 95%+ branch coverage · 20 third-party clients driven end to end against a live gateway · 80+ API operations exposed as MCP tools.

See all features → · Browse every model → · Browse the test suite →


💼 Use Cases

Category What You Can Build Tools Guide
💬 Chat Interfaces Private ChatGPT alternative, team chat, knowledge base with RAG Open WebUI, LobeHub, 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, evaluation harnesses OpenClaw, Hermes, Pydantic AI, OpenAI Agents SDK, Agno, inspect-ai, LiteLLM, LangGraph, CrewAI Guide →
🔍 RAG & Voice Vector stores, semantic search, document pipelines, speech-to-speech assistants LangChain, LlamaIndex, Haystack, wyoming-openai, Docling Serve, LiveKit Agents, Pipecat, RAGFlow Guide →

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 →


🛒 AWS Marketplace — Commercial Edition

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

Start 14-Day Free Trial →

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.


🏅 AWS Qualified Software

AWS Qualified Software badge

stdapi.ai is an AWS Qualified Software solution, verified against AWS technical and security requirements for AWS Marketplace.


🛠️ Development from Source

For contributors working on stdapi.ai itself:

Prerequisites

  • Python 3.14+
  • uv package manager
  • AWS credentials configured

Setup

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

Development Guidelines

  • Follow existing code style and conventions
  • Add tests for new features
  • Update documentation for user-facing changes
  • Ensure all tests pass before submitting PR

📜 License

Dual-licensed:

Learn more about licensing →


🤝 Contributing

We welcome contributions! Whether it's bug reports, new features, documentation improvements, or ideas — please feel free to open issues or submit pull requests.


💬 Support


Reviews (0)

No results found