ultralytics-mcp 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -23
- package/TOOLS.md +486 -0
- package/dist/resolve.js +25 -0
- package/dist/server.js +10 -1
- package/dist/tools/index.js +595 -200
- package/dist/tools/training.js +92 -5
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,32 +1,194 @@
|
|
|
1
1
|
# Ultralytics Platform MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/ultralytics-mcp)
|
|
4
|
+
[](https://github.com/amanharshx/ultralytics-mcp/actions/workflows/ci.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
MCP server for [Ultralytics Platform](https://platform.ultralytics.com)
|
|
8
|
+
workflows: projects, datasets, models, training, prediction, exports, and
|
|
9
|
+
dataset uploads.
|
|
4
10
|
|
|
5
11
|
> [!IMPORTANT]
|
|
6
12
|
> Independent community project. Not affiliated with or endorsed by Ultralytics.
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [Requirements](#requirements)
|
|
19
|
+
- [Get API Key](#get-api-key)
|
|
20
|
+
- [Environment Variables](#environment-variables)
|
|
21
|
+
- [Installation](#installation)
|
|
22
|
+
- [Claude Code](#claude-code)
|
|
23
|
+
- [Codex](#codex)
|
|
24
|
+
- [Verify Setup](#verify-setup)
|
|
25
|
+
- [What You Can Do](#what-you-can-do)
|
|
26
|
+
- [Tools](#tools)
|
|
27
|
+
- [Safety](#safety)
|
|
28
|
+
- [Troubleshooting](#troubleshooting)
|
|
29
|
+
- [Development](#development)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
- Node.js `>=20`
|
|
36
|
+
- Ultralytics Platform API key
|
|
37
|
+
- `ffmpeg` and `ffprobe` on `PATH` to upload a dataset from a local video file
|
|
38
|
+
- Claude Code, Codex, or another MCP client that can launch stdio servers
|
|
39
|
+
|
|
40
|
+
## Get API Key
|
|
41
|
+
|
|
42
|
+
1. Sign in at [Ultralytics Platform](https://platform.ultralytics.com).
|
|
43
|
+
2. Open `Settings -> API Keys`.
|
|
44
|
+
3. Create or copy an API key.
|
|
45
|
+
|
|
46
|
+
## Environment Variables
|
|
47
|
+
|
|
48
|
+
| Variable | Required | Description |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `ULTRALYTICS_API_KEY` | ✅ | Ultralytics API key. Expected format: `ul_` followed by 40 hex characters |
|
|
51
|
+
| `ULTRALYTICS_API_BASE` | ❌ | Advanced: override API base URL. Default: `https://platform.ultralytics.com/api` |
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
### Standard Config
|
|
56
|
+
|
|
57
|
+
Works in many MCP clients that accept JSON stdio server definitions.
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"ultralytics": {
|
|
63
|
+
"command": "npx",
|
|
64
|
+
"args": ["-y", "ultralytics-mcp"],
|
|
65
|
+
"env": {
|
|
66
|
+
"ULTRALYTICS_API_KEY": "ul_your_api_key_here"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Claude Code
|
|
74
|
+
|
|
75
|
+
Add server with Claude Code CLI:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
claude mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or add a project-scoped server in repo-root `.mcp.json`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"ultralytics": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "ultralytics-mcp"],
|
|
89
|
+
"env": {
|
|
90
|
+
"ULTRALYTICS_API_KEY": "ul_your_api_key_here"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Codex
|
|
98
|
+
|
|
99
|
+
Add server with Codex CLI:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
codex mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Or add it directly to `~/.codex/config.toml`:
|
|
106
|
+
|
|
107
|
+
```toml
|
|
108
|
+
[mcp_servers.ultralytics]
|
|
109
|
+
command = "npx"
|
|
110
|
+
args = ["-y", "ultralytics-mcp"]
|
|
111
|
+
|
|
112
|
+
[mcp_servers.ultralytics.env]
|
|
113
|
+
ULTRALYTICS_API_KEY = "ul_your_api_key_here"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Verify Setup
|
|
117
|
+
|
|
118
|
+
### Claude Code
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
claude mcp list
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
You should see `ultralytics` in configured MCP servers.
|
|
125
|
+
|
|
126
|
+
### Codex
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
codex mcp list
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
You should see `ultralytics` in configured MCP servers.
|
|
133
|
+
|
|
134
|
+
## What You Can Do
|
|
135
|
+
|
|
136
|
+
- Browse projects, datasets, models, exports, GPU availability
|
|
137
|
+
- Resolve project and dataset refs by id, slug, `username/slug`, or `ul://`
|
|
138
|
+
- Search public projects and datasets on Ultralytics Explore
|
|
139
|
+
- Start dataset ingest jobs and upload archive files, folders, or videos
|
|
140
|
+
- Monitor training progress and inspect latest metrics or recent metric history
|
|
141
|
+
- Run model prediction from image URL or base64 input
|
|
142
|
+
- Download model weights to local path
|
|
143
|
+
- Create exports and training jobs with explicit cost confirmation
|
|
144
|
+
- Pass advanced YOLO training settings through `training_start.train_args`
|
|
145
|
+
- Start training from existing project models or official YOLO base checkpoints
|
|
146
|
+
|
|
147
|
+
## Tools
|
|
148
|
+
|
|
149
|
+
See [TOOLS.md](./TOOLS.md) for full parameter reference, safety notes, local-path behavior, and examples for tricky tools.
|
|
150
|
+
|
|
151
|
+
- Projects: 5 tools
|
|
152
|
+
- Datasets: 12 tools
|
|
153
|
+
- Models: 4 tools
|
|
154
|
+
- Training: 2 tools
|
|
155
|
+
- Exports: 3 tools
|
|
156
|
+
- Infrastructure: 1 tool
|
|
157
|
+
|
|
158
|
+
## Safety
|
|
159
|
+
|
|
160
|
+
- `export_create` requires `confirm_cost: true`
|
|
161
|
+
- `training_start` requires `confirm_cost: true`
|
|
162
|
+
- Ambiguous project or dataset refs fail instead of guessing
|
|
163
|
+
- Signed upload and download URLs do not forward `Authorization`
|
|
164
|
+
|
|
165
|
+
## Troubleshooting
|
|
166
|
+
|
|
167
|
+
### Invalid API key
|
|
168
|
+
|
|
169
|
+
`ULTRALYTICS_API_KEY` must start with `ul_` and contain exactly 40 hex
|
|
170
|
+
characters after prefix.
|
|
171
|
+
|
|
172
|
+
### Server not loading in Claude Code
|
|
173
|
+
|
|
174
|
+
- run `claude mcp list`
|
|
175
|
+
- verify `npx` and Node.js are installed
|
|
176
|
+
- verify `ULTRALYTICS_API_KEY` was passed with `--env` when adding server
|
|
177
|
+
- if needed, inspect server config with `claude mcp get ultralytics`
|
|
178
|
+
|
|
179
|
+
### Server not loading in Codex
|
|
180
|
+
|
|
181
|
+
- run `codex mcp list`
|
|
182
|
+
- verify `npx` and Node.js are installed
|
|
183
|
+
- verify `ULTRALYTICS_API_KEY` value in `~/.codex/config.toml` or `codex mcp add` command
|
|
184
|
+
|
|
185
|
+
### Manual server smoke test
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
ULTRALYTICS_API_KEY=ul_your_api_key_here npx -y ultralytics-mcp
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
If command exits immediately with config error, fix environment first.
|
|
30
192
|
|
|
31
193
|
## Development
|
|
32
194
|
|
|
@@ -35,4 +197,5 @@ npm install
|
|
|
35
197
|
npm run check
|
|
36
198
|
npm test
|
|
37
199
|
npm run build
|
|
200
|
+
npm run generate:tools
|
|
38
201
|
```
|
package/TOOLS.md
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
# Tools Reference
|
|
2
|
+
|
|
3
|
+
Auto-generated reference for Ultralytics Platform MCP tools.
|
|
4
|
+
|
|
5
|
+
> Auto-generated. Do not edit by hand. Run `npm run generate:tools`. Edit tool definitions in `src/tools/index.ts`.
|
|
6
|
+
|
|
7
|
+
## Conventions
|
|
8
|
+
|
|
9
|
+
- Many project, dataset, and model lookup tools accept ids, slugs, `username/slug`, or `ul://` refs.
|
|
10
|
+
- Local-path tools operate on files or folders available to the MCP client host.
|
|
11
|
+
- Exact accepted ref variants are documented in tool descriptions and notes when behavior differs.
|
|
12
|
+
|
|
13
|
+
## Local Path Tools
|
|
14
|
+
|
|
15
|
+
- `dataset_upload_file` uploads a local archive file.
|
|
16
|
+
- `dataset_upload_folder` uploads a local image folder.
|
|
17
|
+
- `dataset_upload_video` extracts frames from a local video file with `ffmpeg`.
|
|
18
|
+
- `model_download` writes model weights to a local destination path.
|
|
19
|
+
|
|
20
|
+
## Cost and Safety
|
|
21
|
+
|
|
22
|
+
- `training_start` requires `confirm_cost=true` and may create a model when checkpoint mode is used.
|
|
23
|
+
- `export_create` requires `confirm_cost=true` and starts a credit-costing export job.
|
|
24
|
+
- `projects_delete` and `datasets_delete` are soft-delete operations.
|
|
25
|
+
|
|
26
|
+
## Projects
|
|
27
|
+
|
|
28
|
+
5 tools.
|
|
29
|
+
|
|
30
|
+
### projects_list
|
|
31
|
+
|
|
32
|
+
List computer-vision projects in your Ultralytics workspace.
|
|
33
|
+
|
|
34
|
+
Metadata: read-only
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Required | Description |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| `username` | string | No | |
|
|
39
|
+
|
|
40
|
+
### projects_get
|
|
41
|
+
|
|
42
|
+
Get details for one project by id, slug, username/slug, or project ul:// URI.
|
|
43
|
+
|
|
44
|
+
Metadata: read-only
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Required | Description |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `project` | string | Yes | Project ref by id, slug, username/slug, or ul:// URI. |
|
|
49
|
+
|
|
50
|
+
### explore_projects
|
|
51
|
+
|
|
52
|
+
Search public projects on Ultralytics Explore.
|
|
53
|
+
|
|
54
|
+
Metadata: read-only, external/live
|
|
55
|
+
|
|
56
|
+
| Parameter | Type | Required | Description |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| `q` | string | Yes | |
|
|
59
|
+
| `sort` | string | No | |
|
|
60
|
+
| `offset` | number | No | |
|
|
61
|
+
|
|
62
|
+
### projects_create
|
|
63
|
+
|
|
64
|
+
Create a project in your Ultralytics workspace.
|
|
65
|
+
|
|
66
|
+
Metadata: state-changing, non-idempotent
|
|
67
|
+
|
|
68
|
+
| Parameter | Type | Required | Description |
|
|
69
|
+
| --- | --- | --- | --- |
|
|
70
|
+
| `name` | string | Yes | |
|
|
71
|
+
| `slug` | string | No | |
|
|
72
|
+
| `description` | string | No | |
|
|
73
|
+
|
|
74
|
+
### projects_delete
|
|
75
|
+
|
|
76
|
+
Soft-delete a project by id, slug, username/slug, or project ul:// URI.
|
|
77
|
+
|
|
78
|
+
Metadata: state-changing, destructive, non-idempotent
|
|
79
|
+
|
|
80
|
+
| Parameter | Type | Required | Description |
|
|
81
|
+
| --- | --- | --- | --- |
|
|
82
|
+
| `project` | string | Yes | Project ref by id, slug, username/slug, or ul:// URI. |
|
|
83
|
+
|
|
84
|
+
## Datasets
|
|
85
|
+
|
|
86
|
+
12 tools.
|
|
87
|
+
|
|
88
|
+
### datasets_list
|
|
89
|
+
|
|
90
|
+
List datasets in your Ultralytics workspace.
|
|
91
|
+
|
|
92
|
+
Metadata: read-only
|
|
93
|
+
|
|
94
|
+
| Parameter | Type | Required | Description |
|
|
95
|
+
| --- | --- | --- | --- |
|
|
96
|
+
| `username` | string | No | |
|
|
97
|
+
|
|
98
|
+
### datasets_get
|
|
99
|
+
|
|
100
|
+
Get details for one dataset by id, slug, username/slug, or dataset ul:// URI.
|
|
101
|
+
|
|
102
|
+
Metadata: read-only
|
|
103
|
+
|
|
104
|
+
| Parameter | Type | Required | Description |
|
|
105
|
+
| --- | --- | --- | --- |
|
|
106
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
107
|
+
|
|
108
|
+
### explore_datasets
|
|
109
|
+
|
|
110
|
+
Search public datasets on Ultralytics Explore.
|
|
111
|
+
|
|
112
|
+
Metadata: read-only, external/live
|
|
113
|
+
|
|
114
|
+
| Parameter | Type | Required | Description |
|
|
115
|
+
| --- | --- | --- | --- |
|
|
116
|
+
| `q` | string | Yes | |
|
|
117
|
+
| `sort` | string | No | |
|
|
118
|
+
| `offset` | number | No | |
|
|
119
|
+
| `task` | array<string> | No | |
|
|
120
|
+
|
|
121
|
+
### datasets_create
|
|
122
|
+
|
|
123
|
+
Create a dataset in your Ultralytics workspace.
|
|
124
|
+
|
|
125
|
+
Metadata: state-changing, non-idempotent
|
|
126
|
+
|
|
127
|
+
| Parameter | Type | Required | Description |
|
|
128
|
+
| --- | --- | --- | --- |
|
|
129
|
+
| `name` | string | Yes | |
|
|
130
|
+
| `task` | string | Yes | Dataset task such as detect, segment, semantic, pose, obb, or classify. |
|
|
131
|
+
| `slug` | string | Yes | |
|
|
132
|
+
| `description` | string | No | |
|
|
133
|
+
| `visibility` | string | No | |
|
|
134
|
+
| `classNames` | array<string> | No | |
|
|
135
|
+
|
|
136
|
+
### dataset_images_list
|
|
137
|
+
|
|
138
|
+
List images in a dataset with optional filtering.
|
|
139
|
+
|
|
140
|
+
Metadata: read-only
|
|
141
|
+
|
|
142
|
+
| Parameter | Type | Required | Description |
|
|
143
|
+
| --- | --- | --- | --- |
|
|
144
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
145
|
+
| `split` | string | No | |
|
|
146
|
+
| `search` | string | No | |
|
|
147
|
+
| `hasLabel` | boolean | No | |
|
|
148
|
+
| `classIds` | array<string> | No | |
|
|
149
|
+
| `limit` | number | No | |
|
|
150
|
+
| `offset` | number | No | |
|
|
151
|
+
| `includeImageUrls` | boolean | No | |
|
|
152
|
+
|
|
153
|
+
### dataset_export
|
|
154
|
+
|
|
155
|
+
Get export link for latest or one frozen dataset version.
|
|
156
|
+
|
|
157
|
+
Metadata: read-only
|
|
158
|
+
|
|
159
|
+
| Parameter | Type | Required | Description |
|
|
160
|
+
| --- | --- | --- | --- |
|
|
161
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
162
|
+
| `version` | number | No | |
|
|
163
|
+
|
|
164
|
+
### dataset_version_create
|
|
165
|
+
|
|
166
|
+
Create a frozen dataset version snapshot.
|
|
167
|
+
|
|
168
|
+
Metadata: state-changing, non-idempotent
|
|
169
|
+
|
|
170
|
+
| Parameter | Type | Required | Description |
|
|
171
|
+
| --- | --- | --- | --- |
|
|
172
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
173
|
+
| `description` | string | No | |
|
|
174
|
+
|
|
175
|
+
### datasets_delete
|
|
176
|
+
|
|
177
|
+
Soft-delete a dataset by id, slug, username/slug, or dataset ul:// URI.
|
|
178
|
+
|
|
179
|
+
Metadata: state-changing, destructive, non-idempotent
|
|
180
|
+
|
|
181
|
+
| Parameter | Type | Required | Description |
|
|
182
|
+
| --- | --- | --- | --- |
|
|
183
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
184
|
+
|
|
185
|
+
### dataset_ingest
|
|
186
|
+
|
|
187
|
+
Start a remote URL ingest job for an existing dataset.
|
|
188
|
+
|
|
189
|
+
Metadata: state-changing, non-idempotent, external/live
|
|
190
|
+
|
|
191
|
+
| Parameter | Type | Required | Description |
|
|
192
|
+
| --- | --- | --- | --- |
|
|
193
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
194
|
+
| `sourceUrl` | string | Yes | |
|
|
195
|
+
| `targetSplit` | string | No | |
|
|
196
|
+
|
|
197
|
+
### dataset_upload_file
|
|
198
|
+
|
|
199
|
+
Upload a local dataset archive file and start ingest for an existing dataset.
|
|
200
|
+
|
|
201
|
+
Metadata: state-changing, non-idempotent
|
|
202
|
+
|
|
203
|
+
| Parameter | Type | Required | Description |
|
|
204
|
+
| --- | --- | --- | --- |
|
|
205
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
206
|
+
| `file_path` | string | Yes | Local path to dataset archive file. |
|
|
207
|
+
| `targetSplit` | string | No | |
|
|
208
|
+
|
|
209
|
+
Notes: Uses a local archive file path and starts ingest into an existing dataset.
|
|
210
|
+
|
|
211
|
+
#### Upload dataset archive
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"dataset": "team/datasets/warehouse-items",
|
|
216
|
+
"file_path": "/data/warehouse-items.zip",
|
|
217
|
+
"targetSplit": "train"
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### dataset_upload_folder
|
|
222
|
+
|
|
223
|
+
Upload a local image folder as a zip and start ingest for an existing dataset.
|
|
224
|
+
|
|
225
|
+
Metadata: state-changing, non-idempotent
|
|
226
|
+
|
|
227
|
+
| Parameter | Type | Required | Description |
|
|
228
|
+
| --- | --- | --- | --- |
|
|
229
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
230
|
+
| `folder_path` | string | Yes | Local path to image folder. |
|
|
231
|
+
| `targetSplit` | string | No | |
|
|
232
|
+
|
|
233
|
+
Notes: Uses a local image folder path, zips it client-side, and starts ingest into an existing dataset.
|
|
234
|
+
|
|
235
|
+
#### Upload image folder
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"dataset": "team/datasets/warehouse-items",
|
|
240
|
+
"folder_path": "/data/warehouse-items",
|
|
241
|
+
"targetSplit": "train"
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### dataset_upload_video
|
|
246
|
+
|
|
247
|
+
Upload a local video by extracting JPEG frames with ffmpeg, then start dataset ingest for an existing dataset.
|
|
248
|
+
|
|
249
|
+
Metadata: state-changing, non-idempotent
|
|
250
|
+
|
|
251
|
+
| Parameter | Type | Required | Description |
|
|
252
|
+
| --- | --- | --- | --- |
|
|
253
|
+
| `dataset` | string | Yes | Dataset ref by id, slug, username/slug, or ul:// URI. |
|
|
254
|
+
| `video_path` | string | Yes | Local path to source video file. |
|
|
255
|
+
| `fps` | number | No | |
|
|
256
|
+
| `max_frames` | number | No | |
|
|
257
|
+
| `targetSplit` | string | No | |
|
|
258
|
+
|
|
259
|
+
Notes: Uses a local video path, extracts JPEG frames with ffmpeg, and starts ingest into an existing dataset.
|
|
260
|
+
|
|
261
|
+
#### Upload video for frame extraction
|
|
262
|
+
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"dataset": "team/datasets/factory-lines",
|
|
266
|
+
"video_path": "/videos/factory-shift.mp4",
|
|
267
|
+
"fps": 2,
|
|
268
|
+
"max_frames": 500,
|
|
269
|
+
"targetSplit": "train"
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Models
|
|
274
|
+
|
|
275
|
+
4 tools.
|
|
276
|
+
|
|
277
|
+
### models_list
|
|
278
|
+
|
|
279
|
+
List models in a project by project id, slug, username/slug, or project ul:// URI.
|
|
280
|
+
|
|
281
|
+
Metadata: read-only
|
|
282
|
+
|
|
283
|
+
| Parameter | Type | Required | Description |
|
|
284
|
+
| --- | --- | --- | --- |
|
|
285
|
+
| `project` | string | Yes | Project ref by id, slug, username/slug, or ul:// URI. |
|
|
286
|
+
|
|
287
|
+
### models_get
|
|
288
|
+
|
|
289
|
+
Get one model by id, or by slug plus project.
|
|
290
|
+
|
|
291
|
+
Metadata: read-only
|
|
292
|
+
|
|
293
|
+
| Parameter | Type | Required | Description |
|
|
294
|
+
| --- | --- | --- | --- |
|
|
295
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
296
|
+
| `project` | string | No | Project ref required when model is given by slug. |
|
|
297
|
+
|
|
298
|
+
### model_predict
|
|
299
|
+
|
|
300
|
+
Run inference with a trained model on an image URL or base64 source (no local file paths).
|
|
301
|
+
|
|
302
|
+
Metadata: read-only, external/live
|
|
303
|
+
|
|
304
|
+
| Parameter | Type | Required | Description |
|
|
305
|
+
| --- | --- | --- | --- |
|
|
306
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
307
|
+
| `source` | string | Yes | Image URL or base64 input string. Local file paths are not supported. |
|
|
308
|
+
| `project` | string | No | |
|
|
309
|
+
| `conf` | number | No | |
|
|
310
|
+
| `iou` | number | No | |
|
|
311
|
+
| `imgsz` | number | No | |
|
|
312
|
+
|
|
313
|
+
#### Predict from image URL
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"model": "team/project/my-model",
|
|
318
|
+
"source": "https://images.example.com/example.jpg",
|
|
319
|
+
"conf": 0.25
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### Predict from base64 input
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"model": "team/project/my-model",
|
|
328
|
+
"source": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### model_download
|
|
333
|
+
|
|
334
|
+
Download one trained model weight file to an explicit local path.
|
|
335
|
+
|
|
336
|
+
Metadata: state-changing, non-idempotent
|
|
337
|
+
|
|
338
|
+
| Parameter | Type | Required | Description |
|
|
339
|
+
| --- | --- | --- | --- |
|
|
340
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
341
|
+
| `output_path` | string | Yes | Local destination path for downloaded model weights. |
|
|
342
|
+
| `project` | string | No | |
|
|
343
|
+
| `filename` | string | No | |
|
|
344
|
+
| `overwrite` | boolean | No | |
|
|
345
|
+
|
|
346
|
+
Notes: Writes model weights to a local filesystem path.
|
|
347
|
+
|
|
348
|
+
#### Download model weights
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{
|
|
352
|
+
"model": "team/project/my-model",
|
|
353
|
+
"output_path": "/tmp/model.pt",
|
|
354
|
+
"overwrite": true
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## Training
|
|
359
|
+
|
|
360
|
+
2 tools.
|
|
361
|
+
|
|
362
|
+
### training_monitor
|
|
363
|
+
|
|
364
|
+
Report a model's training status and progress (works for private and public projects).
|
|
365
|
+
|
|
366
|
+
Metadata: read-only, external/live
|
|
367
|
+
|
|
368
|
+
| Parameter | Type | Required | Description |
|
|
369
|
+
| --- | --- | --- | --- |
|
|
370
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
371
|
+
| `project` | string | No | |
|
|
372
|
+
| `include_metrics` | boolean | No | |
|
|
373
|
+
| `include_history` | boolean | No | |
|
|
374
|
+
| `history_last_n` | number | No | |
|
|
375
|
+
|
|
376
|
+
### training_start
|
|
377
|
+
|
|
378
|
+
Start a cloud training job from an existing model or official YOLO base checkpoint (state-changing, may cost credits). Requires confirm_cost=true.
|
|
379
|
+
|
|
380
|
+
Metadata: state-changing, non-idempotent, external/live
|
|
381
|
+
|
|
382
|
+
| Parameter | Type | Required | Description |
|
|
383
|
+
| --- | --- | --- | --- |
|
|
384
|
+
| `model` | string | Yes | Existing model ref, or official YOLO base checkpoint such as yolo11n.pt or yolo11n-seg.pt. Checkpoint mode auto-creates a project model. |
|
|
385
|
+
| `project` | string | Yes | Project ref that owns the training job and resolved model. |
|
|
386
|
+
| `dataset` | string | Yes | Dataset ref used as training data for the job. |
|
|
387
|
+
| `gpu_type` | string | Yes | Cloud GPU type to allocate for training. |
|
|
388
|
+
| `train_args` | record<string, unknown> | No | |
|
|
389
|
+
| `epochs` | number | No | |
|
|
390
|
+
| `imgsz` | number | No | |
|
|
391
|
+
| `batch` | number | No | |
|
|
392
|
+
| `name` | string | No | |
|
|
393
|
+
| `confirm_cost` | boolean | No | Must be true to allow a credit-costing training run. |
|
|
394
|
+
|
|
395
|
+
Notes: Checkpoint-pattern model values such as `yolo11n.pt` and `yolo11n-seg.pt` trigger checkpoint mode, auto-create a project model, and require dataset-task compatibility.
|
|
396
|
+
|
|
397
|
+
#### Train from existing model
|
|
398
|
+
|
|
399
|
+
```json
|
|
400
|
+
{
|
|
401
|
+
"model": "team/project/my-model",
|
|
402
|
+
"project": "team/project",
|
|
403
|
+
"dataset": "team/datasets/warehouse-items",
|
|
404
|
+
"gpu_type": "rtx-4090",
|
|
405
|
+
"confirm_cost": true
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
#### Train from official YOLO checkpoint
|
|
410
|
+
|
|
411
|
+
```json
|
|
412
|
+
{
|
|
413
|
+
"model": "yolo11n-seg.pt",
|
|
414
|
+
"project": "team/project",
|
|
415
|
+
"dataset": "team/datasets/road-segments",
|
|
416
|
+
"gpu_type": "rtx-4090",
|
|
417
|
+
"confirm_cost": true
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## Exports
|
|
422
|
+
|
|
423
|
+
3 tools.
|
|
424
|
+
|
|
425
|
+
### exports_list
|
|
426
|
+
|
|
427
|
+
List export jobs for a model.
|
|
428
|
+
|
|
429
|
+
Metadata: read-only
|
|
430
|
+
|
|
431
|
+
| Parameter | Type | Required | Description |
|
|
432
|
+
| --- | --- | --- | --- |
|
|
433
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
434
|
+
| `project` | string | No | |
|
|
435
|
+
|
|
436
|
+
### export_status
|
|
437
|
+
|
|
438
|
+
Get status for one export job by 24-character export id.
|
|
439
|
+
|
|
440
|
+
Metadata: read-only
|
|
441
|
+
|
|
442
|
+
| Parameter | Type | Required | Description |
|
|
443
|
+
| --- | --- | --- | --- |
|
|
444
|
+
| `export_id` | string | Yes | 24-character export job id. |
|
|
445
|
+
|
|
446
|
+
### export_create
|
|
447
|
+
|
|
448
|
+
Create a model export job (state-changing, may cost credits). Requires confirm_cost=true.
|
|
449
|
+
|
|
450
|
+
Metadata: state-changing, non-idempotent, external/live
|
|
451
|
+
|
|
452
|
+
| Parameter | Type | Required | Description |
|
|
453
|
+
| --- | --- | --- | --- |
|
|
454
|
+
| `model` | string | Yes | Model id, or slug when project is also provided. |
|
|
455
|
+
| `format` | string | Yes | Requested export format. |
|
|
456
|
+
| `project` | string | No | |
|
|
457
|
+
| `gpu_type` | string | No | |
|
|
458
|
+
| `imgsz` | number | No | |
|
|
459
|
+
| `half` | boolean | No | |
|
|
460
|
+
| `dynamic` | boolean | No | |
|
|
461
|
+
| `confirm_cost` | boolean | No | Must be true to allow a credit-costing export job. |
|
|
462
|
+
|
|
463
|
+
Notes: State-changing export job that may cost credits. Set `confirm_cost` to `true` explicitly.
|
|
464
|
+
|
|
465
|
+
#### Create export job
|
|
466
|
+
|
|
467
|
+
```json
|
|
468
|
+
{
|
|
469
|
+
"model": "team/project/my-model",
|
|
470
|
+
"format": "onnx",
|
|
471
|
+
"confirm_cost": true
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
## Infrastructure
|
|
476
|
+
|
|
477
|
+
1 tools.
|
|
478
|
+
|
|
479
|
+
### gpu_availability
|
|
480
|
+
|
|
481
|
+
Get current cloud-GPU stock status by GPU type.
|
|
482
|
+
|
|
483
|
+
Metadata: read-only, external/live
|
|
484
|
+
|
|
485
|
+
| Parameter | Type | Required | Description |
|
|
486
|
+
| --- | --- | --- | --- |
|