Start here
Send a server-side request with your subscription key and a minimal payload.
$headers = @{
"Ocp-Apim-Subscription-Key" = "<YOUR_SUBSCRIPTION_KEY>"
"Content-Type" = "application/json"
}
$body = @{ texts = @("The World is Beautiful") } | ConvertTo-Json -Depth 6
Invoke-RestMethod -Method POST -Uri "https://api.smsquared.ai/v1/predict" -Headers $headers -Body $body
Auth
- Use the
Ocp-Apim-Subscription-Keyheader. - Keep the key server-side. Do not ship it to browser JavaScript.
- Rotate the key if you suspect exposure.
Request and response
- Send the smallest payload that captures the decision context.
- Expect a decision label plus supporting metadata for downstream routing.
- Use the returned result to decide whether to execute, defer, or escalate.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid key |
| 403 | Forbidden due to plan, quota, or policy restriction |
| 422 | Invalid request body |
| 429 | Rate limited; respect Retry-After |
Support and trust
For implementation questions, contact support@smsquared.ai. For legal and policy review, use the Trust Center.