When to call the API directly, when to use Claude Code CLI, and when you need both — a practical guide from the series finale