Skip to main content
Set the official OpenAI SDK’s key to your Concentrate API key and its base URL to https://api.concentrate.ai/v1. You can then call the Responses API or Chat Completions API with Concentrate model IDs.

Install

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

Make a response

The examples below reuse the client configured above.

Stream text

Call a function

Define a function and ask the model to call it. Your app reads the arguments and runs the function.
See tool calling for sending a function result back to the model.

Get structured JSON

Explore more

Last modified on October 9, 2026