Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including apiai with all npm packages installed. Try it out:

var apiai = require("apiai")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

apiai v4.0.3

Node.js SDK for

Node.js SDK for

This plugin allows integrating agents from the natural language processing service with your Node.js application.


  • Install Node.js
  • Install SDK with npm:
npm install apiai


  • Create main.js file with the following code:
var apiai = require('apiai');

var app = apiai("<your client access token>");

var request = app.textRequest('<Your text query>', {
    sessionId: '<unique session id>'

request.on('response', function(response) {

request.on('error', function(error) {

  • Run following command.
node main.js
  • Your can find more examples in samples directory.
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free