API overview

Our API enables you to build AI applications with capabilities like prediction, search and custom training.

Access our API over HTTPS via https://api.clarifai.com. In the examples throughout our documentation, we use single brackets {variable} to indicate variables that you should replace with a real value.

We recommend using a client library to access the API. We offer official clients in a variety of languages.

Client Installation Instructions

// The JavaScript client works in both Node.js and the browser.


// Install the client from NPM

npm install clarifai

// Require the client

const Clarifai = require('clarifai');

// initialize with your api key. This will also work in your browser via http://browserify.org/

const app = new Clarifai.App({
 apiKey: 'YOUR_API_KEY'
});

// You can also use the SDK by adding this script to your HTML:

<script type="text/javascript" src="https://sdk.clarifai.com/js/clarifai-latest.js"></script>

Last updated