PHP SDK - Onboarding
Download PHP SDK v1.1.1
This guide walks you through downloading, configuring, and verifying the Neuramancer PHP SDK.
1. Assumptions
Section titled “1. Assumptions”This guide is meant to be followed step-by-step using your terminal/command line.
Full Walkthrough: ~15 - 45 minutes, depending on your experience with APIs and SDKs.
We assume:
- You are running Linux, macOS, or WSL2 on Windows.
- You have at least basic knowledge of using the command line, installing software, and editing text files.
- You have an active Neuramancer tenant with API access (you received a
.envfile from us). - You can reach the internet from your computer without restrictions (e.g., no firewalls, no proxies).
- In case of using custom blob storage (S3, Azure), you have the necessary credentials and permissions to upload/download files to the configured storage.
2. API Credentials
Section titled “2. API Credentials”Before you begin, make sure you have API credentials — Contact Neuramancer support if you lack any of these:
- API key
- Tenant name
- API endpoint URL
- Optionally, your custom storage endpoint config (S3, Azure) if you have discussed specific requirements with us
We will provide a specific .env file, which you only need to copy into the root folder of the SDK.
See the Environment Variables Guide for full details.
3. SDK Download
Section titled “3. SDK Download”wget https://docs.neuramancer.de/releases/neuramancer-sdk-php-PublicSdk-v1.1.1.zip \ -O neuramancer-sdk-php-PublicSdk-v1.1.1.zip
unzip neuramancer-sdk-php-PublicSdk-v1.1.1.zip -d neuramancer-sdk-php-PublicSdk-v1.1.1cd neuramancer-sdk-php-PublicSdk-v1.1.1You are now in the root folder of the extracted SDK package.
Copy your provided .env file into this folder, or create a new one based on env-default.
4. SDK Setup
Section titled “4. SDK Setup”4.1 Recommended: Automatic Setup
Section titled “4.1 Recommended: Automatic Setup”The SDK includes a setup.sh script that automates the installation of dependencies and tools, including azcopy for Azure Blob Storage support.
bash setup.shOnly if you choose NOT to run the setup.sh script, continue with 4.2 for manual installation instructions.
4.2 Alternatively: Manual Install
Section titled “4.2 Alternatively: Manual Install”Should you prefer to install the SDK manually without running the setup.sh script, please ensure you have the following prerequisites installed on your system:
4.2.1 Optional: Install azcopy (Azure Blob Storage Support)
Section titled “4.2.1 Optional: Install azcopy (Azure Blob Storage Support)”The SDK uses Microsoft’s azcopy CLI tool for uploading images to Azure Blob Storage.
Please install azcopy via Microsoft’s official documentation.
Make sure the azcopy folder contains the azcopy executable and that it’s added to your system’s PATH variable.
4.2.2 Install Utility Tools
Section titled “4.2.2 Install Utility Tools”To enhance your experience with the SDK, you may want to install the following command-line tools:
sudo apt-get updatesudo apt-get install curl jq unzip wget php php-curlFor verification, you can check the installed versions:
curl --versionjq --versionunzip -vwget --versionphp -vphp -m | grep curl5. Custom Storage and Webhook Configuration and Tenant Update
Section titled “5. Custom Storage and Webhook Configuration and Tenant Update”In case you’re using custom blob storage (S3, Azure), chances are you will need to update your tenant configuration, so that our API can authenticate against your blob storage.
5.1 Update the .env File
Section titled “5.1 Update the .env File”Depending on whether you use S3 or Azure Blob Storage,
you need to set the following environment variables in your .env file:
For S3 Storage:
TENANT_NAME=YOUR_TENANT_NAMEAPI_KEY=YOUR_API_KEYAPI_ENDPOINT=https://api.neuramancer.dev
STORAGE_TYPE=s3S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_IDS3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEYS3_ENDPOINT_URL=YOUR_S3_ENDPOINT_URL_WITHOUT_TRAILING_SLASHS3_REGION_NAME=YOUR_REGION_NAMES3_BUCKET_NAME=YOUR_BUCKET_NAMES3_PORT=443S3_USE_SSL=trueS3_PRESIGNED_URL_EXPIRY_SECONDS=604800S3_CORS_ALLOWED_ORIGINS=https://app.neuramancer.dev,https://app.neuramancer.deExample values
Section titled “Example values”Only for reference - these follow the exact patterns of real credentials, but they are random/arbitrarily chosen values:
TENANT_NAME=foo1# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:API_KEY=sk-KGJ6s-9k-LReP073fxyQAUO7GvC8w9Z73GL0VyKh62API_ENDPOINT=https://api.neuramancer.dev
STORAGE_TYPE=s3# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:S3_ACCESS_KEY_ID=BMGS89HGTV9KL65987FZ# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:S3_SECRET_ACCESS_KEY=AiCNnfsg6WcdcIZpQ0dQcv9BuklalSiQ7H71jZrS3_ENDPOINT_URL=foo1.your-objectstorage.comS3_BUCKET_NAME=my-bucket-nameS3_PORT=443S3_USE_SSL=trueS3_PRESIGNED_URL_EXPIRY_SECONDS=604800S3_CORS_ALLOWED_ORIGINS=https://app.neuramancer.dev,https://app.neuramancer.de5.2 Run the Update Tenant Script
Section titled “5.2 Run the Update Tenant Script”Now run: php update_tenant_e2e.php.
This will read the storage configuration from your .env file
and update your tenant configuration in our system accordingly.
🎉 Congratulations! Your tenant is now configured to use your custom blob storage!
Next steps
Section titled “Next steps”See the PHP SDK Reference for CLI usage, library integration, the full API surface, E2E tests, and benchmarking.
