# datarobot-ai

> Client library for interacting with the DataRobot AI API.

Latest version **1.0.6** (published 2019-09-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install datarobot-ai
pnpm add datarobot-ai
yarn add datarobot-ai
bun add datarobot-ai
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-09-10 |
| First published | 2019-09-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 343.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | DataRobot, Inc. |
| Maintainers | datarobot-ci |
| Keywords | machine learning, api client, ai, datarobot |

## Links

- npm: https://www.npmjs.com/package/datarobot-ai
- Repository: https://github.com/DataRobot/datarobot-ai-js
- Issues: https://github.com/DataRobot/datarobot-ai-js/issues
- npm.io page: https://npm.io/package/datarobot-ai

## Dependencies (5)

- [winston](https://npm.io/package/winston.md) ^3.2.1
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.1.1
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1
- [isomorphic-form-data](https://npm.io/package/isomorphic-form-data.md) ^1.0.0
- [url-search-params-polyfill](https://npm.io/package/url-search-params-polyfill.md) ^2.0.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2019-09-10

## README

# DataRobot AI API Client Library

## Installation

This API client library is hosted on [npm](https://www.npmjs.com/package/datarobot-ai)
and able to be installed using `npm` or `yarn`.

```bash
# with npm
$ npm install datarobot-ai
# or with yarn
$ yarn add datarobot-ai
```

The library is intended to be used only with `node` at this time. You must provide it with an
API key and adding it to a web application would expose your API key to the world. There are
plans to make the API work with JWT for future use in web applications.

Get your API key at [developers.datarobot.com](https://developers.datarobot.com/dashboard/keys/)

## Getting Started

The first step in working with the client is creating a new instance of it. But first you need
your API key. Once you have a key, you can provide it to the client either through an environment
variable named DATAROBOTAI_API_KEY or directly in the source code when creating the client.

Either `import` or `require()` can be used to integrate the library with your code. The following
sample shows the usage with `require`. In either case, once imported you need to create a `new`
client.

```js
const DataRobotAIClient = require('datarobot-ai');
const dr = new DataRobotAIClient({ key: 'fill-in-key-here' });
```

Once you have created the client, you can start to use it.

## Basic Use

It only takes a couple calls to create a model, and then one more to get your predictions using
DataRobot AI. Most of the operations in the API return a `Promise` and can be `await`ed or
use callbacks with `then` and `catch`.

```js
// create your AI
const ai = await dr.ais.create('Hello DataRobot');

//upload your dataset and learn now to predict the 'profit' column
await ai.learn('profit', '/path/to/data.csv');

// get predictions for the features from the file 'more-data.csv'
// the `predictions` results will predict the 'profit' values
const predictions = await ai.predict('profit', '/path/to/more-data.csv');
```

For more examples and information about the DataRobot AI API, see [developers.datarobot.com/learn/clients/javascript](https://developers.datarobot.com/learn/clients/javascript/)

## Errors

Errors will be propagated back to the user either as exceptions when using `await`, or as a `reject` or `catch` function of the promise.

---
_Source: https://npm.io/package/datarobot-ai · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
