TypeGenie SDK and API

TypeGenie SDK and API let you integrate world's most advanced sentence completions to your application.

You could bring sentence completions to the users of your ticketing system, CRM, a mobile app, ... anywhere you write, really.

There are two ways to bring TypeGenie to your app:

  1. TypeGenie.js. Our JS-library provides you with an SDK with completions and frontend sentence completion logic. This is a good choice for most web apps.
  2. TypeGenie REST API. For applications beyond web apps, you can use our REST API to request sentence completions directly. In this case, you will need to implement the UI logic yourself.

To request access to our SDK or API key, or support with either, email us at hi@typegenie.net or book a call with us.

TypeGenie.js

To bring sentence completions to any web app, you can use TypeGenie.js, our JavaScript library.

You install the library to your web app like you would any JS-library:

<script src=’typegenie.js’></script>


In addition to the library, you will need to implement two functions. The exact implementation depends on your application, so we can only provide templates.

First, a function to get the dialogue text this far in a conversation:

function getDialogue(tickedId) {
	// to implement: code to fetch past dialogue from CRM backend in a JSON format
	/* example format
"dialogue": [
        {
            "text": "I am experiencing issues with my wifi.",
            "name": "Alice",
            "role": "end-user"
        },
        {
            "name": "Bob",
            "text": "We are experiencing high volumes of customer requests at the moment. I will get back to you as soon as possible.",
            "role": "agent"
	*/
	return dialogueObject
}


Second, a function to get an authorization token. TypeGenie can use your CRM as an identity provider (idP). We support SAML single sign-on (SSO).

function getRequestHeaders() {
	// to implement: code to turn existing authentication to authentication that can be used by True AI backend
       	return {"Authorization": "Bearer " + generatedAuthToken}
}


Now, you are ready to launch TypeGenie to your app:

let typegenie = TypeGenie(editorCSSSelector, getDialogue, getRequestHeaders)
typegenie.activate()


At this point, you are ready to go.

TypeGenie REST API

To bring sentence completions to a custom app, you can get sentence completions served through our REST API.

In this case, you will need to implement the sentence completion UI logic yourself.

Click here to see the API documentation.

To request an API key, email us at hi@typegenie.net or book a call with us.