Machine Learning
Add an ML backend to a project using the Label Studio UI or by sending a POST request using the following cURL 
command:
```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8000/api/ml -H 'Authorization: Token abc123'\
--data '{"url": "http://localhost:9090", "project": {project_id}}' 
post/api/ml/

Request

  • Base URL
    http://localhost:8000
  • URL
    http://localhost:8000/api/ml/
  • Auth
    API key in header Authorization

Request body

auth_method'NONE' | 'BASIC_AUTH'
  • NONE - None
  • BASIC_AUTH - Basic Auth
auto_updateboolean

If false, model version is set by the user, if true - getting latest version from backend.

basic_auth_passstring nullable
basic_auth_userstring nullable

HTTP Basic Auth user

descriptionstring nullable

Description for the machine learning backend

extra_paramsunknown
is_interactiveboolean

Used to interactively annotate tasks. If true, model returns one list with results

model_versionstring nullable

Current model version associated with this machine learning backend

projectinteger required
timeoutnumber double

Response model timeout

titlestring nullable

Name of the machine learning backend

urlstring required

URL for the machine learning model server

Response

auth_method'NONE' | 'BASIC_AUTH'
  • NONE - None
  • BASIC_AUTH - Basic Auth
auto_updateboolean

If false, model version is set by the user, if true - getting latest version from backend.

basic_auth_pass_is_setboolean required
basic_auth_userstring nullable

HTTP Basic Auth user

created_atstring date-time required
descriptionstring nullable

Description for the machine learning backend

error_messagestring nullable

Error message in error state

extra_paramsunknown
idinteger required
is_interactiveboolean

Used to interactively annotate tasks. If true, model returns one list with results

model_versionstring nullable

Current model version associated with this machine learning backend

projectinteger required
readable_statestring required
state'CO' | 'DI' | 'ER' | 'TR' | 'PR'
  • CO - Connected
  • DI - Disconnected
  • ER - Error
  • TR - Training
  • PR - Predicting
timeoutnumber double

Response model timeout

titlestring nullable

Name of the machine learning backend

updated_atstring date-time required
urlstring required

URL for the machine learning model server

Changes

    • breaking

      request body became required

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property type changed from object to no type

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the media type application/x-www-form-urlencoded to the request body

    • info

      added the media type multipart/form-data to the request body

    • info

      the request optional property became write-only

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property type was generalized from integer to number, and format from no format to double