Skip to content

Getting Started

lauren12292 edited this page Mar 14, 2016 · 7 revisions

Get Rosette API Access

You'll need a Rosette API key to start. Head to developer.rosette.com to start your 30-day trial of the Rosette API. Check out the documentation first, then find your API key in your developer portal and pass it in as a parameter every time your code opens an API connection.

Install from NPM

Install the module with: npm install rosette-api

Run the language detection example

var rosette-api = require('rosette-api');

var api = new Api(API_KEY);
var endpoint = "language";
var content = "Por favor Señorita, says the man.";
api.parameters.content = content;

api.rosette(endpoint, function(err, res){
	if(err){
		console.log(err);
	} else {
		console.log(JSON.stringify(res, null, 2));
	}
});

Voila! You should see the JSON output from the server indicating Spanish as the top result.

Additional Examples

See examples for how to call each Rosette API endpoint using the binding. If you are familiar with Docker, see the docker directory for a docker image to run all the examples.

Additional Information

See Rosette API site or Rosette API Support.