import os
from anthropic import Anthropic
client = Anthropic(base_url="https://api.naga.ac", api_key=os.environ["NAGAAI_API_KEY"])
message = client.messages.create(
model="deepseek-v4.1-flash",
max_tokens=4096,
thinking={"type": "enabled", "budget_tokens": 2048},
messages=[{"role": "user", "content": "A bat and a ball cost 1.10 in total. The bat costs 1.00 more than the ball. What does the ball cost?"}],
)
for block in message.content:
if block.type == "thinking":
print("Thinking:", block.thinking)
elif block.type == "text":
print("Answer:", block.text)