Bedrock vs Vercel AI Gateway at a glance
| Route | Model ID | Base URL | Authentication | Published List Rate (1M in / out) |
|---|---|---|---|---|
| Bedrock Global | global.amazon.ergo-1.0 |
https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1 |
AWS_BEARER_TOKEN_BEDROCK |
$1.00 / $3.00 |
| Bedrock US Geo | us.amazon.ergo-1.0 |
https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1 |
AWS_BEARER_TOKEN_BEDROCK |
$1.10 / $3.30 |
| Vercel AI Gateway | amazon/ergo-1.0 |
https://ai-gateway.vercel.sh/v1 |
AI_GATEWAY_API_KEY |
From $0.90 / $2.70 (Bedrock row $1 / $3)* |
*Vercel AI Gateway aggregates multiple upstream providers; lowest displayed rates can differ from the specific provider handling your route. Verify active provider routing on the Vercel Ergo model page or AWS pricing page.
Minimal OpenAI SDK request (Python)
Install openai (pip install -U openai), export AI_GATEWAY_API_KEY, and call the Responses API:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai-gateway.vercel.sh/v1",
api_key=os.environ["AI_GATEWAY_API_KEY"],
)
result = client.responses.create(
model="amazon/ergo-1.0",
reasoning={"effort": "medium"},
input="Return three edge-case unit tests for merging two sorted lists.",
)
print(result.output_text)
To hit Amazon Bedrock directly with the same SDK, export AWS_BEARER_TOKEN_BEDROCK, change base_url to https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1, and set model="global.amazon.ergo-1.0". If you prefer AWS IAM roles without bearer tokens, use boto3 Bedrock Converse.
cURL smoke test (Bedrock OpenAI-compatible endpoint)
curl https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/responses \
-H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
-H "Content-Type: application/json" \
-d '{
"model": "global.amazon.ergo-1.0",
"reasoning": { "effort": "low" },
"input": "Reply with OK and the time complexity of binary search."
}'
Quick troubleshooting
- 401 / 403 Unauthorized: Confirm the API key matches the exact endpoint (
AWS_BEARER_TOKEN_BEDROCKfor Bedrock,AI_GATEWAY_API_KEYfor Vercel). - 404 / Model not found: Double-check ID syntax (
global.amazon.ergo-1.0on Bedrock vsamazon/ergo-1.0on Vercel AI Gateway). - Unexpected high token bills: Inspect
reasoning.effort— reasoning tokens bill at the output rate. Start atlowormediumand model your spend in the API cost calculator.
Frequently asked questions
What is the Amazon Ergo API model name?
Bedrock uses cross-Region profile IDs (global.amazon.ergo-1.0 or us.amazon.ergo-1.0), while Vercel AI Gateway and OpenAI-style aggregators use amazon/ergo-1.0.
Does Amazon Ergo work with the OpenAI SDK?
Yes. Both Amazon Bedrock’s /openai/v1 endpoint and Vercel AI Gateway support the standard OpenAI Python and TypeScript SDKs with the Responses API.
Should I use Amazon Bedrock or Vercel AI Gateway?
Choose Amazon Bedrock directly when you need AWS IAM governance, zero data retention, or predictable Bedrock prompt caching. Choose Vercel AI Gateway when you want one unified key across multiple model providers and fast browser playground testing.