anthropic-sdk-php

(β˜… 175)

Access to Anthropic's safety-first language model APIs in PHP

  • .gitattributes
  • .gitignore
  • .php-cs-fixer.dist.php
  • .phpactor.json
  • .release-please-manifest.json
  • .stats.yml
  • CHANGELOG.md
  • composer.json
  • CONTRIBUTING.md
  • LICENSE
  • phpstan.dist.neon
  • phpunit.xml.dist
  • README.md
  • release-please-config.json
  • SECURITY.md

# Installation Guide

1. Get the code
git clone https://github.com/anthropics/anthropic-sdk-php

Downloads the entire project code from GitHub to your computer.

cd anthropic-sdk-php

Moves into the project folder you just downloaded.

2. PHP (Composer)

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • PHP A PHP runtime is required.
  • Composer The package manager used to install PHP libraries.
composer require "anthropic-ai/sdk:^0.43.0"

Type this command into your terminal and run it.

composer require guzzlehttp/guzzle

Type this command into your terminal and run it.

βœ… Run it with a built-in server like php -S localhost:8000, then open http://localhost:8000 in your browser.

Pulled directly from this repo's README.

// repository documentation