Register a Model as an API
Step 1: Publish a Model as an API
Publish a registered model as an API from the Models tab. Only registered models display the Register as API option.
Go to Data Science Lab > Models
You will be redirected to the Model list page.
Filter by Registered (or choose All) to locate your model.
Select the registered model.
Click Register as API.

The Update Model page opens.
Set Max instance limit (maximum concurrent instances for this API).
Click Save and Register.
Use Save (without Register) if you want to persist changes and publish later.

A notification confirms that the model has been published as an API.
Where to find it next:
The published entry appears under the Model list as a registered model.
Step 2: Register an API Client
Register a client to obtain Client ID and Client Secret for authenticated access.
Open the Admin module.
Click API Client Registration.
Click New.
Set Client type = internal.
Provide client details:
Client Name
Client Email
App Name
Request Per Hour
Request Per Day
Select API Type: choose Model as API.
Services Entitled: select the published DSL model from the drop-down.
Click Save.

After saving, open the registered client using Edit to view the generated Client ID and Client Secret.

Step 3: Invoke the API (Postman)
The Model as API interaction follows an asynchronous pattern:
Execution Request → returns a Request ID
Get Status (poll using Request ID)
Get Results (using the same Request ID)
Base URLs
Start service / submit request
https://app.bdb.ai/services/modelasapi/<model_name>Check status
https://app.bdb.ai/services/modelasapi/<model_name>/getStatusGet results
https://app.bdb.ai/services/modelasapi/<model_name>/getResults
Required Headers (all requests)
Client Id: <your_client_id>Client Secret Key: <your_client_secret>App Name: <your_app_name>
3.1 Execution Request (start job)
In Postman, create a POST request to
https://app.bdb.ai/services/modelasapi/<model_name>Set the required Headers (Client ID, Client Secret Key, App Name).
In Body (JSON), provide the model input as a JSON list (array) of records.
Click Send.

Sample body (illustrative):
Expected response (fields):
Success:
trueIf the request is accepted.Request ID: a unique identifier for this execution.
Message: acknowledges that the service has started.

3.2 Get Status Request
Create a POST request to
https://app.bdb.ai/services/modelasapi/<model_name>/getStatusSet the same Headers.
In Body (JSON), provide the previously received Request ID:
Click Send.
Expected response (fields):
Success:
trueIf the request is valid.Request ID: echoes your ID.
Status Message: indicates whether execution is running, completed, or failed.

3.3 Get Results Request
Create a POST request to
https://app.bdb.ai/services/modelasapi/<model_name>/getResultsSet the same Headers.
In Body (JSON), provide the Request ID:
Click Send.
Expected outcome: The model prediction results are returned in the response.

Operational Notes
Asynchronous execution: Always capture and reuse the Request ID to check status and fetch results.
Resource control: The Max instance limit governs concurrency for the model API.
Data retention: Input messages on Kafka are cleared approximately every 4 hours.
Access control: Only clients registered with Model as API entitlement can call the service.
Troubleshooting
401/403 Unauthorized: Verify Client ID, Client Secret Key, App Name, and that the client is entitled to the published model.
Service doesn’t start: Confirm the model is registered and register as an API has been completed; check instance limits.
Status stuck in running: Retry after a short interval; review platform logs if delays persist.
No results: Ensure you’re using the correct Request ID; verify the job completed successfully via Get Status.
Schema errors: Validate that the input JSON structure matches the model’s expected features and datatypes.