POST /messages
Provider capabilities
The table below summarizes gateway support for this endpoint by provider.Legend:
- ✅ Supported by Provider and Truefoundry
- Provided by provider, but not by Truefoundry
- Provider does not support this feature
| Provider | Messages API |
|---|---|
| Anthropic | ✅ |
Prerequisites
To use the Anthropic Messages API through Truefoundry, you’ll need:- TrueFoundry API Key
- Provider account configured in TrueFoundry (Anthropic)
- Python environment with
anthropic sdklibrary installed
Using the Anthropic SDK
The Anthropic Python SDK provides a convenient way to interact with Claude models. Here’s how to configure it to work with the Truefoundry proxy:The gateway accepts both Anthropic SDK auth patterns and translates internally:
api_key=TFY_API_KEY- SDK sends thex-api-keyheaderauth_token=TFY_API_KEY— SDK sends theAuthorization: Bearerheader
api_key is the idiomatic Anthropic SDK pattern - use it unless you have a reason to send a Bearer token.