A unified, provider-agnostic chat completions API server supporting OpenAI and AWS Bedrock
View the Project on GitHub teabranch/amazon-chat-completions-server
A unified, provider-agnostic chat completions API server supporting OpenAI and AWS Bedrock.
Get started now View on GitHub
# Clone and install
git clone https://github.com/teabranch/amazon-chat-completions-server.git
cd amazon-chat-completions-server
uv pip install -e .
# Configure environment
amazon-chat config set
# Start server
amazon-chat serve --host 0.0.0.0 --port 8000
# Test the unified endpoint
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
The /v1/chat/completions
endpoint is the only endpoint you need. It:
All format combinations are supported through the unified endpoint:
Input Format | Output Format | Use Case | Streaming |
---|---|---|---|
OpenAI | OpenAI | Standard OpenAI usage | ✅ |
OpenAI | Bedrock Claude | OpenAI clients → Bedrock response | ✅ |
OpenAI | Bedrock Titan | OpenAI clients → Titan response | ✅ |
Bedrock Claude | OpenAI | Bedrock clients → OpenAI response | ✅ |
Bedrock Claude | Bedrock Claude | Claude format preserved | ✅ |
Bedrock Titan | OpenAI | Titan clients → OpenAI response | ✅ |
Bedrock Titan | Bedrock Titan | Titan format preserved | ✅ |
/v1/chat/completions
handles everythingThis project is licensed under the MIT License - see the LICENSE file for details.