Why do my requests fail or bounce?
If you’re getting error code 401 (Unauthorized), you are rejected by the authorization check.
- check that you supply the Ocp-Apim-Subscription-Key header with the correct value
- make sure you are not going over the rate limit. See the rate limits at the Subscription Plans page
- make sure you did not exceed your monthly quota. Keep in mind that the Language Model API only allows about 100 requests for Community Plan and Small Plan. Visit the Subscription Plans page to upgrade, if applicable.
If you’re getting other error codes, make sure you are sending a valid JSON request. For example, if you have double quotes within your content, they must be properly escaped.
The purpose of Tisane API is to parse natural language, so sending markups like XML, HTML, or JSON as content is generally not a good idea. If you have to send markup content, make sure the double quotes are escaped. If you prefer to sanitize your input prior to the submission, you can invoke POST /helper/extract_text or simply use a regular expression like [<][^>]+[>] to locate and replace the markup.