Tarseek API · Pre-production
Anthropic Messages
POST /v1/messages accepts the supported Anthropic Messages format and runs through Tarseek's permissions, project limits and BYOK credentials. Use Tarseek model IDs from the catalog.
Use the Anthropic SDK
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ["TARSEEK_API_KEY"],
base_url="https://tarseek.com",
)
with client.messages.stream(
model=os.environ["TARSEEK_MODEL_ID"],
max_tokens=512,
messages=[{"role": "user", "content": "Hello"}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
message = stream.get_final_message()Send x-api-key or Bearer authorization with a Tarseek key that permits inference. The supported version is 2023-06-01; omitted version headers use that contract. Conflicting credentials and beta headers are rejected. Request IDs are returned in request-id and x-request-id.
Request format
Send text, a plain-text system instruction, user images, and client tool calls. You can set temperature, top-p, max tokens, tool choice, and JSON schema output. Unknown fields are rejected so a request does not silently drop a setting.
See project controls for provider keys, budgets and exports.
