How to make requests to Gemini using the Claude (Anthropic) SDK
Blog post from Braintrust
Braintrust AI Gateway facilitates seamless integration between Google's Gemini models and Anthropic's SDK, allowing developers to use Gemini models without altering their existing Anthropic SDK setup. By pointing the Anthropic client to the Braintrust gateway URL and authenticating with a Braintrust API key, developers can maintain their usual request patterns while accessing Gemini models, as Braintrust handles the format conversion and response structure. This integration eliminates the need to support multiple SDKs and request logic, enabling teams to switch models by simply changing the model name in the existing code. Braintrust supports a variety of AI providers, including OpenAI, Anthropic, Google, and more, and offers a centralized place to manage provider credentials, which are securely stored and kept out of application code. Additionally, Braintrust provides logging and caching features to track requests, token usage, and costs, thereby simplifying the management of multiple models and providers within a single application framework.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.