SmartBlur API Docker Demo
The SmartBlur API Docker demo lets developers test automated image and video redaction without a sales call. It runs on your own machine or server, keeps media inside your infrastructure, and validates a server-side 7-day trial through smartblur.app.
The demo is designed for integration testing. Production use requires an active SmartBlur API subscription or enterprise license.
What the demo does
- Runs SmartBlur API as a private Docker service.
- Starts a server-side 7-day trial when no license key is configured.
- Persists trial state and saved demo data in Docker named volumes.
- Stops serving requests after the trial/license becomes invalid.
- Keeps saved data volumes intact when the main API process stops.
- Uses protected model files mounted into the container.
Start the demo
Option A: pull the demo trial image
Use this path when you only want to try the API and do not need the source bundle:
docker pull smartblur/smartblur-enterprise-api-demo:latest
docker volume create smartblur-demo-state
docker volume create smartblur-demo-data
docker run --name smartblur-api-demo `
-p 18081:8080 `
-e SMARTBLUR_ALLOW_TRIAL=true `
-e SMARTBLUR_EXIT_ON_INVALID_LICENSE=true `
-e SMARTBLUR_LICENSE_SERVER_URL=https://smartblur.app/api/v1/ `
-v smartblur-demo-state:/var/lib/smartblur-enterprise `
-v smartblur-demo-data:/data `
smartblur/smartblur-enterprise-api-demo:latest
The first request to /v1/license starts or checks the server-side trial. The demo state stays in the smartblur-demo-state volume, so restarting the container does not reset the trial.
If you already have a paid API license, pass it at runtime:
docker run --name smartblur-api-demo `
-p 18081:8080 `
-e SMARTBLUR_LICENSE_KEY='PP-your-license-key' `
-e SMARTBLUR_LICENSE_SERVER_URL=https://smartblur.app/api/v1/ `
-v smartblur-demo-state:/var/lib/smartblur-enterprise `
-v smartblur-demo-data:/data `
smartblur/smartblur-enterprise-api-demo:latest
Option B: run from the API bundle
Use this path when you have the full SmartBlur API bundle and want to build locally:
$env:SMARTBLUR_PUBLISHED_PORT='18081'
$env:SMARTBLUR_MODEL_KEY='your-demo-model-key'
docker compose -f docker-compose.demo.yml up --build -d
Then check the service:
curl http://127.0.0.1:18081/health
curl http://127.0.0.1:18081/v1/license
Expected license response during the trial:
{
"ok": true,
"required": true,
"valid": true,
"mode": "trial",
"trial": true,
"expires_at": "2026-07-12T05:20:45.288893+00:00"
}
Trial expiration behavior
The demo sets:
SMARTBLUR_ALLOW_TRIAL=true
SMARTBLUR_EXIT_ON_INVALID_LICENSE=true
At startup and on a periodic interval, the API validates the trial or license with smartblur.app. When the 7-day trial expires, the main API process exits and the container stops serving requests. Docker named volumes are not deleted, so saved state or output data can remain available for inspection or migration.
Persisted volumes
The demo uses named volumes for state and data:
smartblur-demo-state -> /var/lib/smartblur-enterprise
smartblur-demo-data -> /data
The state volume stores the persisted installation ID and local trial cache. The data volume is reserved for saved demo artifacts.
Local state protection
The local trial state is not stored as readable JSON. It is encoded as a Fernet token and bound to the current demo installation.
The local state key is derived from:
persisted installation ID
deployment fingerprint
SMARTBLUR_LOCAL_CONFIG_APP_ID
SMARTBLUR_LOCAL_CONFIG_SECRET, if set
This prevents casual copying or editing of the trial state file. If the state is moved to another device, edited, or decoded with a mismatched deployment identity, SmartBlur rejects it as tampered.
This is defense in depth, not unbreakable DRM. A user who fully controls a Docker host can still patch code, inspect runtime memory, or modify containers. For the strongest model and license protection, use a hosted SmartBlur API deployment where customers never receive the model or enforcement code.
Important environment variables
| Variable | Demo default | Purpose |
|---|---|---|
SMARTBLUR_ALLOW_TRIAL | true | Enables the no-contact 7-day trial flow. |
SMARTBLUR_EXIT_ON_INVALID_LICENSE | true | Stops the API process after trial/license failure. |
SMARTBLUR_LICENSE_SERVER_URL | https://smartblur.app/api/v1/ | SmartBlur license server endpoint. |
SMARTBLUR_MODEL_KEY | required | Secret used to open protected model files. Do not commit it. |
SMARTBLUR_TRIAL_STATE_PATH | /var/lib/smartblur-enterprise/license_state.json | Fernet-encoded local trial state path. |
SMARTBLUR_INSTALLATION_ID_PATH | /var/lib/smartblur-enterprise/installation_id | Persisted install ID used for stable trial fingerprinting. |
SMARTBLUR_LOCAL_CONFIG_APP_ID | smartblur-enterprise-api-v1 | App identifier mixed into the Fernet state key. |
SMARTBLUR_LOCAL_CONFIG_SECRET | empty | Optional deployment secret mixed into the Fernet state key. |
Useful commands
Check container status:
docker ps --filter name=smartblur-api-demo
docker compose -f docker-compose.demo.yml ps
View recent logs:
docker logs --tail 120 smartblur-api-demo
docker compose -f docker-compose.demo.yml logs --tail 120 smartblur-enterprise-api
Stop the demo while keeping volumes:
docker stop smartblur-api-demo
docker rm smartblur-api-demo
docker compose -f docker-compose.demo.yml down
Remove demo volumes only when you intentionally want to reset saved local state:
docker compose -f docker-compose.demo.yml down -v
Move from demo to paid API
After subscribing to a SmartBlur API plan, start the same Docker runtime with a license key:
$env:SMARTBLUR_LICENSE_KEY='PP-your-license-key'
$env:SMARTBLUR_MODEL_KEY='your-model-key'
docker compose -f docker-compose.prod.yml up --build -d
Paid production images keep SMARTBLUR_ALLOW_TRIAL=false by default. This makes production deployments fail closed when no license key is provided.