# API

ONESTEP AI provides a public API for all logged-in users. It covers the full functionality of the portal.

Choose your region:

ONESTEP AI EU or ONESTEP AI US

Authorization is via the OSAI website or access token. More detailed instructions can be found in authoriztion article or in the API by clicking on the Authorize button.

HTTP response status codes:

Status code Description
200 - OK The request succeeded.
400 - Bad Request The server cannot or will not process the request due to something that is perceived to be a client error.
401 - Unauthorized Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.

To familiarize yourself with the API, you can find some examples of how to use the service in the How to use API section.

Click on the one of the following links to download the Python playbook:

Google Colab
17PJAxxGjN5nXWlo2lFwpk68H_q6u234C?usp=sharing
Python playbook
upload_dataset_and_train_model.ipynb 19.4MB

# Webhooks

We have implemented a webhook system to streamline working with OSAI using the API. Webhooks are a way for applications or services to send real-time notifications to other applications or services. They work on a simple concept: when a specific event or trigger occurs in an application, it sends an HTTP POST request to a predefined URL, carrying relevant information about the event.

Our webhook system retrieves information about the completion of worker tasks (e.g., conversion, manipulation, prediction, training, re-training, renting a device) and sends it to the specified address. To use this feature, navigate to our API documentation (EU or US), locate the desired task and provide your URL. Make sure that the URL is reachable, properly configured, and capable of receiving and handling incoming HTTP requests. Once the worker has finished, you will receive an HTTP POST request. This request will let you know if the task was successfully completed or if the worker encountered any problems along the way.