Accessing Jibber AI (Rapid API) using PowerShell
To access RapidAPI from PowerShell, you can use the Invoke-RestMethod command in combination with your RapidAPI key.
Here are the basic steps to get you started:
Here's an example using Invoke-RestMethod:
Function Analyze-Text-RapidAPI([string]$Text)
{
$headers=@{}
$headers.Add("x-rapidapi-host", "jibber-analyzer.p.rapidapi.com")
$headers.Add("x-rapidapi-key", "your-rapid-api-key")
$body = @"
{
"features": {
"sentiment": true,
"keyword": true,
"summary": true,
"entities": true,
"pii": true
},
"text": "$Text"
}
"@
$response = Invoke-RestMethod -Uri 'https://jibber-analyzer.p.rapidapi.com/en/analyze' -Method POST -Headers $headers -Body $body -ContentType "application/json"
return $response
}
$result = Analyze-Text-RapidAPI "My name is Julia Peach and I live in Paris."
Write-Output($result.entity)
In the above example, replace your-rapid-api-key with your RapidAPI key.
For other languages, change the /en/ in the Uri to the language of choice: