https://github.com/clarifai/clarifai-javascript
Official Clarifai JavaScript client for browsers and node.js
https://github.com/clarifai/clarifai-javascript
clarifai clarifai-javascript computer-vision javascript javascript-client js-client visual-search
Last synced: 3 days ago
JSON representation
Official Clarifai JavaScript client for browsers and node.js
- Host: GitHub
- URL: https://github.com/clarifai/clarifai-javascript
- Owner: Clarifai
- License: other
- Created: 2016-05-24T15:29:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-10T15:29:59.000Z (7 months ago)
- Last Synced: 2025-05-15T21:44:36.789Z (3 days ago)
- Topics: clarifai, clarifai-javascript, computer-vision, javascript, javascript-client, js-client, visual-search
- Language: JavaScript
- Homepage: https://docs.clarifai.com
- Size: 1.51 MB
- Stars: 350
- Watchers: 35
- Forks: 81
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

# Deprecated
For node.js users, this API Client is no longer supported.
Please use https://github.com/Clarifai/clarifai-nodejs-grpc instead which is more feature rich, faster and supported. We will be introducing a new web grpc client shortly as well to fully deprecate this javascript client. Stay tuned.# Clarifai API JavaScript Client
This is the official JavaScript client for interacting with our powerful recognition
[API](https://developer.clarifai.com). The Clarifai API offers image and video recognition as a service. Whether you
have one image or billions, you are only steps away from using artificial intelligence to recognize your visual content.* Try the Clarifai demo at: https://clarifai.com/demo
* Sign up for a free account at: https://clarifai.com/developer/account/signup/
* Read the developer guide at: https://clarifai.com/developer/guide/[](https://travis-ci.org/Clarifai/clarifai-javascript)
[](https://badge.fury.io/js/clarifai)## Installation
Install the API client:
```
npm install clarifai
```## Basic Use
Firstly, generate your Clarifai API key [on the API keys page](https://clarifai.com/developer/account/keys). The client
uses it for authentication.Then, use the code below to create a `Clarifai.App` instance using which you interact with the client.
```js
const Clarifai = require('clarifai');const app = new Clarifai.App({
apiKey: 'YOUR_API_KEY'
});
```*This will work in node.js and browsers via [Browserify](http://browserify.org/).*
You can also use the SDK by adding this script to your HTML:
```html
```
## Documentation
Dive right into code examples to get up and running as quickly as possible with our [Quick Start](https://developer.clarifai.com/quick-start/).
Learn the basics — predicting the contents of an image, searching across a collection and creating your own models with our [Guide](https://developer.clarifai.com/guide/).
Check out the [JSDoc](https://sdk.clarifai.com/js/latest/index.html) for a deeper reference.
Looking for a different client? We have many languages available with lots of documentation [Technical Reference](https://clarifai.com/developer/reference)
## React Native
You'll most likely encounter the error `process.nextTick is not a function` while using this library with React Native.
To solve this, add `process.nextTick = setImmediate;` as close to the top of your entrypoint as you can. See [#20](https://github.com/Clarifai/clarifai-javascript/issues/20) for more info.
## License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.