Claude API · Errors and configuration
Set a timeout and retries for one call
Override client settings for a single request without changing the client.
client.with_options(timeout=30.0, max_retries=5).messages.create(
model="claude-opus-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
Official Claude API documentation
More errors and configuration commands
All errors and configuration commands · Claude API cheatsheet