- Host:
analytics.babelstreet.com/rest/v1. The oldapi.rosette.comstill answers, but the current docs and the official bindings point here, so this plugin uses the new host. - Header:
X-BabelStreetAPI-Key. The legacyX-RosetteAPI-Keyis still accepted by the server, but the bindings send the new one and so does the plugin.
403 with {"code":"forbidden","message":"you have either provided an invalid API key, or are not authorized to call the endpoint, or have exceeded the daily or monthly API call limits"} — captured live on every endpoint. A profileId the account does not have gets the same answer. The plugin never retries that, because two of the three cannot be fixed by a retry, and it keeps the endpoint on the error so a failing call is identifiable.
Every analysis takes the same shape:
- Give
contentorcontentUri, never both.contentUrifetches the page server-side over http, https, ftp or ftps. The plugin rejects a request with neither, since there is nothing to analyse, and one with both, since Rosette treats them as alternatives. languageandprofileIdare optional. Settinglanguageskips detection and is worth doing when you know it, because detection errors change the result of every downstream analysis. AprofileIdapplies a saved profile.- A retry costs one more API call. With
contentit returns the same answer. WithcontentUriRosette fetches the page again, so a page that changed in between gives a different answer.
languagereturns onlylanguageDetections, most likely first. There is no separate top-level answer: the first candidate is the result.entitiesgroups mentions byentityId, so an entity’scountis how many times it appears, andmentionOffsetsholds the start and end of each one. AQ…ID is a Wikidata item; aT…ID is local to the text.sentimentgives the document alabel(pos,negorneu) and aconfidence; each entity carries its own label and confidence undersentiment.tokensreturns the tokens only. For part-of-speech tags and lemmas, callmorphology, which returnstokens,posTagsandlemmasas arrays in the same order, pluscompoundComponentsandhanReadingswithnullfor a token that has none.sentencesreturns each sentence as text, with its trailing whitespace.topicsreturnskeyphrases(phrases from the text) andconcepts(broader themes with a WikidataconceptId), each with a salience rather than a probability, so the scores are not comparable across documents the way a probability would be.relationshipslinksarg1andarg2(sometimesarg3) through apredicate, such asPER-EMPLOYEE-MEMBER-OF.semantics.similarTermsneedsresultLanguages(for example["eng"]); the API refuses the call without it. The answer is keyed by language.semantics.vectorreturnsdocumentEmbedding, one vector for the whole text.nameSimilarityis not symmetric. It scores how likelyname1is to be the same entity asname2, so swapping them can change the score. Uselanguage,scriptandentityTypeon each name to sharpen it.transliterationis not translation. It moves text between Latin and the native script of itslanguageand keeps the words; it takes no target script.nameTranslationis the one that translates a name into another language.
- 16 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Score the sentiment of a reviewWhat’s next
API reference
Every
rosette.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.