- Chat Completions (
/v1/chat/completions) - Embeddings (
/v1/embeddings)
- Test your data with different foundation models
- Perform A/B testing with different foundation models
- Perform batch inference with different foundation models
The AI Gateway supports two modes on Bedrock:
- Provider Batch API (cheapest, completion_window:
24h,48h, etc.) - AI Gateway Batch API ⭐️ (fast, provider-agnostic, completion_window:
immediate)
Before You Start
- AI Gateway API key (
$PORTKEY_API_KEY). - Bedrock credentials — either an AI Gateway Provider from Model Catalog or explicit AWS keys (
aws_access_key_id,aws_secret_access_key,aws_region, optionalaws_session_token). - S3 bucket with read/write access for inputs and outputs.
- IAM roles (see Permissions & IAM below).
- Optional: a AI Gateway File (
input_file_id) — required only when you setcompletion_window:"immediate"(gateway-batch mode).
Using Bedrock Batch API through the AI Gateway
Create Batch Job
List Batch Jobs
Get Batch Job Details
Get Batch Output
List Batch Jobs
Cancel Batch Job
Information about Permissions and IAM Roles
For Principal Role (Used in Provider)
For Principal Role (Used in Provider)
These are the minimum permissions required to use the Bedrock Batch APIs. (Bedrock Docs](https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-permissions.html))
For Service Role (role_arn) used for creating and executing the batch job
For Service Role (role_arn) used for creating and executing the batch job
These are the minimum permissions required to use the Bedrock Batch APIs.Trust relationship:Permission Policy:
Defaults & Limits (Bedrock Native)
Portkey-Batch mode inherits the Gateway defaults (25 req / 5 s) and retries (3×) per request.

