Configuration
Environment variables
Section titled “Environment variables”| Variable | Required | Default | Description |
|---|---|---|---|
LANGSYS_API_KEY | Yes | — | Your Langsys API key |
LANGSYS_PROJECT_ID | Yes | — | Your project UUID |
LANGSYS_API_URL | No | https://api.langsys.dev/api | API base URL |
LANGSYS_CACHE_DRIVER | No | file | Cache driver: file, redis, or none |
LANGSYS_CACHE_PATH | No | System temp dir | Directory for file cache |
LANGSYS_CACHE_TTL | No | 3600 | Cache TTL in seconds |
LANGSYS_BASE_URL | No | Auto-detect | Base URL for resolving relative URLs in content blocks |
LANGSYS_LOG_PATH | No | — | Path to log file (logging disabled if not set) |
LANGSYS_LOG_LEVEL | No | info | Minimum log level: debug, info, warning, error |
Constructor options
Section titled “Constructor options”$client = new Client( 'your-api-key', // or null to use env 'your-project-id', // or null to use env [ 'api_url' => 'https://api.langsys.dev/api', 'cache_driver' => 'file', 'cache_path' => '/tmp/langsys-cache', 'cache_ttl' => 3600, 'cache_clear' => false, 'base_url' => 'https://example.com', 'log_path' => '/var/log/langsys.log', 'log_level' => 'info', ]);