Model Versioning & Frames Parameters¶
How model aliases work, how to pin versions, and how to send the right frames/crops for each model.
In plain terms
Choose the correct model alias and send enough frames/crops. To avoid surprises, use version-suffixed aliases (-v2) and migrate when the model is marked as deprecated.
Two ways to select a model¶
The API supports two request flows for model selection. Use one or the other — when the v2 header is present, the model body field is ignored.
Quick reference: v1 vs v2 parameters¶
| Flow | Request header | Body parameter | Required | Example |
|---|---|---|---|---|
| v1 | (none) | model | No (default: "10") | model: "mixed-30-v2" |
| v2 | X-Model-Version | frame_count | Both together | X-Model-Version: latest + frame_count: 30 |
- v1:
model— Alias string (e.g."mixed-10-v2","mixed-30-v2","10"). See common aliases below. - v2:
X-Model-Version— Version alias (latest,v1,v2,fast, etc.).frame_count— One of10,30,60,90,120. The API resolves to the concrete model (e.g.latest+30→mixed-30-v2).
| Client | Header | Body | Behavior |
|---|---|---|---|
| v1 | — | model: "mixed-30-v2" | Unchanged; model used directly |
| v2 | X-Model-Version: latest | frame_count: 30 | Resolves to mixed-30-v2 |
Example (v2 flow):
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"frame_count": 30,
"source": "live",
"frames": [ ... ]
}
Header: X-Model-Version: latest
Response headers¶
All responses include X-Moveris-Model-Resolved with the actual model ID used. When the resolved model is deprecated, responses also include:
Deprecation: trueSunset: <ISO-date>X-Moveris-Deprecated-Model: <model-id>X-Moveris-Suggested-Model: <replacement>
Model aliases (behavior)¶
The model field is an alias that selects the server inference configuration (including the minimum required frames and the model type).
Common aliases¶
| Alias | What it does | Frame requirement |
|---|---|---|
10 | Fast anti-spoofing model (10 frames) | 10 |
50 | Standard 72-feature spatial model (50 frames) | 50 |
250 | High-security (mixed) spatial model (250 frames) | 250 |
mixed-N | Legacy mixed models (deprecated) | N |
mixed-N-v2 | Recommended mixed v2 models | N |
hybrid-v2-N | Hybrid v2 models (require fps) | N |
What “alias” means¶
- The
modelyou send must be a valid alias (the server validates it). - The alias determines the
frames_required(minimum) that the server uses to validate the request. - For hybrids (
hybrid-v2-*), the server also usesfpsto extract consistent temporal signals.
Where to see which models are available¶
- The models registry
GET /api/v1/modelsreturns the list of aliases withmin_framesand thedeprecatedflag. - The React SDK exposes this information via the
useModels()hook (that’s why you seeactiveModelsanddeprecatedModels).
How the API uses frames (batch endpoints)¶
POST /api/v1/fast-check (frames)¶
For fast-check, the server:
- Checks that you send enough
framesfor the model. - Runs inference using the decodable frames included in the payload.
Frame count validation
- If you send fewer than
frames_required, the API returnserror: "insufficient_frames". - If you send more than
frames_required, the API may process extra frames (no strict max is documented); this can increase latency. - Recommendation: send exactly
frames_requiredfor consistent latency and user experience.
index validation
- Each frame includes an
index(0-based). - In
fast-check, duplicateindexvalues are rejected (validation fails). - The API sorts frames by
indexbefore processing.
Hybrid models (hybrid-v2-*) and fps¶
If you use a hybrid-v2-* model, the payload includes fps (frames per second) so temporal signal extraction matches your capture.
fpsvalidates a range of0 < fps <= 120.- For non-hybrid models,
fpsdoes not change model selection; it is still validated by the request schema.
POST /api/v1/fast-check-crops (crops)¶
For fast-check-crops, the same rule applies:
- With fewer than
frames_requiredcrops:error: "insufficient_frames". - With more than
frames_requiredcrops: the API may process additional crops (possible latency increase). - Recommendation: send exactly
frames_requiredcrops.
index validation
- Each crop includes an
index(0-based). - In
fast-check-crops, the API sorts crops byindexbefore processing.
fast-check-stream: strict indices¶
In POST /api/v1/fast-check-stream, not only the count matters: the server validates the index of each frame against frames_required.
frame.indexmust be within0..(frames_required - 1).- If you send a
frame.indexgreater than or equal toframes_required, the API rejects the request with a400(detail: “exceeds maximum … for model …”). - Duplicating a
frame.indexmay be idempotent in the buffer (it does not increment the counter), but the correct flow is to cover all indices from0toN-1.
Version Pinning¶
Version pinning is done by explicitly choosing the model alias you want. In practice, that means:
- Use versioned aliases when available (for example,
mixed-30-v2instead ofmixed-30). - Avoid aliases marked as
deprecatedin the models registry.
Examples¶
- Recommended pin:
model: "mixed-30-v2"(versioned alias with-v2). - Migration:
model: "mixed-30"(deprecated) ->model: "mixed-30-v2".
Note about the alias 10¶
The alias 10 selects the server’s fast anti-spoofing model, and the implementation may vary depending on internal configuration (for example, the anti-spoofing version used in the deployment).
If you need a strict “v1 vs v2” guarantee for the fast model, coordinate with the Moveris team—there is no additional pinning parameter for 10 on the client side.
Deprecation lifecycle¶
Moveris marks models as deprecated in the models registry. The recommended lifecycle policy is:
- Active (
deprecated: false): use as the default. - Deprecated (
deprecated: true): keep compatibility, but migrate as soon as possible. - Removed: a future phase where a deprecated model may stop being available.
The API and SDK expose that flag:
GET /api/v1/modelsincludesdeprecatedper alias.useModels()separatesactiveModelsanddeprecatedModels.
Migration guide (when deprecations & pinning are in place)¶
1) Migrate mixed-N -> mixed-N-v2¶
- Replace the
modelvalue in your payload: - from
mixed-30-> tomixed-30-v2 - Adjust your frame validation logic using the registry’s
min_frames(in these cases it is often the sameN, but the registry is the source of truth).
Example (batch payload):
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"model": "mixed-30-v2",
"source": "live",
"frames": [
{ "index": 0, "timestamp_ms": 0, "pixels": "..." }
]
}
2) Migrate your model selector (UI / backend)¶
If your integration today “shows all models”, switch to:
- Use
activeModels(non-deprecated) as the primary option. - Treat
deprecatedModelsas candidates only if you cannot migrate yet (and show a warning).
If you use the useModels() hook:
- The hook already provides
activeModelsanddeprecatedModels. - Show
deprecatedModelsonly as a fallback and plan a migration.
3) Ensure correct frame sending¶
- Batch (
fast-check/fast-check-crops): send at leastframes_requiredand (recommended) exactlyframes_required. - Stream (
fast-check-stream): send frames withframe.indexin0..N-1for your model. - Hybrids (
hybrid-v2-*): provide realfps(0 <fps<= 120) for consistent capture.
Quick checklist¶
- Choose
modelusing versioned aliases (-v2) when available. - Do not use deprecated models as the default.
- Validate
frames_requiredagainst the models registry before capturing. - Keep frame count and frame indices consistent with the endpoint (batch vs stream).