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": [
    {
      "content": "<string>"
    }
  ],
  "max_tokens": 4503599627370495,
  "model": "<string>",
  "provider": "<string>",
  "cache_control": "<unknown>",
  "metadata": {
    "user_id": "<string>"
  },
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {}
    }
  },
  "stream": true,
  "system": "<string>",
  "temperature": 0.5,
  "thinking": {
    "type": "enabled",
    "budget_tokens": 1025
  },
  "tool_choice": {
    "type": "auto",
    "disable_parallel_tool_use": true
  },
  "tools": [],
  "top_p": 0.5,
  "container": "<string>",
  "inference_geo": "<string>",
  "service_tier": "<string>",
  "stop_sequences": [
    "<string>"
  ],
  "top_k": 4503599627370495
}
'
{
  "id": "<string>",
  "type": "message",
  "role": "assistant",
  "model": "<string>",
  "content": [
    {
      "type": "text",
      "text": "<string>",
      "cache_control": "<unknown>",
      "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
    },
    "cache_creation": {
      "ephemeral_5m_input_tokens": 1,
      "ephemeral_1h_input_tokens": 1
    }
  },
  "cost": {
    "total": 123
  },
  "stop_sequence": "<string>"
}
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: 0 < 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 4043 allowed values.

cache_control
any
metadata
object

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, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

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

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