Anthropic

Create message (Anthropic-compatible)

Creates a model response using Anthropic's native request format. Supports Claude models with vision and streaming.

Authentication: Use x-api-key header or Authorization: Bearer header.

post/v1/messages

Request

  • Base URL: https://api.tokenlab.sh
  • URL: https://api.tokenlab.sh/v1/messages
  • Auth: HTTP bearer

Headers

X-TokenLab-Delivery-Policy'auto' | 'verified' | 'official'

Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.

Request body

modelstring required

Model to use (e.g., claude-sonnet-4-6)

max_tokensinteger required

Maximum number of tokens to generate

systemstring

System prompt

temperaturenumber
top_pnumber
top_kinteger
stop_sequencesstring[]
streamboolean
toolsobject[]

Tool definitions available to the model.

metadataobject

Request metadata echoed into downstream logs or traces when supported.

thinkingobject

Thinking configuration for compatible Anthropic-style models.

stream_optionsobject

Streaming options such as usage chunk inclusion.

service_tierstring

Service tier hint where supported by the model.

Example request

{
  "model": "claude-sonnet-4-6"
}

Response

Successful response

idstring
type'message'
role'assistant'
modelstring
stop_reason'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use'
stop_sequencestring nullable

Example response

{
  "id": "msg_01XFDUDYJgAACzvnptvVoYEL"
}

Changes

No recorded changes to this operation across all 1 revision of this API.