$apiKey, 'anthropic-version' => '2023-06-01', 'content-type' => 'application/json', ])->post('https://api.anthropic.com/v1/messages', [ 'model' => $model, 'max_tokens' => 256, 'messages' => [['role' => 'user', 'content' => $prompt]], ]); return trim($response->json('content.0.text') ?? ''); } }