Vision
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
GET | |
GET | |
POST | |
DELETE | |
POST | |
GET | |
GET | |
POST | |
POST | |
POST | |
GET | |
POST | |
GET |
Retrieve environment vision quota
Required API key scopes
replay_scanner:readResponse
Example request
GET /api /projects /:project_id /vision /quotaExample response
Status 200
List all vision scanners
CRUD for Replay Vision scanners.
Required API key scopes
replay_scanner:readQuery parameters
- created_bystring
- emits_signalsboolean
- enabledstring
- limitinteger
- offsetinteger
- order_bystringOne of:
"-created_at""-created_by""-enabled""-name""-sampling_rate""-scanner_type""-updated_at""created_at""created_by""enabled""name""sampling_rate""scanner_type""updated_at" - scanner_typestring
- searchstring
Response
Example request
GET /api /projects /:project_id /vision /scannersExample response
Status 200
Create vision scanners
CRUD for Replay Vision scanners.
Required API key scopes
replay_scanner:writesession_recording:readRequest parameters
- namestring
- descriptionstring
- scanner_type
- scanner_config
- query
- sampling_ratenumber
- sampling_mode
- provider
- model
- enabledboolean
- emits_signalsboolean
Response
Example request
POST /api /projects /:project_id /vision /scannersExample response
Status 201
Retrieve vision scanners
CRUD for Replay Vision scanners.
Required API key scopes
replay_scanner:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /vision /scanners /:idExample response
Status 200
Update vision scanners
CRUD for Replay Vision scanners.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
Request parameters
- namestring
- descriptionstring
- scanner_type
- scanner_config
- query
- sampling_ratenumber
- sampling_mode
- provider
- model
- enabledboolean
- emits_signalsboolean
Response
Example request
PATCH /api /projects /:project_id /vision /scanners /:idExample response
Status 200
Delete vision scanners
CRUD for Replay Vision scanners.
Required API key scopes
replay_scanner:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /vision /scanners /:idExample response
Status 204 No response body
Create vision scanners observe
Apply this scanner to one specific session, on demand. Returns 202 with the workflow handle.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
Request parameters
- session_idstring
Response
Example request
POST /api /projects /:project_id /vision /scanners /:id /observeExample response
Status 202
List all vision scanners observations
Read-only access to observations produced by a scanner.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- scanner_idstring
Query parameters
- labeledboolean
- limitinteger
- offsetinteger
- order_bystringOne of:
"-completed_at""-created_at""-label""-recording_subject_email""-result_confidence""-result_score""-result_verdict""-scanner_version""-started_at""-status""completed_at""created_at""label""recording_subject_email""result_confidence""result_score""result_verdict""scanner_version""started_at""status" - recording_subjectstring
- session_idstring
- statusstring
- tagsstring
- triggered_bystring
- verdictstring
Response
Example request
GET /api /projects /:project_id /vision /scanners /:scanner_id /observationsExample response
Status 200
Retrieve vision scanners observations
Retrieve one observation. Any list filters passed along (status, tags, order_by, …) scope the previous_observation_id/next_observation_id navigation to the matching, identically-ordered set — so prev/next from a filtered table stays within that filtered list.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- idstring
- scanner_idstring
Query parameters
- labeledstring
- order_bystringOne of:
"-completed_at""-created_at""-label""-recording_subject_email""-result_confidence""-result_score""-result_verdict""-scanner_version""-started_at""-status""completed_at""created_at""label""recording_subject_email""result_confidence""result_score""result_verdict""scanner_version""started_at""status" - recording_subjectstring
- session_idstring
- statusstring
- tagsstring
- triggered_bystring
- verdictstring
Response
Example request
GET /api /projects /:project_id /vision /scanners /:scanner_id /observations /:idExample response
Status 200
Create vision scanners observations label
Set or update the observation's shared label: whether the scanner scored the session correctly, plus optional feedback on what it got wrong. One label per observation, shared across the team; these labels feed prompt improvement. Requires session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Request parameters
- is_correctboolean
- feedbackstringDefault:
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /observations /:id /labelExample response
Status 200
Delete vision scanners observations label
Remove the observation's shared label. Requires session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Example request
DELETE /api /projects /:project_id /vision /scanners /:scanner_id /observations /:id /labelExample response
Status 204 No response body
Create vision scanners observations retry
Delete a failed observation and re-run its scanner on the same recording. Returns 202 with the workflow handle.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /observations /:id /retryExample response
Status 202
Retrieve vision scanners observations stats
Aggregate counts and per-scanner-type distributions over the filtered observation set. Same filters as the list endpoint apply.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- scanner_idstring
Query parameters
- labeledstring
- recent_daysinteger
- recording_subjectstring
- session_idstring
- statusstring
- tagsstring
- triggered_bystring
- verdictstring
Response
Example request
GET /api /projects /:project_id /vision /scanners /:scanner_id /observations /statsExample response
Status 200
List all vision scanners prompt suggestions
AI prompt-rewrite suggestions for a scanner, generated from the team's thumbs up/down ratings.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- scanner_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestionsExample response
Status 200
Create vision scanners prompt suggestions apply
Apply this suggestion: write its prompt to the scanner (bumping the scanner version) and mark the suggestion applied. Only the current pending suggestion can be applied. Requires session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestions /:id /applyExample response
Status 200
Create vision scanners prompt suggestions dismiss
Dismiss this suggestion without applying it. Only the current pending suggestion can be dismissed. Requires session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestions /:id /dismissExample response
Status 200
Create vision scanners prompt suggestions evaluate
Test this suggestion before applying it: re-run the scanner with the suggested prompt against already-rated sessions in the background and compare each fresh output with the stored one. Results land on the suggestion's evaluation field. Poll current while status is running. session_limit controls how many rated sessions are re-run (thumbs-down prioritized, up to evaluation_session_cap). Each successful re-run charges credits like a normal observation of the same model. The request is refused with 402 when the planned credits exceed what is left of the monthly limit. Only monitor and classifier scanners are supported. Requires session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
- scanner_idstring
Request parameters
- session_limitintegerDefault:
10
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestions /:id /evaluateExample response
Status 200
Retrieve vision scanners prompt suggestions current
The scanner's newest prompt suggestion plus whether it is stale (the ratings changed since it was generated) and how many rated observations are available.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- scanner_idstring
Response
Example request
GET /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestions /currentExample response
Status 200
Create vision scanners prompt suggestions generate
Generate a fresh prompt suggestion from the team's current ratings. The previous pending suggestion becomes history (superseded). Requires at least one rated observation and session recording edit access.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- scanner_idstring
Response
Example request
POST /api /projects /:project_id /vision /scanners /:scanner_id /prompt_suggestions /generateExample response
Status 200
Retrieve vision scanners creators
Distinct creators across the team's scanners — feeds the Created by filter dropdown.
Required API key scopes
replay_scanner:readResponse
Example request
GET /api /projects /:project_id /vision /scanners /creators