Skip to main content
Server-side only — This SDK is designed for server-side environments (Laravel, Symfony, PHP scripts). Never use it in browser/frontend code as this exposes your API key. See Frontend Integration for the proxy pattern.
The official Zavu SDK for PHP provides a clean interface to the Zavu API with full type support.

Installation

Requirements

  • PHP 8.1 or higher
  • Composer

Quick Start

Configuration

Initialize the Client

Environment Variables

We recommend storing your API key in environment variables:

Accessing Response Headers

Use ->withRawResponse() to access the full HTTP response including headers:

Error Handling

Error Types

Retries

The SDK supports automatic retries with configurable backoff:

Laravel Integration

For Laravel applications, set your API key in .env:
Use the SDK in your controllers or services:

Symfony Integration

For Symfony applications, configure the API key as a parameter: