Skip to main content
POST
cURL
Beta FeatureThe Chat Completions API is currently in beta. It provides OpenAI Chat Completions API compatibility for clients like Cursor, Opencode, and other tools that use the OpenAI format. For production use, we recommend using the Responses API instead.

Overview

OpenAI Chat Completions API compatibility endpoint. Use Concentrate as a drop-in replacement for OpenAI in any tool or SDK that supports configurable base URLs.

Body

application/json
messages
(System Message · object | User Message · object | Assistant Message · object | Tool Message · object)[]
required

A list of messages comprising the conversation so far.

Minimum array length: 1
model
string
required

Model identifier. Use /v1/models to list all available models. Supports canonical names (e.g. gpt-5.2, claude-opus-4-6), aliases, and provider-prefixed formats (e.g. openai/gpt-5.2). Use "auto" for automatic model selection.

frequency_penalty
number | null

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

Required range: -2 <= x <= 2
function_call

Deprecated in favor of the tool_calls parameter. Will be converted to tool_choice. Using tool_choice will overwrite this.

Available options:
none,
auto
functions
object[] | null

Deprecated in favor of the tools parameter. Will be converted to tools when used.

logit_bias
object | null

Unsupported. Modify the likelihood of specified tokens appearing in the completion.

logprobs
boolean | null

Whether to return log probabilities of the output tokens. If true, logprobs will be included in the response.

max_completion_tokens
number | null

The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.

Required range: x > 0
max_tokens
number | null

Deprecated, use max_completion_tokens instead.

Required range: x > 0
metadata
object | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.

modalities
enum<string>[] | null

Unsupported. A list of modalities that the model supports. The model will use these modalities when processing the request.

Required array length: 1 - 2 elements
Available options:
text,
audio
n
integer | null

Unsupported. How many chat completion choices to generate for each input message.

Required range: 1 <= x <= 128
parallel_tool_calls
boolean | null

Whether to enable parallel function calling during tool use.

prediction
object | null

Unsupported. Specifies the model should predict a specified content, then continue generating naturally.

presence_penalty
number | null

Unsupported. Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

Required range: -2 <= x <= 2
prompt_cache_key
string | null

Optional custom identifier for managing prompt cache entries.

prompt_cache_options
object | null

OpenAI prompt-cache behavior for this request.

prompt_cache_retention
enum<string> | null

The legacy OpenAI prompt-cache retention policy. Earlier OpenAI models use this field for in-memory or 24-hour retention. GPT-5.6 and later use prompt_cache_options.ttl instead.

Available options:
in-memory,
in_memory,
24h
reasoning_effort
enum<string> | null

Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all models support all reasoning levels. If your requested reasoning level isn't supported by the model, Concentrate bumps it up, then down, to the closest reasoning level.

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max
response_format
Text Format · object

An object specifying the format that the model must output.

safety_identifier
string | null

Unique identifier to help detect when content may violate usage policies.

seed
string | null

Unsupported. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.

service_tier
enum<string> | null

Specifies which tier to use for processing the request.

Available options:
auto,
default,
flex,
scale,
priority
stop

Unsupported. Up to 4 sequences where the API will stop generating further tokens.

store
boolean | null

If true, the model's response will be stored for reuse by other requests.

stream
boolean | null

If true, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available.

stream_options
object | null
temperature
number | null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Required range: 0 <= x <= 2
tool_choice

Controls which (if any) function is called by the model.

Available options:
none,
auto,
required
tools
(Function Tool · object | Custom Tool · object)[] | null

A list of tools the model may call.

top_logprobs
integer | null

An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.

Required range: 0 <= x <= 20
top_p
number | null

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

Required range: 0 <= x <= 1
user
string | null

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

verbosity
enum<string> | null

Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses. Currently supported values are low, medium, and high.

Available options:
low,
medium,
high
web_search_options
object | null

Options for web search integration.

routing
object | null

Concentrate routing configuration controlling how requests are routed across models and providers. Learn more about routing.

Response

Default Response

id
string
required
model
string
required

The model used for the chat completion.

created
number
required

The Unix timestamp (in seconds) of when the chat completion was created.

Required range: x >= 0
object
string
required

The object type, which is always 'chat.completion' or 'chat.completion.chunk'.

choices
object[]
required

A list of chat completion choices. Can contain more than one if n is greater than 1.

usage
object
required

Usage statistics for the completion request.

cost
object
required

The cost of the completion request.

metadata
object | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.

service_tier
enum<string> | null

Specifies the processing type used for serving the request. Determines the pricing and performance tier used to process the request. When not set, the default behavior is auto. Currently unsupported, but included for compatibility.

Available options:
auto,
default,
flex,
scale,
priority
redact
object | null