Amazon Bedrock
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is Amazon Bedrock?
Amazon Bedrock is a fully managed service that offers foundation models from leading AI providers through a single API. Respan can auto-instrument all Bedrock calls for tracing, route them through the Respan gateway, or both.
Setup
Use Respan Gateway instead? Only need Respan api key, easier setup.
Install packages
OpenInference (Recommended)
Traceloop
Set environment variables
No AWS credentials needed — the Respan gateway handles provider authentication.
Initialize and run
OpenInference (Recommended)
Traceloop
Configuration
Attributes
Attach customer identifiers, thread IDs, and metadata to spans.
In Respan()
Set defaults at initialization — these apply to all spans.
With propagate_attributes
Override per-request using a context manager.
Decorators
Use @workflow and @task to create structured trace hierarchies.
Examples
Basic invoke
Gateway features
The features below require the Respan gateway. Follow the Use Respan Gateway instead? Only need Respan api key, easier setup. accordion under Setup.
Switch models
Change the model parameter to use 250+ models from different providers through the same gateway.
See the full model list.
Respan parameters
Pass additional Respan parameters via extra_body for gateway features.
See Respan parameters for the full list.