Developer Documentation

Developer documentation for utilization of ubiai's apis

Getting started

Welcome to the UBIAI Developer Documentation! This guide is designed to help developers integrate and utilize UBIAI's APIs effectively. UBIAI provides a cutting-edge text labeling platform for natural language processing. By leveraging our APIs, developers can enhance their applications with advanced AI capabilities.

Train model

post

Create a model training on AWS sagemaker

Path parameters
tokenstringRequired
idstringRequired
pkintegerRequired

Model primary database key

Body
dropnumberRequiredExample: 4
max_batchintegerRequiredExample: 4
nb_iterintegerRequiredExample: 8
projectintegerRequiredExample: 8791
selected_modelstringRequiredExample: blank
selected_validationintegerRequiredExample: 20
model_typestringRequiredExample: layoutlm
with_annotatebooleanRequired
allowed_labelsarrayOptional
allowed_relationsarrayOptional
allowed_classificationsarrayOptional
Responses
200Success
application/json
post
/api_v1/train_model/{token}/{id}

Model types for training

model types
models

Spacy

en_core_web_en

Bert

distilbert-base-cased

dslim/bert-base-NER

roberta-base

allenai/scibert_scivocab_uncased

alvaroalon2/biobert_chemical_ner

LayoutLM

LayoutLM-base

Template Form Recognizer

blank

Add project

post
Path parameters
tokenstringRequired

User access token

Header parameters
AuthorizationstringRequired

Bearer token for authentication

Body
namestringRequiredExample: Project Name
languagestringRequiredExample: English
descriptionstringRequiredExample: Description of the project
typestringRequiredExample: Text Annotation
classification_typestringRequiredExample: Binary
Responses
200Success
application/json
post
/api_v1/project

Annotate project

post
Path parameters
tokenstringRequired
idstringRequired
pkintegerRequired

Primary key of the project

Header parameters
tokenstringRequired

User access token

Responses
200

Annotation successful

application/json
post
/api_v1/annotate_project/{token}/{id}

Annotate snippets

post
Path parameters
tokenstringRequired
Body
inputsarrayRequired
Responses
200

Annotation successful

application/json
post
/api_v1/annotate/{token}

Export data

get
Path parameters
tokenstringRequired
typestringRequired
Responses
200Success
application/json
Responsestring

export success

Example: https://example.com/download/1234
get
/api_v1/download/{token}/{type}

Download options

Type options

Download model

get
Path parameters
tokenstringRequired
model_namestringRequired
Responses
200Success
application/json
get
/api_v1/download_model/{token}/{model_name}

Perform OCR & layoutLM inference with API

post
Path parameters
tokenstringRequired
file_typestringRequired
Body
ocr_enginestringRequired

OCR Engine (DEFAULT, ENGINE1, ENGINE2, ENGINE3)

filestringRequired

Uploaded file

fileUrlstringOptional

URL of the file

filesUrlsarrayOptional

List of URLs for files

Responses
200Success
application/json
post
/api_v1/ocr_layoutlm_inference/{token}/{file_type}
OCR_ENGINES
type

Upload files

post
Path parameters
tokenstringRequired
file_typestringRequired
Body
autoAssignToCollabbooleanRequired
taskTypestringRequired
nbUsersPerDocstringOptional
selectedUsersstringOptional
filesUrlsstring[]Optional
Responses
200Success
application/json
post
/api_v1/upload/{token}/{file_type}

Last updated