Recommended endpoint
Minimal request
cURL example
Python example
Node.js example
Best practices
systemis top-level rather than part ofmessages- Keep Claude’s block structure even for pure-text chat
- Set
max_tokensexplicitly to avoid accidental truncation
