Skip to main content
Use the official Anthropic SDKs with Concentrate’s Messages API. Set the base URL to https://api.concentrate.ai.

Install

Set CONCENTRATE_API_KEY in your environment. Keep it on your server; do not expose it in browser code.

Create a message

The examples below reuse the client configured above.

Stream text

Call a function

Define a tool and read the arguments the model returns. Your app runs the function.
To continue the conversation, include the assistant’s response in the next request, followed by a user message containing a tool_result block with tool_use_id set to call.id. See Anthropic’s tool use guide.

Get structured JSON

Explore more

  • Send images with multimodal input.
  • Continue a conversation by passing previous user and assistant messages in messages.
Use https://api.concentrate.ai for the Anthropic SDK base URL. The SDK adds the Messages API path automatically.
Last modified on October 9, 2026