Skip to content

API reference

Messages

POST /v1/messages. The Anthropic messages format, answered from the record within the caller's clearance.

POST https://YOUR-DOOR-ADDRESS/v1/messages

Requests and responses follow the Anthropic messages API. Use the Anthropic SDK with base_url set to your door address (without /v1, which the SDK adds) and your credential headers as default headers. See Doors and credentials.

Field Type Notes
model string, required A model alias configured for your organization. See Models.
max_tokens integer, required Upper bound on generated tokens.
messages array, required Non-empty. Roles user and assistant. Content is a string or an array of text, image, tool_use and tool_result blocks.
system string or array A string or an array of text blocks.
tools array Client tools, as in the standard API.
tool_choice object As in the standard API.
metadata object As in the standard API.
stream boolean true streams server-sent events in the standard event format.

A request body can’t include organization or principal identity. The door limits the number of messages and tools per request.

import os
import anthropic
from syderial_headers import load_headers # helper from the Quickstart
client = anthropic.Anthropic(
base_url=os.environ["SYDERIAL_DOOR_URL"],
api_key="unused",
default_headers=load_headers(),
)
message = client.messages.create(
model=os.environ["SYDERIAL_MODEL"],
max_tokens=800,
system="Answer from the record. Say when the record is silent.",
messages=[
{"role": "user", "content": "Which decisions changed the V-204 maintenance plan?"},
],
)
print(message.content[0].text)
with client.messages.stream(
model=os.environ["SYDERIAL_MODEL"],
max_tokens=800,
messages=[{"role": "user", "content": "Summarise the V-204 record."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)

A standard message object, or a standard event stream when stream is true. Syderial adds the evidence and a receipt reference alongside the standard fields. See What Syderial adds to a response.