'{username}', 'apiKey' => '{apiKey}', )); // 2. Create Compute service object $service = $client->computeService(null, '{region}'); // 3. Get empty keypair $keypair = $service->keypair(); $payload = <<create(array( 'name' => 'new_public_key', 'publicKey' => $payload ));