{"repo":"claude-php/Claude-PHP-SDK","free":true,"listed":false,"github":"https://github.com/claude-php/Claude-PHP-SDK","clone":"git clone https://github.com/claude-php/Claude-PHP-SDK.git","description":"PHP SDK for Claude - Provides complete 1-for-1 functionality of the Official Python SDK","language":"PHP","stars":146,"topics":["ai","anthropic","anthropic-claude","claude","claude-ai","claude-api","php","php-sdk","php-sdks","sdk"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Claude PHP SDK If this saves you time, a star on GitHub helps other PHP developers find it. The unofficial PHP client for the Anthropic Claude API. Requires PHP 8.1+, Composer, and an Anthropic API key. --- Quick start The SDK reads ANTHROPIC API KEY from the environment automatically if you don't pass apiKey explicitly. --- Sending messages Streaming For helper methods over raw events, wrap the stream in MessageStream : See examples/streaming comprehensive.php for all event types. Multi-turn conversations --- Tool use Define tools with a name, description, and JSON Schema input definition. Claude calls them; your code runs them. For automatic tool loop execution, use the built-in tool runner: See examples/tool use overview.php for the full workflow. --- Extended thinking Claude can reason step-by-step before answering. Three modes are available: Mode Behaviour When to use ---------- ----------------------------------- ----------------------------------- disabled No internal reasoning Fast responses, simple prompts enabled Always reasons; set budget tokens Deep analysis, guaranteed reasoning adaptive Model decides based on the prompt Mixed workloads, cost-conscious See examples/extended thinking.php and examples/adaptive thinking.php. --- Vision and documents Pass images as base64 or by URL. Pass PDFs or files via the Files API. See examples/vision comprehensive.php · examples/pdf support.php · examples/files api.php. --- Batch processing Process large numbers of requests at ","default_branch":null,"files":null,"tree":[],"storefront":"/r/claude-php","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/claude-php/Claude-PHP-SDK/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}