Skip to main content
POST
Preview Monitor Draft

Authorizations

gateway_session
string
cookie
required

Secure same-origin browser session cookie.

Body

application/json
name
string
required
metric
enum<string>
required
Available options:
budget_utilization,
error_count,
error_rate,
p95_latency,
success_rate,
request_count,
token_count,
spend_usd
operator
enum<string>
required
Available options:
gte,
lte
threshold
required
Required range: 0 <= x <= 1000000000
scope
enum<string>
required
Available options:
organization,
project,
team,
user,
api_key,
provider,
model,
budget
description
string | null
target_id
string | null
target_name
string | null
window_minutes
integer | null
Required range: 1 <= x <= 10080
minimum_requests
integer | null
Required range: 0 <= x <= 1000000
evaluation_interval_seconds
integer | null
Required range: 30 <= x <= 86400
cooldown_seconds
integer | null
Required range: 60 <= x <= 604800
severity
enum<string> | null
Available options:
info,
warning,
critical
enabled
boolean | null
channel_ids
string[] | null
Maximum array length: 100
history_minutes
integer
default:360

Span between the first and last sampled evaluation times. Each point reads its own preceding observation window. Budget utilization returns only its current value.

Required range: 60 <= x <= 1440

Response

Successful Response

metric
enum<string>
required
Available options:
budget_utilization,
error_count,
error_rate,
p95_latency,
success_rate,
request_count,
token_count,
spend_usd
window_minutes
integer
required
starts_at
string
required
ends_at
string
required
step_seconds
integer
required

Maximum interval between sampled points; zero for a current budget snapshot.

Required range: x >= 0
mode
enum<string>
required
Available options:
history,
current
points
MonitorPreviewPointResponse · object[]
required
Maximum array length: 24
object
string
default:monitor.preview
Allowed value: "monitor.preview"