Skip to main content

Minimal request

cURL example

Python example

Node.js example

Best practices

  • system is top-level rather than part of messages
  • Keep Claude’s block structure even for pure-text chat
  • Set max_tokens explicitly to avoid accidental truncation