Use the Anthropic-compatible API when your app, agent, or coding tool expects Claude-style /v1/messages requests.
TypeScript
npm install @anthropic-ai/sdk
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.PHASEO_API_KEY,
baseURL: "https://api.phaseo.ai",
});
const message = await client.messages.create({
model: "anthropic/claude-sonnet-4.5",
max_tokens: 512,
messages: [{ role: "user", content: "Reply with only: ok" }],
});
console.log(message.content);
Python
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ["PHASEO_API_KEY"],
base_url="https://api.phaseo.ai",
)
message = client.messages.create(
model="anthropic/claude-sonnet-4.5",
max_tokens=512,
messages=[{"role": "user", "content": "Reply with only: ok"}],
)
print(message.content)
Notes
- Use the root host
https://api.phaseo.ai; Anthropic clients append /v1/messages.
- Use Anthropic Messages for endpoint details.
- Native Anthropic tool shapes can work where Phaseo supports them, but cross-provider server tools should use Phaseo tool names.
- If a workflow depends on streamed tool loops, test it before production rollout because Anthropic-compatible clients are stricter about tool event ordering.
Last modified on July 9, 2026