v2026.11.2
All Bundles
Bundle

Anthropic Messages API client (Claude). Plain and multi-turn chat with a system prompt, tool use, streaming over server-sent events, structured (JSON) output through a forced tool, and extended-thinking blocks. Responses and errors follow the other AI client libraries: a failed call returns Nil and EndPoint->GetLastError() says why. The key comes from SetApiKey, the ANTHROPIC_API_KEY environment variable, or anthropic_api_key.dat in the working directory. Requests go over HTTPS. Compile with -lib anthropic.

ToolUse

A tool call the model asked for. Run it, then return the result with Chat->AddToolResult using GetId().

Operations

GetArgument #

Get one input value as text (a number or boolean in its JSON form)

method : public : GetArgument(name:String) ~ String

Parameters

NameTypeDescription
nameStringparameter name

Return

TypeDescription
Stringvalue text, or Nil if absent

GetId #

Get the id the result must carry

method : public : GetId() ~ String

Return

TypeDescription
Stringtool use id

GetInput #

Get the call's input, an object keyed by parameter name

method : public : GetInput() ~ JsonElement

Return

TypeDescription
JsonElementinput

GetName #

Get the name of the tool to run

method : public : GetName() ~ String

Return

TypeDescription
Stringtool name