| name | edge-impulse-api |
| description | Comprehensive guide for the Edge Impulse ecosystem — Studio API, Ingestion API, Remote Management API, CLI tools, Linux CLI, SDK, and custom blocks. Use this skill when users ask about Edge Impulse APIs, uploading data, training models programmatically, deploying to devices, managing projects/devices via API, building custom blocks, or any Edge Impulse platform integration. |
| argument-hint | ["API task or question"] |
| allowed-tools | Read, Grep, Glob, WebFetch, Write, Edit, Bash |
Edge Impulse API & Ecosystem Guide
Table of Contents
- Platform Overview
- Authentication
- Studio API
- Ingestion API
- Remote Management API
- CLI Tools
- Linux CLI
- Custom Blocks
- Common Recipes & Quick Reference
Platform Overview
Edge Impulse is the leading development platform for machine learning on edge devices. It provides an end-to-end workflow: collect data → design an impulse → train a model → deploy to hardware.
Key Concepts
- Project: A container for datasets, impulse design, and trained models. Identified by a numeric
projectId.
- Impulse: The ML pipeline consisting of input block → processing (DSP) blocks → learning blocks → output. An impulse defines how raw data is processed and classified.
- DSP Block (Signal Processing): Transforms raw sensor data into features (e.g., spectral analysis for audio, image resize/crop for vision).
- Learn Block: The ML model that learns from DSP features (neural network, anomaly detection, regression, etc.).
- Deployment: Compiled model + runtime packaged for a specific target (C++ library, Arduino library, Linux EIM, WebAssembly, etc.).
- Sample: A single data item (time-series, image, audio, video) with a label, stored in training or testing dataset.
- Device: A physical board or virtual device connected to a project for data acquisition or inference.
- Organization: Groups projects, users, and custom blocks under an enterprise entity.
- Block: A containerized (Docker) extension — custom DSP, ML, transformation, or deployment logic.
Base URLs
| Service | URL |
|---|
| Studio API | https://studio.edgeimpulse.com/v1 |
| Ingestion API | https://ingestion.edgeimpulse.com |
| Remote Management | wss://remote-mgmt.edgeimpulse.com |
| OpenAPI Spec | https://studio.edgeimpulse.com/openapi.yml |
Authentication
API Key (Project-Level)
Most common method. Found in Studio → Dashboard → Keys.
x-api-key: ei_abc123...
Used for: Studio API, Ingestion API, Remote Management API.
JWT Token (User-Level)
Obtained via login endpoint. Required for user/org management operations.
curl -X POST https://studio.edgeimpulse.com/v1/api-login \
-H "Content-Type: application/json" \
-d '{"username": "you@example.com", "password": "yourpassword"}'
Response contains token. Use as:
x-jwt-token: <token>
# or Cookie: jwt=<token>
HMAC Keys
Used to sign data payloads for the Ingestion API. Ensures data integrity. Managed per-project via GET/POST /api/{projectId}/hmackeys.
Scopes
JWT tokens have scopes that limit access:
projects:read, projects:create, projects:update
devices:read, devices:create, devices:update, devices:delete
user:read, organizations:read
Studio API
Base URL: https://studio.edgeimpulse.com/v1
The Studio API exposes most Studio functionality programmatically. All endpoints return JSON. Long-running operations use an async job pattern.
Projects
| Method | Endpoint | Description |
|---|
| GET | /api/projects | List all active projects |
| POST | /api/projects/create | Create a new project |
| GET | /api/{projectId}/devkeys | Get development API keys |
| GET | /api/{projectId}/downloads | Get available deployment downloads |
| GET | /api/{projectId}/data-summary | Get dataset summary (counts, labels) |
| GET | /api/{projectId}/data-axes | Get sensor axes summary |
| GET | /api/{projectId}/data-interval | Get training data interval (ms) |
| GET | /api/{projectId}/versions | List project versions |
| POST | /api/{projectId}/versions/{versionId} | Update a version |
| DELETE | /api/{projectId}/versions/{versionId} | Delete a version |
| GET | /api/{projectId}/socket-token | Get WebSocket token for real-time events |
| GET | /api/{projectId}/last-modification | Get last modification timestamp |
| GET | /api/{projectId}/development-boards | Get compatible dev boards |
| GET | /api/{projectId}/target-constraints | Get target device constraints |
| POST | /api/{projectId}/target-constraints | Set target device constraints |
| GET | /api/{projectId}/model-variants | Get available model variants |
Project Collaborators
| Method | Endpoint | Description |
|---|
| POST | /api/{projectId}/collaborators/add | Add collaborator |
| POST | /api/{projectId}/collaborators/remove | Remove collaborator |
| POST | /api/{projectId}/collaborators/transfer-ownership | Transfer to user |
| POST | /api/{projectId}/collaborators/transfer-ownership-org | Transfer to org |
API & HMAC Keys
| Method | Endpoint | Description |
|---|
| GET | /api/{projectId}/apikeys | List API keys |
| POST | /api/{projectId}/apikeys | Create API key |
| DELETE | /api/{projectId}/apikeys/{apiKeyId} | Revoke API key |
| GET | /api/{projectId}/hmackeys | List HMAC keys |
| POST | /api/{projectId}/hmackeys | Add HMAC key |
| DELETE | /api/{projectId}/hmackeys/{hmacId} | Remove HMAC key |
Raw Data (Samples)
| Method | Endpoint | Description |
|---|
| GET | /api/{projectId}/raw-data | List samples (with filters: category, label, limit, offset) |
| GET | /api/{projectId}/raw-data/count | Count samples matching filters |
| GET | /api/{projectId}/raw-data/ratio | Get train/test split ratio |
| GET | /api/{projectId}/raw-data/metadata | Get sample metadata fields |
| GET | /api/{projectId}/raw-data/{sampleId} | Get single sample details |
| DELETE | /api/{projectId}/raw-data/{sampleId} | Delete a sample |
| GET | /api/{projectId}/raw-data/{sampleId}/raw | Download raw file (CBOR/JSON) |
| GET | /api/{projectId}/raw-data/{sampleId}/wav | Download as WAV |
| GET | /api/{projectId}/raw-data/{sampleId}/image | Download as image (JPG/PNG) |
| GET | /api/{projectId}/raw-data/{sampleId}/video | Download as video (MP4/AVI) |
| POST | /api/{projectId}/raw-data/{sampleId}/rename | Rename sample |
| POST | /api/{projectId}/raw-data/{sampleId}/edit-label | Change label |
| POST | /api/{projectId}/raw-data/{sampleId}/move | Move between train/test |
| POST | /api/{projectId}/raw-data/{sampleId}/crop | Crop sample |
| POST | /api/{projectId}/raw-data/{sampleId}/split | Split into frames |
| POST | /api/{projectId}/raw-data/{sampleId}/segment | Segment sample |
| POST | /api/{projectId}/raw-data/{sampleId}/find-segments | Auto-detect segments |
| POST | /api/{projectId}/raw-data/{sampleId}/bounding-boxes | Set object detection bounding boxes |
| POST | /api/{projectId}/rebalance | Rebalance train/test split |
| POST | /api/{projectId}/raw-data/delete-all | Delete all samples |
| POST | /api/{projectId}/raw-data/delete-all/{category} | Delete all in category |
| GET | /api/{projectId}/raw-data/label-object-detection-queue | OD labeling queue |
Devices
| Method | Endpoint | Description |
|---|
| GET | /api/{projectId}/devices | List all devices |
| GET | /api/{projectId}/device/{deviceId} | Get device details |
| DELETE | /api/{projectId}/device/{deviceId} | Delete device |
| POST | /api/{projectId}/devices/create | Register new device |
| POST | /api/{projectId}/devices/{deviceId}/rename | Rename device |
| POST | /api/{projectId}/device/{deviceId}/start-sampling | Trigger remote sampling |
| POST | /api/{projectId}/devices/{deviceId}/request-model-update | Push model update |
| POST | /api/{projectId}/device/{deviceId}/debug-stream/inference/start | Start inference debug |
| POST | /api/{projectId}/device/{deviceId}/debug-stream/snapshot/start | Start snapshot stream |
| POST | /api/{projectId}/device/{deviceId}/debug-stream/keep-alive | Keep debug alive |
| POST | /api/{projectId}/device/{deviceId}/debug-stream/stop | Stop debug stream |
| POST | /api/{projectId}/device/{deviceId}/get-impulse-records | Get on-device records |
Deployment
| Method | Endpoint | Description |
|---|
| GET | /api/deployment/targets | List all deployment targets |
| GET | /api/{projectId}/downloads | List available downloads for project |
Deployment builds are triggered as jobs (see Jobs section).
Jobs (Async Operations)
Long-running operations (training, DSP generation, deployment builds, data export) return a jobId immediately.
Pattern:
- Start a job → receive
jobId (e.g., job-1569583053767)
- Connect to project WebSocket for real-time updates
- Listen for events:
job-data-{jobId} — progress updates (percentage, status messages)
job-finished-{jobId} — completion with success/failure status
Key job-triggering endpoints:
- Feature generation (DSP)
- Model training / retraining
- Deployment builds
- Data export
- Performance calibration
- Dataset rebalancing (v2)
Jobs are subject to the same compute time limits as the Studio UI.
AI Actions
| Method | Endpoint | Description |
|---|
| GET | /api/{projectId}/ai-actions | List AI Actions |
| POST | /api/{projectId}/ai-actions/create | Create AI Action |
| GET | /api/{projectId}/ai-actions/{actionId} | Get AI Action config |
| POST | /api/{projectId}/ai-actions/{actionId} | Update AI Action |
| DELETE | /api/{projectId}/ai-actions/{actionId} | Delete AI Action |
| POST | /api/{projectId}/ai-actions/order | Reorder actions |
| POST | /api/{projectId}/ai-actions/{actionId}/preview-samples | Preview affected samples |
| GET | /api/{projectId}/ai-actions/{actionId}/clear-proposed-changes | Clear proposed changes |
Users
| Method | Endpoint | Description |
|---|
| POST | /api-login | Get JWT token |
| GET | /api/user | Get current user |
| POST | /api/user | Update current user |
| DELETE | /api/user | Delete current user |
| GET | /api/user/projects | Get user's projects |
| GET | /api/user/organizations | Get user's organizations |
| POST | /api/user/change-password | Change password |
| POST | /api/user/mfa/totp/create-key | Generate MFA key |
| POST | /api/user/mfa/totp/set-key | Enable MFA |
| POST | /api/user/mfa/totp/clear | Disable MFA |
| GET | /api/user/subscription/metrics | Get compute metrics |
| POST | /api-user-request-reset-password | Request password reset |
Organizations & White-labels
Organizations manage enterprise features: custom blocks, storage buckets, data campaigns, pipelines, and project provisioning.
White-label endpoints (/api/whitelabel/{id}/...) manage custom deployment targets and impulse blocks for branded instances.
Ingestion API
Base URL: https://ingestion.edgeimpulse.com
Used to upload data (sensor readings, images, audio, video) into Edge Impulse projects.
Endpoints
| Method | Endpoint | Purpose |
|---|
| POST | /api/training/files | Upload training data (multipart) |
| POST | /api/testing/files | Upload testing data (multipart) |
| POST | /api/anomaly/files | Upload anomaly data (multipart) |
| POST | /api/training/data | Upload training data (legacy, JSON/CBOR body) |
| POST | /api/testing/data | Upload testing data (legacy, JSON/CBOR body) |
| POST | /api/anomaly/data | Upload anomaly data (legacy, JSON/CBOR body) |
Required Headers
| Header | Value | Description |
|---|
x-api-key | ei_abc123... | Project API key (required) |
Content-Type | multipart/form-data, application/json, or application/cbor | Data format |
Optional Headers
| Header | Value | Description |
|---|
x-label | string | Label for the uploaded data |
x-no-label | 1 | Prevent automatic label assignment |
x-disallow-duplicates | 1 | Reject duplicate files (hash-based) |
x-add-date-id | 1 | Append unique date-based ID to filename |
X-File-Name | string | Filename (legacy /data endpoints) |
Supported File Formats
- Sensor data:
.json, .cbor, .csv
- Audio:
.wav
- Images:
.jpg, .png
- Video:
.mp4, .avi
- Labels:
.labels (for pre-annotated data)
Limits
- Max 1,000 files per request
- Max 100 MB per individual file
Data Envelope Format (JSON/CBOR)
For structured sensor data uploads:
{
"protected": {
"ver": "v1",
"alg": "HS256",
"iat": 1234567890
},
"signature": "HMAC-SHA256-hex-or-zeros-if-unsigned",
"payload": {
"device_name": "my-device",
"device_type": "MY_SENSOR",
"interval_ms": 16,
"sensors": [
{ "name": "accX", "units": "m/s2" },
{ "name": "accY", "units": "m/s2" },
{ "name": "accZ", "units": "m/s2" }
],
"values": [
[0.01, -9.81, 0.03],
[0.02, -9.80, 0.01]
]
}
}
For unsigned data, set signature to all zeros: "0000000000000000000000000000000000000000000000000000000000000000".
Response Codes
| Code | Meaning |
|---|
| 200 | Success — filename returned in body |
| 400 | Invalid request structure |
| 401 | Missing or invalid API key |
| 421 | Required header missing |
| 500 | Server error |
Upload Examples
Upload image files (multipart):
curl -X POST https://ingestion.edgeimpulse.com/api/training/files \
-H "x-api-key: ei_abc123" \
-H "x-label: cat" \
-F "data=@cat01.jpg" \
-F "data=@cat02.jpg"
Upload WAV audio:
curl -X POST https://ingestion.edgeimpulse.com/api/training/files \
-H "x-api-key: ei_abc123" \
-H "x-label: noise" \
-F "data=@ambient.wav"
Upload structured sensor data (JSON body):
curl -X POST https://ingestion.edgeimpulse.com/api/training/data \
-H "x-api-key: ei_abc123" \
-H "x-label: walking" \
-H "Content-Type: application/json" \
-d '{
"protected": {"ver":"v1","alg":"none","iat":1234567890},
"signature": "0000000000000000000000000000000000000000000000000000000000000000",
"payload": {
"device_name": "sensor-01",
"device_type": "ACCEL",
"interval_ms": 10,
"sensors": [{"name":"accX","units":"m/s2"},{"name":"accY","units":"m/s2"},{"name":"accZ","units":"m/s2"}],
"values": [[0.01,-9.81,0.03],[0.02,-9.80,0.01]]
}
}'
Upload CSV:
curl -X POST https://ingestion.edgeimpulse.com/api/training/files \
-H "x-api-key: ei_abc123" \
-H "x-label: idle" \
-F "data=@sensor_readings.csv"
Remote Management API
Endpoint: wss://remote-mgmt.edgeimpulse.com (port 443) or ws://remote-mgmt.edgeimpulse.com (port 80)
Enables two-way WebSocket communication between devices and Edge Impulse Studio. Used for remote data acquisition, live inference debugging, and snapshot streaming. Messages are encoded in CBOR or JSON (format set by the initial Hello message).
Connection Flow
1. Hello (Handshake)
Device sends first:
{
"hello": {
"version": 3,
"apiKey": "ei_abc123...",
"deviceId": "my-device-001",
"deviceType": "MY_BOARD",
"connection": "ip",
"sensors": [
{
"name": "Accelerometer",
"maxSampleLengthS": 300,
"frequencies": [62.5, 100]
},
{
"name": "Camera (320x240)",
"maxSampleLengthS": 5,
"frequencies": [10]
}
],
"supportsSnapshotStreaming": true
}
}
Server responds with { "hello": true/false }.
2. Sampling Flow
Server → Device (sample request):
{
"sample": {
"label": "wave",
"length": 5000,
"path": "/api/training/data",
"hmacKey": "abc123...",
"interval": 16,
"sensor": "Accelerometer"
}
}
Device responds true/false, then sends sequential notifications:
{ "sampleStarted": true } — sampling begins
{ "sampleProcessing": true } — (optional) preprocessing
{ "sampleReading": true, "progressPercentage": 50 } — (optional) reading from device
{ "sampleUploading": true } — uploading to ingestion service
{ "sampleFinished": true } — done
3. Snapshot Streaming
Server → Device:
{ "startSnapshot": true } — begin camera streaming
{ "stopSnapshot": true } — stop streaming
Device → Server:
{ "snapshotFrame": "<base64-encoded-jpg>" }
Recommended max 5 frames/second.
CLI Tools
Install the Edge Impulse CLI globally via npm (requires Node.js v16+):
npm install -g edge-impulse-cli
edge-impulse-daemon
Configures devices over serial and acts as a proxy for devices without IP connectivity. Bridges serial devices to the Remote Management API.
edge-impulse-daemon
edge-impulse-daemon --clean
edge-impulse-daemon --api-key ei_...
edge-impulse-uploader
Uploads and signs local files to a project's dataset.
edge-impulse-uploader path/to/files/*.wav
edge-impulse-uploader --label "noise" recording.wav
edge-impulse-uploader --category testing path/to/files/*
edge-impulse-uploader --api-key ei_... --label "idle" data.csv
edge-impulse-uploader --label "cat" images/*.jpg
edge-impulse-data-forwarder
Collects data from any device over serial and forwards to Edge Impulse. The simplest way to connect custom hardware.
edge-impulse-data-forwarder
edge-impulse-data-forwarder --frequency 100
edge-impulse-data-forwarder --clean
The device should print comma-separated sensor values over serial (e.g., 0.01,-9.81,0.03\n).
edge-impulse-run-impulse
Displays the impulse running on a connected device. Shows real-time inference results.
edge-impulse-run-impulse
edge-impulse-blocks
Manages custom blocks (see Custom Blocks section below).
edge-impulse-blocks init
edge-impulse-blocks runner
edge-impulse-blocks push
edge-impulse-blocks info
edge-impulse-blocks --clean
Common CLI Flags
| Flag | Description |
|---|
--api-key ei_... | Authenticate non-interactively |
--clean | Reset stored credentials |
--dev | Use development server |
--silent | Suppress output |
--help | Show help |
Linux CLI
For running inference and collecting data on Linux devices (Raspberry Pi, Jetson, etc.).
Installation
npm install -g edge-impulse-linux
sudo apt install -y gcc g++ make build-essential sox gstreamer1.0-tools \
gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps
edge-impulse-linux
Collects sensor data (camera/microphone) on Linux devices and uploads to Edge Impulse.
edge-impulse-linux
edge-impulse-linux --disable camera
edge-impulse-linux --disable microphone
edge-impulse-linux --api-key ei_...
edge-impulse-linux --clean
edge-impulse-linux-runner
Downloads and runs a trained model locally for inference. Can expose an HTTP API.
edge-impulse-linux-runner
edge-impulse-linux-runner --api-key ei_...
edge-impulse-linux-runner --run-http-server 4911
edge-impulse-linux-runner --model-file path/to/model.eim
edge-impulse-linux-runner --download path/to/model.eim
HTTP Server Mode
When started with --run-http-server <port>, the runner exposes endpoints for on-demand classification:
curl http://localhost:4911/api/classify
curl http://localhost:4911/api/info
Key Runner Options
| Flag | Description |
|---|
--run-http-server <port> | Enable HTTP API mode |
--model-file <path> | Use local .eim file |
--download <path> | Download model file only |
--api-key ei_... | Non-interactive auth |
--quantized | Use int8 quantized model |
--enable-camera | Force camera usage |
--enable-microphone | Force microphone usage |
--clean | Reset credentials |
Custom Blocks
Blocks are Docker-containerized extensions that add custom logic to Edge Impulse. They can be written in any language.
Block Types
| Type | Purpose | Example |
|---|
| Transformation | Process/transform datasets | Data augmentation, format conversion, synthetic data |
| Custom DSP | Custom signal processing | Proprietary feature extraction, custom FFT |
| Custom ML | Custom learning algorithms | PyTorch model, scikit-learn pipeline, pre-trained weights |
| Deployment | Custom build targets | Proprietary firmware, custom library format |
Creating a Block
1. Initialize
edge-impulse-blocks init
Prompts for: block type, name, description, organization. Generates a template with Dockerfile and scaffolding.
2. Develop & Test Locally
edge-impulse-blocks runner --data-item <item-id>
edge-impulse-blocks runner --epochs 50 --learning-rate 0.001
edge-impulse-blocks runner --file <sample-file>
The runner caches downloaded data to minimize bandwidth on repeat runs.
3. Push to Edge Impulse
edge-impulse-blocks push
Archives the block directory and uploads to Edge Impulse for cloud execution.
Dockerfile Requirements
Every block needs a Dockerfile with:
FROM python:3.10-slim
# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy application
COPY . /app
# CRITICAL: Must use ENTRYPOINT (not CMD)
ENTRYPOINT ["python", "/app/main.py"]
Important constraints:
- Must have an
ENTRYPOINT instruction
- Never use
WORKDIR /home/... — the /home path is mounted by Edge Impulse at runtime, making your files inaccessible
- Keep images small to reduce push/pull times
Configuration Files
.ei-block-config — Block metadata (auto-generated by init). Commit to version control.
.ei-ignore — Exclude files from upload (like .gitignore). Uses absolute paths or wildcards.
# .ei-ignore example
*.pyc
__pycache__/
.git/
.env
test_data/
Block Authentication
edge-impulse-blocks --api-key ei_...
edge-impulse-blocks --clean
edge-impulse-blocks info
Common Recipes & Quick Reference
Recipe: List all projects
curl -H "x-jwt-token: $JWT" \
https://studio.edgeimpulse.com/v1/api/projects
Recipe: Get project info and data summary
curl -H "x-api-key: $API_KEY" \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/data-summary"
Recipe: List all samples in training dataset
curl -H "x-api-key: $API_KEY" \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/raw-data?category=training&limit=100&offset=0"
Recipe: Upload training images via Ingestion API
curl -X POST https://ingestion.edgeimpulse.com/api/training/files \
-H "x-api-key: $API_KEY" \
-H "x-label: dog" \
-F "data=@dog1.jpg" \
-F "data=@dog2.jpg" \
-F "data=@dog3.jpg"
Recipe: Upload sensor data (JSON body)
curl -X POST https://ingestion.edgeimpulse.com/api/training/data \
-H "x-api-key: $API_KEY" \
-H "x-label: idle" \
-H "Content-Type: application/json" \
-d @sensor_data.json
Recipe: Batch upload with uploader CLI
edge-impulse-uploader --api-key $API_KEY training_data/*.wav
edge-impulse-uploader --api-key $API_KEY --category testing test_data/*.jpg
Recipe: Move sample between train/test
curl -X POST \
-H "x-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"category": "testing"}' \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/raw-data/$SAMPLE_ID/move"
Recipe: Edit sample label
curl -X POST \
-H "x-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"label": "new_label"}' \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/raw-data/$SAMPLE_ID/edit-label"
Recipe: Delete all samples
curl -X POST -H "x-jwt-token: $JWT" \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/raw-data/delete-all"
Recipe: List devices
curl -H "x-api-key: $API_KEY" \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/devices"
Recipe: Trigger remote sampling
curl -X POST \
-H "x-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"label":"wave","lengthMs":5000,"sensor":"Built-in accelerometer","interval":16}' \
"https://studio.edgeimpulse.com/v1/api/$PROJECT_ID/device/$DEVICE_ID/start-sampling"
Recipe: Get deployment targets
curl -H "x-api-key: $API_KEY" \
"https://studio.edgeimpulse.com/v1/api/deployment/targets"
Recipe: Run inference on Linux with HTTP API
edge-impulse-linux-runner --api-key $API_KEY --run-http-server 4911 &
curl http://localhost:4911/api/classify
Recipe: Create and push a custom block
edge-impulse-blocks init
edge-impulse-blocks runner --epochs 10
edge-impulse-blocks push
Recipe: Python — Upload data programmatically
import requests
API_KEY = "ei_abc123..."
PROJECT_ID = 12345
with open("sample.jpg", "rb") as f:
resp = requests.post(
"https://ingestion.edgeimpulse.com/api/training/files",
headers={
"x-api-key": API_KEY,
"x-label": "cat",
},
files={"data": ("sample.jpg", f, "image/jpeg")},
)
print(resp.json())
Recipe: Python — List samples
import requests
API_KEY = "ei_abc123..."
PROJECT_ID = 12345
resp = requests.get(
f"https://studio.edgeimpulse.com/v1/api/{PROJECT_ID}/raw-data",
headers={"x-api-key": API_KEY},
params={"category": "training", "limit": 50},
)
samples = resp.json().get("samples", [])
for s in samples:
print(f" {s['id']}: {s['label']} ({s['filename']})")
Environment Variable Convention
export EI_API_KEY="ei_abc123..."
export EI_PROJECT_ID="12345"
Quick Command Reference
| Task | Command / Endpoint |
|---|
| Install CLI | npm install -g edge-impulse-cli |
| Install Linux CLI | npm install -g edge-impulse-linux |
| Connect device (serial) | edge-impulse-daemon |
| Forward serial data | edge-impulse-data-forwarder |
| Upload files | edge-impulse-uploader --label X files/* |
| Run inference (Linux) | edge-impulse-linux-runner |
| Run inference (HTTP) | edge-impulse-linux-runner --run-http-server 4911 |
| Init custom block | edge-impulse-blocks init |
| Test block locally | edge-impulse-blocks runner |
| Push block | edge-impulse-blocks push |
| Get JWT | POST /api-login |
| List projects | GET /api/projects |
| Upload data | POST ingestion.edgeimpulse.com/api/training/files |
| List samples | GET /api/{projectId}/raw-data |
| List devices | GET /api/{projectId}/devices |
| Deployment targets | GET /api/deployment/targets |