Integrations
Anthropic-compatible clients
Configure Messages-protocol clients with the correct host base URL and authentication.
Use https://api.koscompute.com as the Anthropic-compatible base URL. Unlike OpenAI clients, do not append /v1 when the library itself adds /v1/messages.
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ["KOSCOMPUTE_API_KEY"],
base_url="https://api.koscompute.com",
)
message = client.messages.create(
model="qwen/qwen3.8-27b",
max_tokens=240,
messages=[{"role": "user", "content": "Explain a write-ahead log."}],
)
print(message.content[0].text)
The endpoint accepts x-api-key and Bearer authentication. It serves KosCompute models; it is not an Anthropic proxy and does not make Anthropic model IDs available.
Libraries sometimes send beta fields, metadata, or adaptive thinking controls. Compatibility fields can be accepted or consumed without implying identical upstream semantics. Test the exact tool and streaming workflow you rely on.