Anthropic Message API (Subscription)
This page documents the parameter support verified on the subscription channel. Models called with a subscription-channel API key must follow the parameter statuses documented here.
/messagesCall Claude through the native Anthropic Messages protocol. Parameter status comes from official documentation and HopsAPI/RelayPool tests.
Official parameters not supported on this channel: speed, diagnostics, fallbacks, fallback_credit_token, mcp_servers, top_k, top_p. Restricted: temperature (only 1 passes), inference_geo (organization type); output_format is deprecated (use output_config.format); cache_control is not a top-level parameter (place it inside messages[].content[], system, or tools[] blocks). See each parameter's entry in the table below for the exact rejection behaviour.
Authorization
apiKey HopsAPI API Key.
In: header
Header Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
x-api-key | string | Required | – | HopsAPI API Key. |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
anthropic-version | string | Optional | – | Recommended 2023-06-01. Omitted values succeeded in the 2026-08-25 HopsAPI retest; invalid-version validation is not guaranteed across gateway versions or accounts. |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
anthropic-beta | string | Optional | – | prompt-caching-2024-07-31 was verified. |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
anthropic-user-profile-id | string | Optional | – | The request was accepted in the 2026-08-25 HopsAPI retest, but no observable evidence proved that user-profile attribution took effect. Do not rely on this capability without account confirmation. |
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | – | Model ID. Use an authorized ID returned by GET /v1/models. |
max_ | integer | Required | – | Maximum output tokens. Required — send a positive integer. Omitting it currently does not error on this channel, but the effective default is unknown and the behaviour is not guaranteed. |
messages | array | Required | – | User / assistant messages. Text, images, search results, tool calls, and tool results were verified. Document processing requires a real valid PDF to verify end-to-end. |
messages[] | string | Conditional | – | Values: |
messages[] | string | array | Conditional | – | |
messages[] | string | Optional | – | Values: |
messages[] | string | Optional | – | |
messages[] | object | Optional | – | |
messages[] | string | Optional | – | |
messages[] | object | Optional | – | |
system | string | array | Optional | – | Top-level system prompt; do not put it in messages. |
system[] | string | Optional | – | Values: |
system[] | string | Optional | – | |
stream | boolean | Optional | false | Whether to return SSE streaming events. In the 2026-08-25 HopsAPI retest true, false, and omission all eventually succeeded, but non-streaming requests showed intermittent |
stop_ | array | Optional | – | Array of custom stop strings. |
thinking | object | Optional | – | Extended thinking; enabled, disabled, and adaptive were verified. |
thinking. | string | Optional | – | Values: |
thinking. | integer | Optional | – | Required when type is enabled; minimum 1024 (below 1024 returns 400 in testing). The official spec requires it to be less than max_tokens, but this channel does not enforce that: budget_tokens >= max_tokens still returns 200, with output truncated at max_tokens. |
thinking. | string | Optional | – | Values: |
tools | array | Optional | – | Client tool definitions. Strict schemas verified; the two-turn tool_result loop is verified on Claude Opus 5, while Claude Sonnet 5 has a known issue of returning 200 without using the tool result (tested 2026-08-18). |
tools[] | string | Conditional | – | |
tools[] | string | Optional | – | |
tools[] | object | Conditional | – | JSON Schema for tool input. For an object schema with strict=true, include additionalProperties=false. |
tools[] | boolean | Optional | – | |
tool_ | object | Optional | – | Tool selection object. A string such as auto is rejected; use {type: auto}, {type: any}, {type: tool, name: ...}, or {type: none}. |
tool_ | string | Conditional | – | Values: |
tool_ | string | Optional | – | |
tool_ | boolean | Optional | – | |
cache_ | object | Optional | – | Not a top-level parameter — sending it at the root has no effect. |
cache_ | string | Optional | – | Values: |
cache_ | string | Optional | – | Values: |
context_ | object | Optional | – | Context management; the tested shape was successful. |
metadata | object | Optional | – | Anonymous request metadata; user_id was verified. |
metadata. | string | Optional | – | |
output_ | object | Optional | – | JSON Schema structured output through output_config.format. |
output_ | object | Optional | – | |
output_ | string | Optional | – | Values: |
output_ | object | Optional | – | |
service_ | string | Optional | – | Service tier; auto and standard_only were verified. Values: |
speed | string | Optional | – | Unsupported: standard and fast return Extra inputs are not permitted. |
diagnostics | object | Optional | – | Unsupported: returns Extra inputs are not permitted. |
fallbacks | array | Optional | – | Unsupported: returns Extra inputs are not permitted. |
fallback_ | string | Optional | – | Unsupported on the current path. |
mcp_ | array | Optional | – | Unsupported: returns Extra inputs are not permitted. |
inference_ | string | Optional | – | Account restricted: unsupported for this organization type. |
output_ | object | Optional | – | Deprecated: use output_config.format. |
top_ | integer | Optional | – | Unsupported for Claude Opus 5 on this channel: the upstream rejects the request with a |
top_ | number | Optional | – | Unsupported for Claude Opus 5 on this channel: the upstream rejects the request with a |
temperature | number | Optional | – | This channel rejects the parameter as deprecated for this model: |
container | object | Optional | – | Shape pending: a request containing expires_at was rejected, which does not prove every shape is unsupported. |
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/messages" \ -H "x-api-key: sk-YOUR_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: prompt-caching-2024-07-31" \ -H "anthropic-user-profile-id: usr_example" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-opus-5", "max_tokens": 256, "stream": true, "messages": [ { "role": "user", "content": "Why is quicksort usually fast in Go?" } ] }'{ "id": "string", "type": "message", "role": "assistant", "model": "string", "content": [ { "type": "string", "text": "string", "thinking": "string", "signature": "string", "id": "string", "name": "string", "input": {} } ], "stop_reason": "string", "stop_sequence": "string", "usage": { "input_tokens": 0, "output_tokens": 0, "cache_creation_input_tokens": 0, "cache_creation": { "ephemeral_1h_input_tokens": 0 }, "cache_read_input_tokens": 0 }}