ML

Add ML backend

POST

Add an ML backend to a project. For more information about what you need to configure when adding an ML backend, see Connect the model to Label studio.

If you are using Docker Compose, you may need to adjust your ML backend URL. See localhost and Docker containers.
If you are using files that are located in the cloud, local storage, or uploaded to Label Studio, you must configure your environment variables to allow the ML backend to interact with those files. See Allow the ML backend to access Label Studio.

Request

This endpoint expects an object.
url
stringOptional
ML backend URL
project
integerOptional
Project ID
is_interactive
booleanOptional
Is interactive
title
stringOptional
Title
description
stringOptional
Description
auth_method
enumOptional
Auth method
Allowed values: NONEBASIC_AUTH
basic_auth_user
stringOptional
Basic auth user
basic_auth_pass
stringOptional
Basic auth password
extra_params
map from strings to anyOptional
Extra parameters
timeout
integerOptional
Response model timeout

Response

This endpoint returns an object
url
stringOptional
ML backend URL
project
integerOptional
Project ID
is_interactive
booleanOptional
Is interactive
title
stringOptional
Title
description
stringOptional
Description
auth_method
enumOptional
Auth method
Allowed values: NONEBASIC_AUTH
basic_auth_user
stringOptional
Basic auth user
basic_auth_pass
stringOptional
Basic auth password
extra_params
map from strings to anyOptional
Extra parameters
timeout
integerOptional
Response model timeout
POST
1curl -X POST http://localhost:8080/api/ml/ \
2 -H "Authorization: Token <api_key>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200Successful
1{
2 "url": "url",
3 "project": 1,
4 "is_interactive": true,
5 "title": "title",
6 "description": "description",
7 "auth_method": "NONE",
8 "basic_auth_user": "basic_auth_user",
9 "basic_auth_pass": "basic_auth_pass",
10 "extra_params": {
11 "extra_params": {
12 "key": "value"
13 }
14 },
15 "timeout": 1
16}