{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ru/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Migrating from Perspective API to Tisane API","projectTitle":"Tisane Developer Documentation","description":"Tisane is an NLP platform, used for content moderation & more.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"migrating-from-perspective-api-to-tisane-api","__idx":0},"children":["Migrating from Perspective API to Tisane API"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"why-migrate","__idx":1},"children":["Why Migrate?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google's Perspective API is being ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sunset in 2026"]}," and will no longer accept requests after 2026. Tisane API is a natural language processing platform purpose-built for content moderation, offering comparable – and in many ways broader – coverage of problematic content types, with multi-language support, structured JSON responses, severity ratings, and explainability built in."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide covers everything you need to migrate your integration: account setup, request/response format changes, and a full attribute mapping table."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1--create-a-tisane-account-and-obtain-an-api-key","__idx":2},"children":["Step 1 – Create a Tisane Account and Obtain an API Key"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://tisane.ai"},"children":["https://tisane.ai"]}," and sign up for a free account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in and navigate to your account dashboard to retrieve your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["primary or secondary API key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In every request, include your key as a header:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Ocp-Apim-Subscription-Key: YOUR_API_KEY\n"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," No Google Cloud project is required. Tisane authentication is handled entirely via this subscription key header."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2--understand-the-api-differences","__idx":3},"children":["Step 2 – Understand the API Differences"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"endpoint","__idx":4},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Perspective API"},"children":["Perspective API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tisane API"},"children":["Tisane API"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Method"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Endpoint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=API_KEY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.tisane.ai/parse"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Auth"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query parameter (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?key="]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Header (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ocp-Apim-Subscription-Key"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"paradigm","__idx":5},"children":["Paradigm"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The two APIs take a fundamentally different approach to content moderation:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Perspective API"]}," returns a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["probability score (0.0–1.0)"]}," for each attribute you explicitly request. You define thresholds in your own logic to decide what to act on."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tisane API"]}," returns ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["structured instances of problematic content"]}," under an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["abuse"]}," array, each with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["severity"]}," level (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["low"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["medium"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["high"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["extreme"]},"), the offending ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," span, character ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["length"]},", an optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["explanation"]},", and optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tags"]}," for sub-classification. You filter or act based on type and severity rather than numerical thresholds."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This means Tisane gives you richer, more actionable output out of the box, but it does require adapting your threshold-based logic to severity-based logic. Similar to Perspective's attributes, you also need to choose what types are relevant for you."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3--rewrite-your-request","__idx":6},"children":["Step 3 – Rewrite Your Request"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"perspective-api-request-before","__idx":7},"children":["Perspective API Request (before)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=YOUR_KEY\n\n{\n  \"comment\": {\n    \"text\": \"You are a complete idiot.\"\n  },\n  \"requestedAttributes\": {\n    \"TOXICITY\": {},\n    \"INSULT\": {},\n    \"PROFANITY\": {}\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tisane-api-request-after","__idx":8},"children":["Tisane API Request (after)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST https://api.tisane.ai/parse\nHeader: Ocp-Apim-Subscription-Key: YOUR_KEY\n\n{\n  \"language\": \"en\",\n  \"content\": \"You are a complete idiot.\",\n  \"settings\": {}\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Key differences:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["comment.text"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["content"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}," field (ISO 639-1 code, e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"en\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"de\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"fr\""]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Remove ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestedAttributes"]}," – Tisane returns all detected abuse types by default"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings"]}," object to configure output (optional but recommended)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["format"]}," setting (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"dialogue\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"review\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"alias\""]},") helps Tisane apply context-appropriate analysis"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4--rewrite-your-response-handling","__idx":9},"children":["Step 4 – Rewrite Your Response Handling"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"perspective-api-response-before","__idx":10},"children":["Perspective API Response (before)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"attributeScores\": {\n    \"TOXICITY\": {\n      \"summaryScore\": { \"value\": 0.92, \"type\": \"PROBABILITY\" }\n    },\n    \"INSULT\": {\n      \"summaryScore\": { \"value\": 0.88, \"type\": \"PROBABILITY\" }\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You would typically check: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["if (score > 0.7) { flag(); }"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tisane-api-response-after","__idx":11},"children":["Tisane API Response (after)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"text\": \"You are a complete idiot.\",\n  \"abuse\": [\n    {\n      \"sentence_index\": 0,\n      \"offset\": 0,\n      \"length\": 24,\n      \"text\": \"You are a complete idiot.\",\n      \"type\": \"personal_attack\",\n      \"severity\": \"high\",\n      \"explanation\": \"Calling someone an idiot\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You would typically check: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["if (abuse !== undefined && /* check if the types you need were found */ ) { flag(); }"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mapping severity to your old thresholds (suggested equivalents):"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["While the severity thresholds do not indicate probability, they may be used to prioritize decision making like the Perspective score."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tisane Severity"},"children":["Tisane Severity"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Equivalent Perspective Score Range"},"children":["Equivalent Perspective Score Range"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["low"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.30 – 0.50"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["medium"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.50 – 0.70"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["high"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.70 – 0.85"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["extreme"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.85 – 1.00"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5--attribute-mapping","__idx":12},"children":["Step 5 – Attribute Mapping"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table below maps each Perspective API attribute to its closest Tisane equivalent. Because Tisane uses a category + severity model rather than per-attribute scores, some Perspective attributes map to a Tisane type + severity filter combination."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"production-attributes","__idx":13},"children":["Production Attributes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Perspective Attribute"},"children":["Perspective Attribute"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Definition"},"children":["Definition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tisane Equivalent"},"children":["Tisane Equivalent"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TOXICITY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rude, disrespectful, or unreasonable comment likely to make people leave a discussion"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["personal_attack"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bigotry"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profanity"]}," (any severity)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane separates toxicity into specific subtypes for more actionable results"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SEVERE_TOXICITY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Very hateful, aggressive, or disrespectful content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["personal_attack"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bigotry"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profanity"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["severity: \"high\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"extreme\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filter by severity to match the high-confidence bar of SEVERE_TOXICITY"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDENTITY_ATTACK"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Negative or hateful comments targeting identity (race, religion, gender, etc.)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bigotry"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct equivalent – Tisane's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bigotry"]}," type covers protected class targeting"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSULT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Insulting, inflammatory, or negative comment towards a person"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["personal_attack"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct equivalent for attacks on conversation participants"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROFANITY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Swear words, curse words, or other obscene/offensive language"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profanity"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct equivalent; Tisane also detects obfuscated profanity (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["f***"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["THREAT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Describes an intention to inflict harm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["criminal_activity"]}," with tag ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threat"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane classifies explicit threats under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["criminal_activity"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"experimental-and-new-york-times-attributes","__idx":14},"children":["Experimental and New York Times Attributes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Perspective Attribute"},"children":["Perspective Attribute"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Definition"},"children":["Definition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tisane Equivalent"},"children":["Tisane Equivalent"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SEXUALLY_EXPLICIT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contains explicit sexual content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adult_only"]}," (with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sex"]}," tag) and/or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sexual_advances"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adult_only"]}," (with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sex"]}," tag) covers explicit sexual content; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sexual_advances"]}," covers solicitation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLIRTATION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pickup lines, compliments on appearance, or sexual advances"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sexual_advances"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sexual_advances"]}," type covers the full spectrum from flirting to explicit solicitation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ATTACK_ON_COMMENTER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attack on the author of an article or post"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["personal_attack"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["personal_attack"]}," covers attacks on any conversation participant"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INCOHERENT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Difficult to understand or lacking in coherent ideas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No direct equivalent; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["no_meaningful_content"]}," is closest"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane detects gibberish and meaningless content under this type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INFLAMMATORY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Intentionally inflammatory content likely to provoke anger"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentious"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentious"]}," type covers content likely to start adversarial arguments"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LIKELY_TO_REJECT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content a moderator would likely reject"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No direct equivalent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use Tisane's overall ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["abuse"]}," array combined with severity filtering as a proxy"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OBSCENE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Obscene or grossly offensive content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profanity"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["severity: \"high\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"extreme\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filter by higher severity levels to approximate Perspective's OBSCENE attribute"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SPAM"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Irrelevant or unsolicited bulk messages"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spam"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct equivalent – Tisane has a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spam"]}," abuse type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNSUBSTANTIAL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Trivial or short content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No direct equivalent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tisane does not have a direct unsubstantial signal; use text length checks in your own logic"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tisane-only-abuse-types-no-perspective-equivalent","__idx":15},"children":["Tisane-Only Abuse Types (No Perspective Equivalent)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These types are available in Tisane but have no Perspective API counterpart, giving you additional moderation coverage:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tisane Type"},"children":["Tisane Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["criminal_activity"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attempts to buy/sell illegal items, drugs, stolen data, criminal services"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["external_contact"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attempts to establish off-platform contact (phone, email, IM) – useful for gig economy or e-commerce platforms"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mental_issues"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content indicative of suicidal ideation or severe depression"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allegation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Claimed knowledge or accusation of misconduct"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bigotry"]}," (broader)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Covers implicit bigotry/hate speech/stereotyping, not just explicit slurs"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disturbing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content that is disturbing or distressing without being explicitly illegal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data_leak"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sharing of personally identifiable information (PII)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["social_hierarchy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attempts to establish dominance or superiority over another user"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-6--language-support","__idx":16},"children":["Step 6 – Language Support"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Perspective API supports a limited set of languages per attribute (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TOXICITY"]}," supports English, Spanish, French, German, Portuguese, Italian, Russian)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tisane API supports ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30+ languages"]}," with uniform abuse detection across all of them, including Arabic, Chinese (Simplified & Traditional), Japanese, Korean, Thai, Hebrew, Persian, Indonesian, and more. Set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}," field to the appropriate ISO 639-1 code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tisane API features built-in automatic language identification."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-7--advanced-settings","__idx":17},"children":["Step 7 – Advanced Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tisane exposes several optional settings that have no Perspective equivalent but are useful for fine-tuning moderation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"settings\": {\n  \"abuse\": true,\n  \"format\": \"alias\",           // Context hint: \"dialogue\", \"review\", \"proofread\", \"alias\", and more\n  \"snippets\": true,            // Return matching text snippets\n  \"explain\": true,             // Return human-readable explanations\n  \"sentiment\": false           // Omit sentiment analysis\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As Tisane does not store or log submitted text, Perspective's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["doNotStore"]}," flag is not relevant. However, if you have particular data residency or security requirements, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://tisane.ai/on-prem"},"children":["contact Tisane for the on-premises deployment option"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-code-migration-examples","__idx":18},"children":["Quick Code Migration Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-before--perspective","__idx":19},"children":["Python (before – Perspective)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import googleapiclient.discovery\n\nclient = googleapiclient.discovery.build(\"commentanalyzer\", \"v1alpha1\", developerKey=API_KEY)\n\nresponse = client.comments().analyze(body={\n    \"comment\": {\"text\": text},\n    \"requestedAttributes\": {\"TOXICITY\": {}, \"INSULT\": {}, \"PROFANITY\": {}}\n}).execute()\n\ntoxicity_score = response[\"attributeScores\"][\"TOXICITY\"][\"summaryScore\"][\"value\"]\nif toxicity_score > 0.7:\n    flag_content()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-after--tisane","__idx":20},"children":["Python (after – Tisane)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"Ocp-Apim-Subscription-Key\": API_KEY\n}\n\nresponse = requests.post(\"https://api.tisane.ai/parse\", json={\n    \"language\": \"en\",\n    \"content\": text,\n    \"settings\": {\"abuse\": True, \"explain\": True}\n}, headers=headers)\n\ndata = response.json()\nabuse_instances = data.get(\"abuse\", [])\n\nHIGH_SEVERITY = {\"high\", \"extreme\"}\nshould_flag = any(a[\"severity\"] in HIGH_SEVERITY for a in abuse_instances)\n\nif should_flag:\n    flag_content()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript-before--perspective","__idx":21},"children":["JavaScript (before – Perspective)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const response = await fetch(\n  `https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=${API_KEY}`,\n  {\n    method: \"POST\",\n    body: JSON.stringify({\n      comment: { text },\n      requestedAttributes: { TOXICITY: {}, INSULT: {} }\n    })\n  }\n);\nconst data = await response.json();\nconst score = data.attributeScores.TOXICITY.summaryScore.value;\nif (score > 0.7) flagContent();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript-after--tisane","__idx":22},"children":["JavaScript (after – Tisane)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const response = await fetch(\"https://api.tisane.ai/parse\", {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"Ocp-Apim-Subscription-Key\": API_KEY\n  },\n  body: JSON.stringify({\n    language: \"en\",\n    content: text,\n    settings: { abuse: true }\n  })\n});\nconst data = await response.json();\nconst abuse = data.abuse || [];\nconst highSeverity = abuse.some(a => [\"high\", \"extreme\"].includes(a.severity));\nif (highSeverity) flagContent();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"summary-checklist","__idx":23},"children":["Summary Checklist"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Sign up for Tisane and obtain API key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Replace endpoint URL and authentication method"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Change ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["comment.text"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["content"]},", add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}," field"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Remove ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestedAttributes"]}," from request body"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings"]}," object with desired output flags"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Update response parsing from score-based to severity/type-based logic"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Map your threshold logic to Tisane severity levels (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["low"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["medium"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["high"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["extreme"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Review Tisane-only types (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["criminal_activity"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["external_contact"]},") for additional coverage"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Test with representative content samples across all languages you support"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Complete migration before Perspective API end-of-service in 2026"]}]}]},"headings":[{"value":"Migrating from Perspective API to Tisane API","id":"migrating-from-perspective-api-to-tisane-api","depth":1},{"value":"Why Migrate?","id":"why-migrate","depth":2},{"value":"Step 1 – Create a Tisane Account and Obtain an API Key","id":"step-1--create-a-tisane-account-and-obtain-an-api-key","depth":2},{"value":"Step 2 – Understand the API Differences","id":"step-2--understand-the-api-differences","depth":2},{"value":"Endpoint","id":"endpoint","depth":3},{"value":"Paradigm","id":"paradigm","depth":3},{"value":"Step 3 – Rewrite Your Request","id":"step-3--rewrite-your-request","depth":2},{"value":"Perspective API Request (before)","id":"perspective-api-request-before","depth":3},{"value":"Tisane API Request (after)","id":"tisane-api-request-after","depth":3},{"value":"Step 4 – Rewrite Your Response Handling","id":"step-4--rewrite-your-response-handling","depth":2},{"value":"Perspective API Response (before)","id":"perspective-api-response-before","depth":3},{"value":"Tisane API Response (after)","id":"tisane-api-response-after","depth":3},{"value":"Step 5 – Attribute Mapping","id":"step-5--attribute-mapping","depth":2},{"value":"Production Attributes","id":"production-attributes","depth":3},{"value":"Experimental and New York Times Attributes","id":"experimental-and-new-york-times-attributes","depth":3},{"value":"Tisane-Only Abuse Types (No Perspective Equivalent)","id":"tisane-only-abuse-types-no-perspective-equivalent","depth":3},{"value":"Step 6 – Language Support","id":"step-6--language-support","depth":2},{"value":"Step 7 – Advanced Settings","id":"step-7--advanced-settings","depth":2},{"value":"Quick Code Migration Examples","id":"quick-code-migration-examples","depth":2},{"value":"Python (before – Perspective)","id":"python-before--perspective","depth":3},{"value":"Python (after – Tisane)","id":"python-after--tisane","depth":3},{"value":"JavaScript (before – Perspective)","id":"javascript-before--perspective","depth":3},{"value":"JavaScript (after – Tisane)","id":"javascript-after--tisane","depth":3},{"value":"Summary Checklist","id":"summary-checklist","depth":2}],"frontmatter":{"seo":{"title":"Migrating from Perspective API to Tisane API"}},"lastModified":"2026-03-11T10:32:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ru/guides/how-tos/perspectivemigration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}