Skip to main content
POST
/
v1
/
messages
cURL
curl --request POST \
  --url https://api.concentrate.ai/v1/messages/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": "<string>"
    }
  ],
  "max_tokens": 123,
  "model": "<string>",
  "provider": "<string>",
  "system": "<string>",
  "temperature": 0.5,
  "top_p": 0.5,
  "top_k": 123,
  "stop_sequences": [
    "<string>"
  ],
  "stream": true,
  "tools": [],
  "tool_choice": {
    "type": "auto",
    "disable_parallel_tool_use": false
  },
  "metadata": {
    "user_id": "<string>"
  },
  "thinking": {
    "type": "enabled",
    "budget_tokens": 1025
  },
  "output_config": {
    "effort": "low",
    "format": {
      "type": "json_schema",
      "schema": {}
    }
  },
  "cache_control": {
    "type": "ephemeral",
    "ttl": "5m"
  }
}
'
{
  "id": "<string>",
  "type": "message",
  "role": "assistant",
  "model": "<string>",
  "content": [
    {
      "type": "text",
      "text": "<string>",
      "cache_control": {
        "type": "ephemeral",
        "ttl": "5m"
      },
      "citations": [
        {
          "type": "web_search_result_location",
          "title": "<string>",
          "url": "<string>",
          "cited_text": "<string>",
          "encrypted_index": "<string>"
        }
      ]
    }
  ],
  "usage": {
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "inference_geo": "<string>",
    "input_tokens": 0,
    "output_tokens": 0,
    "server_tool_use": {
      "web_fetch_requests": 0,
      "web_search_requests": 0
    },
    "service_tier": "standard",
    "cache_creation": {
      "ephemeral_5m_input_tokens": 1,
      "ephemeral_1h_input_tokens": 1
    }
  },
  "cost": {
    "total": 123
  },
  "stop_reason": "end_turn",
  "stop_sequence": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Beta FeatureThe Messages API is currently in beta. It provides Anthropic Messages API compatibility for clients like Claude Code. For production use, we recommend using the Responses API instead.

Overview

The Messages API provides compatibility with the Anthropic Messages API format. It’s designed primarily for clients that expect Anthropic’s API structure, such as Claude Code and other tools built for Claude’s API.

Body

application/json
messages
object[]
required
Minimum array length: 1
max_tokens
integer
required
Required range: x <= 9007199254740991
model
string

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.

provider
string

One of 3078 allowed values.

system
temperature
number | null
Required range: 0 <= x <= 1
top_p
number | null
Required range: 0 <= x <= 1
top_k
integer | null
Required range: x <= 9007199254740991
stop_sequences
string[] | null
stream
boolean | null
tools
object[]
tool_choice
object
metadata
object
thinking
object
output_config
object
cache_control
object

Response

Default Response

id
string
required
type
enum<string>
required
Available options:
message
role
enum<string>
required
Available options:
assistant
model
string
required
content
object[]
required
usage
object
required
cost
object
required
stop_reason
enum<string> | null
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use,
pause_turn,
refusal
stop_sequence
string | null