Kili Docs

Kili Docs

›Code snippets

Introduction to Kili Technology

  • Introduction to Kili Technology
  • Kili Technology allows
  • Compatible browser

Getting Started

  • Getting started with Kili - Classification

Hosting

  • SaaS
  • On-Premise Data
  • On-Premise Entreprise

Concepts

  • Definitions
  • Status Lifecycle
  • Architecture

Users and roles

  • Roles by project
  • Users
  • Users and roles management

Projects

  • Audit labelers
  • Customize interface
  • Dataset
  • New project
  • Project overview
  • Projects
  • Projects list
  • Settings
  • Shortcuts

Image interfaces

  • Bounding Box
  • Classification
  • Point
  • Polygon
  • Polyline
  • Segmentation
  • Simple and intuitive interfaces

Text & PDF interfaces

  • Classification
  • Image transcription / OCR
  • Named entities recognition
  • Relations extraction

Video interfaces

  • Classification
  • Multi-frames classification
  • Multi-frames object detection
  • Transcription

Audio interfaces

  • Voice transcription / Speech to text

Data ingestion

  • Data ingestion made easy
  • Load data from a workstation
  • Load data from a public cloud
  • Data on premise or on private cloud
  • How to generate non-expiring signed URLs on AWS

Quality management

  • Consensus
  • Honeypot or Gold Standard
  • Instructions
  • Quality KPIs
  • Quality management
  • Questions and Issues
  • Review Process
  • Workload distribution

Automation

  • Human in the loop
  • Model based preannotation
  • Online learning
  • Queue prioritisation

Data export

  • Data export
  • Data format
  • Example

Python - GraphQL API

  • GraphQL API
  • Python API

Code snippets

  • Authentication
  • Create a Honeypot
  • Create a user
  • Creating Consensus
  • Delete the data
  • Export data
  • Export labels
  • Import data
  • Import labels
  • Prioritize assets
  • See the Consensus of an annotation
  • See the Honeypot of an annotation
  • Throttling

Recipes

  • AutoML for faster labeling with Kili Technology
  • Create a project
  • Exporting a training set
  • Importing medical data into a frame project
  • Importing assets
  • Import rich-text assets
  • Importing predictions
  • Reading and uploading dicom image data
  • How to query using the API
  • Labelled Image Data & Transfer Learning
  • Webhooks

Change log

  • Change log

Authentication

Kili API

Kili provides an API interface to better integrate with your data science workflow. It is a very flexible tool, which allow to query and mutate data quicly and painlessly.

It is possible thanks to GraphQL, that is a query language developed by Facebook. It proposes an alternative to REST APIs whose storage may be distributed. It proposes to the client to formulate the data structure in the request, while the same structure is returned by the server. Strongly typed, this language avoids problems of return from insufficient data (under-fetching) or supernumerary data (over-fetching).

The API can be accessed indifferently on Windows, Mac OS or Linux :

  • through Python on Kili Playground
  • through NodeJS on Kili Playground Node
  • and also directly from the Graphql Playground.

How to use Kili Playground to query data on Python:

Prerequisites

Install Kili Playground:

git clone https://github.com/kili-technology/kili-playground.git
cd kili-playground
pip install .

Or just simply

pip install kili

Authentication

The Kili API secures all requests and mutations with X-API Keys.

To use the wrapper around GraphQL, you must:

  • Pass your API key to the client so it is added to every requests made in Kili :
from kili.client import Kili

kili = Kili(api_key = "MY_API_KEY")
  • Initiate the desired transfer/requests. For example, to print all the names of the projects you are in :
kili.projects(fields=['title'])

An extensive doc is at your disposal here, but also ready to use recipes on the playground to help you get started.

How to use Kili Playground to query data on NodeJS:

Prerequisites

Install Kili Playground Node in your project :

npm i --save @kili-technology/playground

Authentication

The Kili API secures all requests and mutations with X-API Keys.

To use the wrapper around GraphQL, you must:

  • Pass your API key to the client so it is added to every requests made in Kili :
import KiliClient from "@kili-technology/playground";

const authKey = process.env.MY_KILI_API_KEY;

const { me, kiliPlayground } = await new KiliClient(authKey).init();
  • Initiate the desired transfer/requests. For example, to print all the projects you are in :
const {
  data: { projects },
} = await kiliPlayground.projects({
  where: {},
  skip: 0,
  first: 100,
});

An extensive doc is at your disposal here, but also ready to use recipes on the playground to help you get started.

The recipes are now for the most part in Python but arguments and returns are very similar.

How to use GraphQL Playground to query data

If you prefer, you can directly query GraphQL API without using any SDK.

  1. Generate an API key in Kili interface in My account, under the tab API KEY. Store it in some place secured.

  2. Go to http://cloud.kili-technology.com/api/label/v2/graphql

  3. In the bottom left corner of the screen, click on HTTP headers and write the retrieved token in the authorization headers:

{
  "Authorization": "X-API-Key: YOUR_API_KEY"
}
  1. Launch any query/mutation:
query {
  users(where: { email: "YOUR_EMAIL" }, first: 10, skip: 0) {
    id
    activated
    email
  }
}

An extensive doc is at your disposal here, but also directly on the playground while typing (arguments for the functions, fields possible to query)

Graphql Example

← Python APICreate a Honeypot →
  • Kili API
  • How to use Kili Playground to query data on Python:
    • Prerequisites
    • Authentication
  • How to use Kili Playground to query data on NodeJS:
    • Prerequisites
    • Authentication
  • How to use GraphQL Playground to query data