ReferenceAPI
API
Start ML AI Code routines from your own scripts, CI or other tools. Create an API key, authenticate each call and see the endpoints.
Start routines from your own scripts, CI or other tools. Create a key in Settings, API keys. A key acts as your account, so keep it secret and revoke it there if it leaks.
Authentication
Authenticate every call with Authorization: Bearer mlai_sk_.... Make a routine with the API trigger on the Automations page, open it and copy its API URL.
Endpoints
| Endpoint | What it does |
|---|---|
POST /api/routines/{id}/run | Starts a routine whose trigger is API. |
GET /api/routines | Lists your routines with their id, name, trigger, whether they are on, and the last run state. |
The base URL is https://code.ml.ai. Responses are JSON.