Skip to content

Start here

Quickstart

Send a call through a Syderial door with the OpenAI or Anthropic SDK you already use. You change the base URL and add your credential.

A Syderial door accepts the same requests as the API your client was written for. This guide sends one call through the chat completions door, then repeats it through the messages and responses doors.

  1. Save your credential.

    Your credential arrives as request headers, one Name: value pair per line. Save them to a file named syderial-headers.txt and keep that file out of source control.

    syderial-headers.txt
    <header name issued to you>: <value issued to you>
    <header name issued to you>: <value issued to you>

    The door identifies you from these headers, never from the request body. Your organization and identity come from the credential, so a request can’t claim to be someone else.

  2. Set your door address.

    export SYDERIAL_DOOR_URL="https://YOUR-DOOR-ADDRESS"
  3. Install the SDK you already use.

    pip install openai anthropic
  4. Load the credential in your client.

    Both SDKs accept extra headers on every request. A small helper reads the file from step 1.

    syderial_headers.py
    from pathlib import Path
    def load_headers(path="syderial-headers.txt"):
    """Read the issued credential headers, one 'Name: value' per line."""
    headers = {}
    for line in Path(path).read_text().splitlines():
    if ":" in line:
    name, value = line.split(":", 1)
    headers[name.strip()] = value.strip()
    return headers
  5. Find a model alias.

    The model field takes an alias configured for your organization. List them with the standard models call.

    import os
    from openai import OpenAI
    from syderial_headers import load_headers
    client = OpenAI(
    base_url=os.environ["SYDERIAL_DOOR_URL"] + "/v1",
    api_key="unused", # the door reads the credential headers, not this field
    default_headers=load_headers(),
    )
    for model in client.models.list():
    print(model.id)

    Set the alias you want to use:

    export SYDERIAL_MODEL="<a model alias from the list>"
  6. Send a call.

    call.py
    import os
    from openai import OpenAI
    from syderial_headers import load_headers
    client = OpenAI(
    base_url=os.environ["SYDERIAL_DOOR_URL"] + "/v1",
    api_key="unused",
    default_headers=load_headers(),
    )
    completion = client.chat.completions.create(
    model=os.environ["SYDERIAL_MODEL"],
    messages=[
    {"role": "user", "content": "When did V-204 fail, and how do we know?"},
    ],
    )
    print(completion.choices[0].message.content)

Syderial answers from the entries you’re cleared to see. If the record has nothing on the question, the door says so. If the answer is behind a boundary you aren’t cleared for, you get a refusal that names no one and reveals nothing about the withheld entries.

The Anthropic SDK adds /v1/messages to its base URL, so pass the door address without /v1.

import os
import anthropic
from syderial_headers import load_headers
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=1024,
messages=[
{"role": "user", "content": "When did V-204 fail, and how do we know?"},
],
)
print(message.content[0].text)
response = client.responses.create(
model=os.environ["SYDERIAL_MODEL"],
input="When did V-204 fail, and how do we know?",
)
print(response.output_text)

Here client is the OpenAI client from step 6.

All three doors stream server-sent events when you set stream, in the event format each API defines.

stream = client.chat.completions.create(
model=os.environ["SYDERIAL_MODEL"],
messages=[{"role": "user", "content": "Summarise the V-204 record."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)