{
  "components": {
    "schemas": {
      "AcceptedOut": {
        "description": "The answer to a request that is carried out later, by the worker.",
        "properties": {
          "status": {
            "const": "accepted",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "AcceptedOut",
        "type": "object"
      },
      "AdHocTarget": {
        "additionalProperties": false,
        "description": "Typed messages, sent the same for every item (the item's input is not used).",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "kind": {
            "const": "messages",
            "title": "Kind",
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessageIn"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Messages",
            "type": "array"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/Params"
          }
        },
        "required": [
          "kind",
          "credential_id",
          "model",
          "messages"
        ],
        "title": "AdHocTarget",
        "type": "object"
      },
      "AlertChannelKind": {
        "enum": [
          "email",
          "slack",
          "webhook",
          "pagerduty"
        ],
        "title": "AlertChannelKind",
        "type": "string"
      },
      "AlertChannelOut": {
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertChannelKind"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "org_id": {
            "format": "uuid",
            "title": "Org Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "required": [
          "id",
          "org_id",
          "kind",
          "name",
          "config",
          "has_secret",
          "verified_at",
          "created_at",
          "updated_at"
        ],
        "title": "AlertChannelOut",
        "type": "object"
      },
      "AlertChannelSecretOut": {
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertChannelKind"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "org_id": {
            "format": "uuid",
            "title": "Org Id",
            "type": "string"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "required": [
          "id",
          "org_id",
          "kind",
          "name",
          "config",
          "has_secret",
          "verified_at",
          "created_at",
          "updated_at",
          "secret"
        ],
        "title": "AlertChannelSecretOut",
        "type": "object"
      },
      "AlertEventOut": {
        "properties": {
          "acknowledged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged At"
          },
          "acknowledged_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "rule_id": {
            "format": "uuid",
            "title": "Rule Id",
            "type": "string"
          },
          "rule_kind": {
            "$ref": "#/components/schemas/AlertRuleKind"
          },
          "rule_name": {
            "title": "Rule Name",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "state": {
            "enum": [
              "firing",
              "resolved"
            ],
            "title": "State",
            "type": "string"
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "id",
          "rule_id",
          "rule_name",
          "rule_kind",
          "state",
          "value",
          "threshold",
          "started_at",
          "resolved_at",
          "acknowledged_by",
          "acknowledged_at"
        ],
        "title": "AlertEventOut",
        "type": "object"
      },
      "AlertRuleKind": {
        "enum": [
          "threshold",
          "anomaly",
          "budget"
        ],
        "title": "AlertRuleKind",
        "type": "string"
      },
      "AlertRuleOut": {
        "properties": {
          "baseline_windows": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Windows"
          },
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "comparator": {
            "$ref": "#/components/schemas/Comparator"
          },
          "cooldown_minutes": {
            "title": "Cooldown Minutes",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "filters": {
            "additionalProperties": true,
            "title": "Filters",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertRuleKind"
          },
          "metric": {
            "$ref": "#/components/schemas/Metric"
          },
          "muted_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Muted Until"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "sensitivity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sensitivity"
          },
          "state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlertRuleStateOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "window_minutes": {
            "title": "Window Minutes",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "kind",
          "metric",
          "comparator",
          "threshold",
          "window_minutes",
          "baseline_windows",
          "sensitivity",
          "filters",
          "cooldown_minutes",
          "enabled",
          "channel_ids",
          "muted_until",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "AlertRuleOut",
        "type": "object"
      },
      "AlertRuleStateOut": {
        "properties": {
          "last_evaluated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Evaluated At"
          },
          "last_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Value"
          },
          "since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Since"
          },
          "state": {
            "$ref": "#/components/schemas/RuleStateName"
          }
        },
        "required": [
          "state",
          "since",
          "last_value",
          "last_evaluated_at"
        ],
        "title": "AlertRuleStateOut",
        "type": "object"
      },
      "AlsoInOut": {
        "properties": {
          "datasets": {
            "items": {
              "$ref": "#/components/schemas/DatasetRefOut"
            },
            "title": "Datasets",
            "type": "array"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "datasets"
        ],
        "title": "AlsoInOut",
        "type": "object"
      },
      "ApiKeyCreateIn": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scopes": {
            "default": [
              "ingest:write"
            ],
            "items": {
              "$ref": "#/components/schemas/KeyScope"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyCreateIn",
        "type": "object"
      },
      "ApiKeyCreatedOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/KeyScope"
            },
            "title": "Scopes",
            "type": "array"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "created_by",
          "created_at",
          "last_used_at",
          "expires_at",
          "revoked_at",
          "secret"
        ],
        "title": "ApiKeyCreatedOut",
        "type": "object"
      },
      "ApiKeyOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/KeyScope"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "created_by",
          "created_at",
          "last_used_at",
          "expires_at",
          "revoked_at"
        ],
        "title": "ApiKeyOut",
        "type": "object"
      },
      "AttributionBucketOut": {
        "description": "The traces without the dimension (`none`) or, on the rollup path, the values folded past\nthe daily cap of 1,000 per day and environment (`other`, with how many values\n`folded_values` stands for; `None` on `none`).",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "folded_values": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folded Values"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retries"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Cost Usd"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "traces",
          "llm_calls",
          "errors",
          "unpriced_calls",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "retries",
          "retry_cost_usd",
          "folded_values"
        ],
        "title": "AttributionBucketOut",
        "type": "object"
      },
      "AttributionExportFilters": {
        "additionalProperties": false,
        "description": "The window of an attribution export (required, at most 90 days) and its environment.",
        "properties": {
          "environment": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "from": {
            "format": "date-time",
            "title": "From",
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "title": "To",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "title": "AttributionExportFilters",
        "type": "object"
      },
      "AttributionExportIn": {
        "additionalProperties": false,
        "description": "The attribution table of the window, one row per value plus the `none` and `other`\nbuckets, as CSV only. `key` is required with `group_by: metadata` and refused otherwise; a\nwindow over 24 hours reads the rollups, so its key must be promoted.",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/AttributionExportFilters"
          },
          "format": {
            "const": "csv",
            "title": "Format",
            "type": "string"
          },
          "group_by": {
            "enum": [
              "metadata",
              "trace_name",
              "user",
              "release"
            ],
            "title": "Group By",
            "type": "string"
          },
          "key": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9_.-]{1,64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "kind": {
            "const": "attribution",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "format",
          "group_by",
          "filters"
        ],
        "title": "AttributionExportIn",
        "type": "object"
      },
      "AttributionOut": {
        "description": "A page of groups, with the `none` and `other` buckets and the totals on every page.\n\n`source` is `raw` (a window of 24 hours or less, read live from the traces: exact, any\nmetadata key, no `other`) or `rollup` (a longer window, read from the daily rollup rows of\npromoted keys: exact per day, up to `updated_within_minutes` behind). `none` and `other`\nare `None` when they hold no traces.",
        "properties": {
          "group_by": {
            "enum": [
              "metadata",
              "trace_name",
              "user",
              "release"
            ],
            "title": "Group By",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AttributionRowOut"
            },
            "title": "Items",
            "type": "array"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "none": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionBucketOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "other": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionBucketOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "enum": [
              "raw",
              "rollup"
            ],
            "title": "Source",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/AttributionTotalsOut"
          },
          "updated_within_minutes": {
            "title": "Updated Within Minutes",
            "type": "integer"
          },
          "window": {
            "$ref": "#/components/schemas/AttributionWindowOut"
          }
        },
        "required": [
          "group_by",
          "key",
          "window",
          "source",
          "updated_within_minutes",
          "items",
          "next_cursor",
          "none",
          "other",
          "totals"
        ],
        "title": "AttributionOut",
        "type": "object"
      },
      "AttributionRowOut": {
        "description": "One value of the dimension. `share_of_cost` is its cost over the window's total, rounded\nto four places; `None` when either is unknown.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retries"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Cost Usd"
          },
          "share_of_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Share Of Cost"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "traces",
          "llm_calls",
          "errors",
          "unpriced_calls",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "retries",
          "retry_cost_usd",
          "value",
          "share_of_cost"
        ],
        "title": "AttributionRowOut",
        "type": "object"
      },
      "AttributionTotalsOut": {
        "description": "The figures of every trace started in the window, whatever its group (the ledger the\nrows add up to).\n\n`traces` counts the traces; `llm_calls`, `errors` (status `error`) and `unpriced_calls` (no\nprice) count their LLM calls; the token and cost sums take every span of the trace. `cost_usd`\nis a lower bound while `unpriced_calls` is above 0 and `None` when nothing was priced.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retries"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Cost Usd"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "traces",
          "llm_calls",
          "errors",
          "unpriced_calls",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "retries",
          "retry_cost_usd"
        ],
        "title": "AttributionTotalsOut",
        "type": "object"
      },
      "AttributionWindowOut": {
        "description": "The window the figures cover, in UTC: as requested on the raw path, widened to whole UTC\ndays on the rollup path (`from` floored, `to` ceiled; `to` exclusive).",
        "properties": {
          "from": {
            "format": "date-time",
            "title": "From",
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "title": "To",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "title": "AttributionWindowOut",
        "type": "object"
      },
      "AuditEventOut": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Email"
          },
          "actor_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Type"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "credential_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hash"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "outcome": {
            "enum": [
              "success",
              "failure"
            ],
            "title": "Outcome",
            "type": "string"
          },
          "prev_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prev Hash"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seq"
          },
          "target_id": {
            "title": "Target Id",
            "type": "string"
          },
          "target_type": {
            "title": "Target Type",
            "type": "string"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          }
        },
        "required": [
          "id",
          "action",
          "actor",
          "actor_type",
          "actor_email",
          "credential_id",
          "project_id",
          "target_type",
          "target_id",
          "outcome",
          "reason",
          "metadata",
          "ip",
          "user_agent",
          "request_id",
          "created_at",
          "seq",
          "prev_hash",
          "hash"
        ],
        "title": "AuditEventOut",
        "type": "object"
      },
      "AuditIntegrityOut": {
        "description": "`GET /orgs/{id}/audit/integrity`: the org's hash chain, recomputed from the stored events.",
        "properties": {
          "checked": {
            "title": "Checked",
            "type": "integer"
          },
          "first_broken_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Broken Seq"
          },
          "first_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seq"
          },
          "head_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Head Hash"
          },
          "head_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Head Seq"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "checked",
          "first_seq",
          "head_seq",
          "head_hash",
          "first_broken_seq"
        ],
        "title": "AuditIntegrityOut",
        "type": "object"
      },
      "AuditStreamIn": {
        "properties": {
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "AuditStreamIn",
        "type": "object"
      },
      "AuditStreamOut": {
        "properties": {
          "consecutive_failures": {
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_seq": {
            "title": "Delivered Seq",
            "type": "integer"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "head_seq": {
            "title": "Head Seq",
            "type": "integer"
          },
          "last_delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_error_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error At"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "enabled",
          "delivered_seq",
          "head_seq",
          "last_delivered_at",
          "last_error",
          "last_error_at",
          "consecutive_failures",
          "created_at",
          "updated_at"
        ],
        "title": "AuditStreamOut",
        "type": "object"
      },
      "AuditStreamSavedOut": {
        "properties": {
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "stream": {
            "$ref": "#/components/schemas/AuditStreamOut"
          }
        },
        "required": [
          "stream",
          "secret"
        ],
        "title": "AuditStreamSavedOut",
        "type": "object"
      },
      "AuditStreamTestOut": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "error"
        ],
        "title": "AuditStreamTestOut",
        "type": "object"
      },
      "AuthExpiredParams": {
        "additionalProperties": false,
        "description": "401 `invalid_api_key`; takes no parameters.",
        "properties": {},
        "title": "AuthExpiredParams",
        "type": "object"
      },
      "BillingRunOut": {
        "description": "One fetch from the provider, or one CSV upload. `error` is an HTTP status line or a fixed\nshort phrase, never a provider's response; `requested_by` is null for a scheduled fetch.",
        "properties": {
          "day_from": {
            "format": "date",
            "title": "Day From",
            "type": "string"
          },
          "day_to": {
            "format": "date",
            "title": "Day To",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "lines_upserted": {
            "title": "Lines Upserted",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "enum": [
              "running",
              "ok",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "trigger": {
            "enum": [
              "scheduled",
              "manual",
              "csv_upload"
            ],
            "title": "Trigger",
            "type": "string"
          }
        },
        "required": [
          "id",
          "trigger",
          "day_from",
          "day_to",
          "status",
          "error",
          "lines_upserted",
          "pages",
          "requested_by",
          "started_at",
          "finished_at"
        ],
        "title": "BillingRunOut",
        "type": "object"
      },
      "BillingSourceCreate": {
        "additionalProperties": false,
        "description": "`provider` is required for `csv_upload` and derived for the API kinds; `admin_key` is\nrequired for the API kinds and refused for `csv_upload`.",
        "properties": {
          "admin_key": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 2048,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Admin Key"
          },
          "kind": {
            "enum": [
              "anthropic_admin_api",
              "openai_costs_api",
              "csv_upload"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "project_ids": {
            "default": [],
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "title": "Project Ids",
            "type": "array"
          },
          "provider": {
            "anyOf": [
              {
                "enum": [
                  "anthropic",
                  "openai",
                  "google"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "provider_scope": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Scope"
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "title": "BillingSourceCreate",
        "type": "object"
      },
      "BillingSourceOut": {
        "description": "A billing source. Never the key: `key_set` says whether one is sealed.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Id"
          },
          "key_set": {
            "title": "Key Set",
            "type": "boolean"
          },
          "kind": {
            "enum": [
              "anthropic_admin_api",
              "openai_costs_api",
              "csv_upload"
            ],
            "title": "Kind",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_fetched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Fetched At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/SourceProjectOut"
            },
            "title": "Projects",
            "type": "array"
          },
          "provider": {
            "enum": [
              "anthropic",
              "openai",
              "google"
            ],
            "title": "Provider",
            "type": "string"
          },
          "provider_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Scope"
          },
          "status": {
            "enum": [
              "never_fetched",
              "ok",
              "failing"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "provider",
          "name",
          "provider_scope",
          "enabled",
          "status",
          "key_set",
          "key_id",
          "last_fetched_at",
          "last_success_at",
          "last_error",
          "projects",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "BillingSourceOut",
        "type": "object"
      },
      "BillingSourceRotateIn": {
        "additionalProperties": false,
        "properties": {
          "admin_key": {
            "format": "password",
            "maxLength": 2048,
            "title": "Admin Key",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "admin_key"
        ],
        "title": "BillingSourceRotateIn",
        "type": "object"
      },
      "BillingSourceUpdate": {
        "additionalProperties": false,
        "description": "A partial edit: only the fields sent change. `project_ids` replaces the whole mapping;\n`provider_scope: null` clears the filter.",
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "project_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Ids"
          },
          "provider_scope": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Scope"
          }
        },
        "title": "BillingSourceUpdate",
        "type": "object"
      },
      "Body_upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post",
        "type": "object"
      },
      "BudgetAction": {
        "description": "What an exhausted budget does: notify its channels, or also block gateway calls.",
        "enum": [
          "notify",
          "block"
        ],
        "title": "BudgetAction",
        "type": "string"
      },
      "BudgetOut": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/BudgetAction"
          },
          "amount_usd": {
            "title": "Amount Usd",
            "type": "string"
          },
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "period": {
            "$ref": "#/components/schemas/BudgetPeriod"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/BudgetScope"
          },
          "scope_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Id"
          },
          "state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetStateOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "scope",
          "scope_id",
          "period",
          "amount_usd",
          "action",
          "enabled",
          "channel_ids",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "BudgetOut",
        "type": "object"
      },
      "BudgetPatch": {
        "additionalProperties": false,
        "description": "A partial edit: the fields sent replace the budget's. Send `scope_id` with `scope`.",
        "properties": {
          "action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetAction"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,15}0*$)\\d{0,10}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Usd"
          },
          "channel_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Ids"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetPeriod"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope_id": {
            "anyOf": [
              {
                "maxLength": 400,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Id"
          }
        },
        "title": "BudgetPatch",
        "type": "object"
      },
      "BudgetPeriod": {
        "description": "The UTC calendar period a budget's spend is summed over before it starts again.",
        "enum": [
          "daily",
          "monthly"
        ],
        "title": "BudgetPeriod",
        "type": "string"
      },
      "BudgetScope": {
        "description": "Whose spend a budget caps. Every scope but `project` names one value in `scope_id`.",
        "enum": [
          "project",
          "gateway_key",
          "user",
          "model",
          "metadata",
          "trace_name"
        ],
        "title": "BudgetScope",
        "type": "string"
      },
      "BudgetSpec": {
        "additionalProperties": false,
        "description": "A whole budget: the body of a create.",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/BudgetAction"
          },
          "amount_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,15}0*$)\\d{0,10}\\.\\d{0,4}0*$)",
                "type": "string"
              }
            ],
            "title": "Amount Usd"
          },
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 10,
            "title": "Channel Ids",
            "type": "array"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "period": {
            "$ref": "#/components/schemas/BudgetPeriod"
          },
          "scope": {
            "$ref": "#/components/schemas/BudgetScope"
          },
          "scope_id": {
            "anyOf": [
              {
                "maxLength": 400,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Id"
          }
        },
        "required": [
          "name",
          "scope",
          "period",
          "amount_usd",
          "action"
        ],
        "title": "BudgetSpec",
        "type": "object"
      },
      "BudgetStateOut": {
        "description": "Where the budget stands in the current period (by the server's clock).\n\nUntil the first evaluation of a new period, the previous period's figures no longer apply:\nthe state shows the current period with `spent_usd` null and `state` `ok` (a firing alert\nfrom a past period ends on that evaluation and never blocks).",
        "properties": {
          "last_evaluated_at": {
            "format": "date-time",
            "title": "Last Evaluated At",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "title": "Period Start",
            "type": "string"
          },
          "resets_at": {
            "format": "date-time",
            "title": "Resets At",
            "type": "string"
          },
          "spent_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spent Usd"
          },
          "state": {
            "$ref": "#/components/schemas/RuleStateName"
          }
        },
        "required": [
          "spent_usd",
          "period_start",
          "resets_at",
          "state",
          "last_evaluated_at"
        ],
        "title": "BudgetStateOut",
        "type": "object"
      },
      "CategoryRateOut": {
        "description": "`count` of `reviewed` traces as a rate at 4 places, with its Wilson 95 % bounds.",
        "properties": {
          "ci_high": {
            "title": "Ci High",
            "type": "string"
          },
          "ci_low": {
            "title": "Ci Low",
            "type": "string"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "rate": {
            "title": "Rate",
            "type": "string"
          }
        },
        "required": [
          "count",
          "rate",
          "ci_low",
          "ci_high"
        ],
        "title": "CategoryRateOut",
        "type": "object"
      },
      "ChannelCreate": {
        "additionalProperties": false,
        "description": "A new channel. `config` and `secret` are validated for the `kind` sent with them.\n\nSlack and PagerDuty need `secret` (the incoming-webhook URL, the routing key); email and\nwebhook channels refuse it. An omitted `config` is the kind's default, which only Slack and\nPagerDuty have. Errors come out under `config.<field>` and `secret`.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailConfig"
              },
              {
                "$ref": "#/components/schemas/SlackConfig"
              },
              {
                "$ref": "#/components/schemas/WebhookConfig"
              },
              {
                "$ref": "#/components/schemas/PagerDutyConfig"
              }
            ],
            "title": "Config"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertChannelKind"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 4096,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "title": "ChannelCreate",
        "type": "object"
      },
      "ChannelTestOut": {
        "properties": {
          "delivery_id": {
            "format": "uuid",
            "title": "Delivery Id",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "enum": [
              "sent",
              "failed",
              "pending"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "delivery_id",
          "status",
          "error"
        ],
        "title": "ChannelTestOut",
        "type": "object"
      },
      "ChannelUpdate": {
        "additionalProperties": false,
        "description": "A partial edit: only the fields sent change. A channel's kind never changes.\n\n`config` is validated against the channel's kind (`parse_config`), so it is taken as an\nobject here. `secret` replaces a Slack URL or PagerDuty routing key; `rotate_secret`\ngenerates a new webhook signing secret, returned once.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "rotate_secret": {
            "default": false,
            "title": "Rotate Secret",
            "type": "boolean"
          },
          "secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 4096,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          }
        },
        "title": "ChannelUpdate",
        "type": "object"
      },
      "ChatMessageIn": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "maxLength": 65536,
            "title": "Content",
            "type": "string"
          },
          "role": {
            "enum": [
              "system",
              "user",
              "assistant"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "ChatMessageIn",
        "type": "object"
      },
      "ChatTemplateIn": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "chat",
            "title": "Kind",
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessageIn"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Messages",
            "type": "array"
          }
        },
        "required": [
          "kind",
          "messages"
        ],
        "title": "ChatTemplateIn",
        "type": "object"
      },
      "Comparator": {
        "enum": [
          "gt",
          "gte",
          "lt",
          "lte"
        ],
        "title": "Comparator",
        "type": "string"
      },
      "CompareItemOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "scores": {
            "additionalProperties": true,
            "title": "Scores",
            "type": "object"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id"
          }
        },
        "required": [
          "trace_id",
          "output",
          "scores",
          "latency_ms",
          "cost_usd",
          "error"
        ],
        "title": "CompareItemOut",
        "type": "object"
      },
      "Comparison": {
        "properties": {
          "a": {
            "$ref": "#/components/schemas/ReleaseStats"
          },
          "b": {
            "$ref": "#/components/schemas/ReleaseStats"
          },
          "deltas": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Delta"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Deltas",
            "type": "object"
          },
          "error_classes": {
            "items": {
              "$ref": "#/components/schemas/ErrorClassChange"
            },
            "title": "Error Classes",
            "type": "array"
          },
          "model_mix": {
            "items": {
              "$ref": "#/components/schemas/ModelShare"
            },
            "title": "Model Mix",
            "type": "array"
          },
          "new_errors": {
            "items": {
              "$ref": "#/components/schemas/NewError"
            },
            "title": "New Errors",
            "type": "array"
          }
        },
        "required": [
          "a",
          "b",
          "deltas",
          "model_mix",
          "error_classes",
          "new_errors"
        ],
        "title": "Comparison",
        "type": "object"
      },
      "ComparisonOut": {
        "properties": {
          "aggregate": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ScoreDeltaOut"
            },
            "title": "Aggregate",
            "type": "object"
          },
          "changed_items": {
            "title": "Changed Items",
            "type": "integer"
          },
          "cost_delta_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Delta Usd"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemDeltaOut"
            },
            "title": "Items",
            "type": "array"
          },
          "latency_p95_delta_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency P95 Delta Ms"
          }
        },
        "required": [
          "items",
          "aggregate",
          "cost_delta_usd",
          "latency_p95_delta_ms",
          "changed_items"
        ],
        "title": "ComparisonOut",
        "type": "object"
      },
      "CompletedScore": {
        "additionalProperties": false,
        "description": "One score a reviewer gives; exactly one of `value` and `string_value`.",
        "properties": {
          "comment": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "string_value": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "value": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name"
        ],
        "title": "CompletedScore",
        "type": "object"
      },
      "CompletenessOut": {
        "properties": {
          "completeness": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "stored / (stored + every loss), to four places rounded down; null when nothing was stored and nothing lost, `0` when only losses were counted.",
            "title": "Completeness"
          },
          "losses": {
            "items": {
              "$ref": "#/components/schemas/LossOut"
            },
            "title": "Losses",
            "type": "array"
          },
          "lower_bound": {
            "description": "Both SDK `failed` and ingest rejections were counted: a span the server rejected may be in both, so the ratio may be lower than the truth.",
            "title": "Lower Bound",
            "type": "boolean"
          },
          "stored_spans": {
            "description": "Clamped to 9007199254740991 (2^53 - 1).",
            "title": "Stored Spans",
            "type": "integer"
          }
        },
        "required": [
          "stored_spans",
          "losses",
          "completeness",
          "lower_bound"
        ],
        "title": "CompletenessOut",
        "type": "object"
      },
      "Completion": {
        "additionalProperties": false,
        "description": "The body of a complete: one score per config of the queue.",
        "properties": {
          "scores": {
            "items": {
              "$ref": "#/components/schemas/CompletedScore"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Scores",
            "type": "array"
          }
        },
        "required": [
          "scores"
        ],
        "title": "Completion",
        "type": "object"
      },
      "ContainsRule": {
        "additionalProperties": false,
        "properties": {
          "case_sensitive": {
            "default": false,
            "title": "Case Sensitive",
            "type": "boolean"
          },
          "needle": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Needle",
            "type": "string"
          },
          "rule": {
            "const": "contains",
            "title": "Rule",
            "type": "string"
          },
          "target": {
            "default": "output",
            "enum": [
              "output",
              "input"
            ],
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "rule",
          "needle"
        ],
        "title": "ContainsRule",
        "type": "object"
      },
      "CostExplanationOut": {
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/CostLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "original_usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OriginalUsageOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "output_breakdown": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputBreakdownOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostPriceOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "provider_canonical": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Canonical"
          },
          "recomputed_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recomputed Usd"
          },
          "service_tier": {
            "anyOf": [
              {
                "enum": [
                  "standard",
                  "batch",
                  "priority",
                  "flex"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "ok",
              "mismatch",
              "no_usage",
              "no_price",
              "price_version_missing",
              "override_deleted",
              "cache_hit",
              "usage_rollup"
            ],
            "title": "Status",
            "type": "string"
          },
          "stored_fee_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stored Fee Usd"
          },
          "stored_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stored Usd"
          },
          "tier_multiplier": {
            "title": "Tier Multiplier",
            "type": "string"
          },
          "tier_note": {
            "anyOf": [
              {
                "enum": [
                  "commitment_billed",
                  "unmodelled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier Note"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/CostUsageOut"
          }
        },
        "required": [
          "span_id",
          "trace_id",
          "status",
          "provider",
          "provider_canonical",
          "model",
          "service_tier",
          "tier_multiplier",
          "tier_note",
          "price",
          "usage",
          "lines",
          "output_breakdown",
          "recomputed_usd",
          "stored_usd",
          "stored_fee_usd",
          "message",
          "original_usage"
        ],
        "title": "CostExplanationOut",
        "type": "object"
      },
      "CostLineOut": {
        "properties": {
          "kind": {
            "enum": [
              "uncached_input",
              "cache_read",
              "cache_write_5m",
              "cache_write_1h",
              "output",
              "web_search"
            ],
            "title": "Kind",
            "type": "string"
          },
          "multiplier": {
            "title": "Multiplier",
            "type": "string"
          },
          "quantity": {
            "title": "Quantity",
            "type": "integer"
          },
          "rate": {
            "title": "Rate",
            "type": "string"
          },
          "rate_unit": {
            "enum": [
              "usd_per_mtok",
              "usd_per_1k_requests"
            ],
            "title": "Rate Unit",
            "type": "string"
          },
          "unit": {
            "enum": [
              "tokens",
              "requests"
            ],
            "title": "Unit",
            "type": "string"
          },
          "usd": {
            "title": "Usd",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "quantity",
          "unit",
          "rate",
          "rate_unit",
          "multiplier",
          "usd"
        ],
        "title": "CostLineOut",
        "type": "object"
      },
      "CostPriceOut": {
        "description": "The price row that produced the stored cost, found by the span's `pricing_version`.",
        "properties": {
          "effective_from": {
            "format": "date-time",
            "title": "Effective From",
            "type": "string"
          },
          "min_prompt_tokens": {
            "title": "Min Prompt Tokens",
            "type": "integer"
          },
          "model_pattern": {
            "title": "Model Pattern",
            "type": "string"
          },
          "override_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Id"
          },
          "source": {
            "enum": [
              "seed",
              "override"
            ],
            "title": "Source",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "source",
          "version",
          "model_pattern",
          "effective_from",
          "min_prompt_tokens",
          "override_id"
        ],
        "title": "CostPriceOut",
        "type": "object"
      },
      "CostUsageOut": {
        "description": "The span's usage as stored; null where it was not reported.",
        "properties": {
          "cache_write_1h_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Tokens"
          },
          "cache_write_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Tokens"
          },
          "cached_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Tokens"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "reasoning_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Tokens"
          },
          "unreported_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unreported Reason"
          },
          "web_search_requests": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search Requests"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "cached_tokens",
          "cache_write_tokens",
          "cache_write_1h_tokens",
          "web_search_requests",
          "reasoning_tokens",
          "unreported_reason"
        ],
        "title": "CostUsageOut",
        "type": "object"
      },
      "CredentialCheckOut": {
        "properties": {
          "checked_at": {
            "format": "date-time",
            "title": "Checked At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "enum": [
              "ok",
              "error"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "checked_at",
          "error"
        ],
        "title": "CredentialCheckOut",
        "type": "object"
      },
      "CredentialCreate": {
        "additionalProperties": false,
        "description": "A new provider credential. `base_url` is only for `openai_compatible`, which needs it.",
        "properties": {
          "api_key": {
            "format": "password",
            "maxLength": 2048,
            "title": "Api Key",
            "type": "string",
            "writeOnly": true
          },
          "base_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderKind"
          }
        },
        "required": [
          "name",
          "provider",
          "api_key"
        ],
        "title": "CredentialCreate",
        "type": "object"
      },
      "CredentialOut": {
        "properties": {
          "base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_checked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderKind"
          },
          "rotated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rotated At"
          }
        },
        "required": [
          "id",
          "name",
          "provider",
          "base_url",
          "created_by",
          "created_at",
          "rotated_at",
          "last_used_at",
          "last_checked_at",
          "last_error"
        ],
        "title": "CredentialOut",
        "type": "object"
      },
      "CredentialRotateIn": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "format": "password",
            "maxLength": 2048,
            "title": "Api Key",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "api_key"
        ],
        "title": "CredentialRotateIn",
        "type": "object"
      },
      "CsvUploadOut": {
        "description": "A CSV upload stored as one run: how many lines it wrote, and the UTC days they cover.",
        "properties": {
          "days": {
            "items": {
              "format": "date",
              "type": "string"
            },
            "title": "Days",
            "type": "array"
          },
          "lines_upserted": {
            "title": "Lines Upserted",
            "type": "integer"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "lines_upserted",
          "days"
        ],
        "title": "CsvUploadOut",
        "type": "object"
      },
      "DatasetItemIn": {
        "additionalProperties": false,
        "description": "One item to store. `input` is required and may be any JSON except null.",
        "properties": {
          "expected_output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "input": {
            "title": "Input"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "source_span_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Span Id"
          },
          "source_trace_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Trace Id"
          }
        },
        "required": [
          "input"
        ],
        "title": "DatasetItemIn",
        "type": "object"
      },
      "DatasetOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "locked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "item_count",
          "locked_at",
          "created_at",
          "updated_at"
        ],
        "title": "DatasetOut",
        "type": "object"
      },
      "DatasetPatch": {
        "additionalProperties": false,
        "description": "The body that edits a dataset; only the description changes. `null` clears it.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "title": "DatasetPatch",
        "type": "object"
      },
      "DatasetRefOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "DatasetRefOut",
        "type": "object"
      },
      "DatasetSpec": {
        "additionalProperties": false,
        "description": "The body that creates a dataset.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "DatasetSpec",
        "type": "object"
      },
      "DayStats": {
        "description": "One UTC day of one user. A day without traces is all zeros with a `cost_usd` of 0; a day\nwith calls but none priced has `cost_usd` `None`.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "tokens": {
            "title": "Tokens",
            "type": "integer"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "traces",
          "llm_calls",
          "errors",
          "unpriced_calls",
          "cost_usd",
          "tokens"
        ],
        "title": "DayStats",
        "type": "object"
      },
      "DeliveryOut": {
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "next_attempt_at": {
            "format": "date-time",
            "title": "Next Attempt At",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "sent",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeliverySummaryOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "attempts",
          "next_attempt_at",
          "last_error",
          "created_at",
          "summary"
        ],
        "title": "DeliveryOut",
        "type": "object"
      },
      "DeliverySummaryOut": {
        "properties": {
          "event": {
            "title": "Event",
            "type": "string"
          },
          "event_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Id"
          },
          "insight_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Insight Id"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "rule_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rule Id"
          },
          "rule_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rule Name"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "event"
        ],
        "title": "DeliverySummaryOut",
        "type": "object"
      },
      "Delta": {
        "description": "`b - a`, and that as a fraction of `a` (`None` when `a` is 0).",
        "properties": {
          "absolute": {
            "title": "Absolute",
            "type": "string"
          },
          "relative": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relative"
          }
        },
        "required": [
          "absolute",
          "relative"
        ],
        "title": "Delta",
        "type": "object"
      },
      "DetectorRunOut": {
        "description": "One run of one detector. `findings` is `None` when the run failed (`error` is set).",
        "properties": {
          "detector": {
            "title": "Detector",
            "type": "string"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "findings": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Findings"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ran_at": {
            "format": "date-time",
            "title": "Ran At",
            "type": "string"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          },
          "window_end": {
            "format": "date-time",
            "title": "Window End",
            "type": "string"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "id",
          "detector",
          "window_start",
          "window_end",
          "findings",
          "truncated",
          "duration_ms",
          "error",
          "ran_at"
        ],
        "title": "DetectorRunOut",
        "type": "object"
      },
      "EmailConfig": {
        "additionalProperties": false,
        "description": "Who gets the email: 1 to 10 addresses, stored lower-cased and without repeats.",
        "properties": {
          "to": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "maxItems": 10,
            "minItems": 1,
            "title": "To",
            "type": "array"
          }
        },
        "required": [
          "to"
        ],
        "title": "EmailConfig",
        "type": "object"
      },
      "EmailVerifyConfirmIn": {
        "properties": {
          "token": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "EmailVerifyConfirmIn",
        "type": "object"
      },
      "ErrorBucketOut": {
        "properties": {
          "approximate": {
            "description": "The bucket holds an hour read from the hourly rollup.",
            "title": "Approximate",
            "type": "boolean"
          },
          "bucket_start": {
            "format": "date-time",
            "title": "Bucket Start",
            "type": "string"
          },
          "by_class": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Failed llm calls per class; zero classes absent.",
            "title": "By Class",
            "type": "object"
          }
        },
        "required": [
          "bucket_start",
          "by_class",
          "approximate"
        ],
        "title": "ErrorBucketOut",
        "type": "object"
      },
      "ErrorClass": {
        "enum": [
          "auth",
          "rate_limit",
          "timeout",
          "context_length",
          "content_filter",
          "provider_5xx",
          "network",
          "client",
          "unknown",
          "gateway"
        ],
        "title": "ErrorClass",
        "type": "string"
      },
      "ErrorClassChange": {
        "properties": {
          "a_count": {
            "title": "A Count",
            "type": "integer"
          },
          "b_count": {
            "title": "B Count",
            "type": "integer"
          },
          "error_class": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Class"
          }
        },
        "required": [
          "error_class",
          "a_count",
          "b_count"
        ],
        "title": "ErrorClassChange",
        "type": "object"
      },
      "ErrorClassCountOut": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "error_class": {
            "title": "Error Class",
            "type": "string"
          }
        },
        "required": [
          "error_class",
          "count"
        ],
        "title": "ErrorClassCountOut",
        "type": "object"
      },
      "ErrorSampleOut": {
        "properties": {
          "attempts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gateway attempts behind the call; null elsewhere.",
            "title": "Attempts"
          },
          "error_class": {
            "title": "Error Class",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "provider_error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Error Code"
          },
          "provider_error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Error Type"
          },
          "rate_limit_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit Kind"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "retry_after_s": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry After S"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Message"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "span_id",
          "started_at",
          "model",
          "status_message",
          "error_class",
          "rate_limit_kind",
          "provider_error_type",
          "provider_error_code",
          "retry_after_s",
          "attempts",
          "request_id"
        ],
        "title": "ErrorSampleOut",
        "type": "object"
      },
      "EvalResultOut": {
        "description": "What the evaluator would score; nothing is stored. `cost_usd` is the call's real cost.",
        "properties": {
          "cost_usd": {
            "title": "Cost Usd",
            "type": "string"
          },
          "reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning"
          },
          "scores": {
            "items": {
              "$ref": "#/components/schemas/EvalScoreOut"
            },
            "title": "Scores",
            "type": "array"
          }
        },
        "required": [
          "scores",
          "cost_usd",
          "reasoning"
        ],
        "title": "EvalResultOut",
        "type": "object"
      },
      "EvalScoreOut": {
        "properties": {
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "string_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "span_id",
          "value",
          "string_value",
          "comment"
        ],
        "title": "EvalScoreOut",
        "type": "object"
      },
      "EvaluatorBudgetOut": {
        "description": "A judge's budget and its UTC calendar month so far; `reserved_usd` is held by running\ncalls.",
        "properties": {
          "monthly_budget_usd": {
            "title": "Monthly Budget Usd",
            "type": "string"
          },
          "reserved_usd": {
            "title": "Reserved Usd",
            "type": "string"
          },
          "spent_usd": {
            "title": "Spent Usd",
            "type": "string"
          }
        },
        "required": [
          "monthly_budget_usd",
          "spent_usd",
          "reserved_usd"
        ],
        "title": "EvaluatorBudgetOut",
        "type": "object"
      },
      "EvaluatorBudgetStatusOut": {
        "description": "The month so far (UTC calendar month). `remaining_usd` counts reservations as spent.",
        "properties": {
          "month_start": {
            "format": "date-time",
            "title": "Month Start",
            "type": "string"
          },
          "monthly_budget_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Budget Usd"
          },
          "remaining_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Usd"
          },
          "reserved_usd": {
            "title": "Reserved Usd",
            "type": "string"
          },
          "spent_usd": {
            "title": "Spent Usd",
            "type": "string"
          }
        },
        "required": [
          "monthly_budget_usd",
          "spent_usd",
          "reserved_usd",
          "remaining_usd",
          "month_start"
        ],
        "title": "EvaluatorBudgetStatusOut",
        "type": "object"
      },
      "EvaluatorFilters": {
        "additionalProperties": false,
        "description": "Which traces online sampling considers. Empty lists match everything.",
        "properties": {
          "environments": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Environments",
            "type": "array"
          },
          "min_duration_ms": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Duration Ms"
          },
          "models": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Models",
            "type": "array"
          },
          "tags": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Tags",
            "type": "array"
          },
          "trace_names": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Trace Names",
            "type": "array"
          }
        },
        "title": "EvaluatorFilters",
        "type": "object"
      },
      "EvaluatorOut": {
        "description": "An evaluator. `budget` is `null` for an evaluator without a monthly budget.",
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvaluatorBudgetOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "discriminator": {
              "mapping": {
                "heuristic": "#/components/schemas/HeuristicEvaluatorConfig",
                "llm_judge": "#/components/schemas/JudgeConfig",
                "webhook": "#/components/schemas/WebhookEvaluatorConfig"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/HeuristicEvaluatorConfig"
              },
              {
                "$ref": "#/components/schemas/JudgeConfig"
              },
              {
                "$ref": "#/components/schemas/WebhookEvaluatorConfig"
              }
            ],
            "title": "Config"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "filters": {
            "$ref": "#/components/schemas/EvaluatorFilters"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "monthly_budget_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Budget Usd"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sampling_rate": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Sampling Rate",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "config",
          "sampling_rate",
          "filters",
          "monthly_budget_usd",
          "enabled",
          "created_by",
          "created_at",
          "updated_at",
          "budget"
        ],
        "title": "EvaluatorOut",
        "type": "object"
      },
      "EvaluatorPatch": {
        "additionalProperties": false,
        "description": "The members to change; absent ones stay. `config` holds only the config fields to change\nand may not change `kind`; a judge's `judge_template` replaces its `prompt_version_id`.\n`monthly_budget_usd: null` clears the budget (refused for judges).",
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvaluatorFilters"
              },
              {
                "type": "null"
              }
            ]
          },
          "monthly_budget_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,13}0*$)\\d{0,8}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Budget Usd"
          },
          "name": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "sampling_rate": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,1}|(?=[\\d.]{1,6}0*$)\\d{0,1}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sampling Rate"
          }
        },
        "title": "EvaluatorPatch",
        "type": "object"
      },
      "EvaluatorRunOut": {
        "description": "One evaluation. `source` is why it ran (`online`, `test` or `experiment`); `cost_usd` is\nwhat the run is charged (zero until it settles); `reserved_usd` what a running judge call\nholds against the budget; `scores` the scores it wrote (empty until it is done).",
        "properties": {
          "cost_usd": {
            "title": "Cost Usd",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "heartbeat_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heartbeat At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "reserved_usd": {
            "title": "Reserved Usd",
            "type": "string"
          },
          "scores": {
            "items": {
              "$ref": "#/components/schemas/RunScoreOut"
            },
            "title": "Scores",
            "type": "array"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "trace_id",
          "span_id",
          "status",
          "source",
          "cost_usd",
          "reserved_usd",
          "error",
          "started_at",
          "heartbeat_at",
          "finished_at",
          "scores"
        ],
        "title": "EvaluatorRunOut",
        "type": "object"
      },
      "EvaluatorSpec": {
        "additionalProperties": false,
        "description": "A whole evaluator: the body of a create.",
        "properties": {
          "config": {
            "discriminator": {
              "mapping": {
                "heuristic": "#/components/schemas/HeuristicEvaluatorConfig",
                "llm_judge": "#/components/schemas/JudgeConfigIn",
                "webhook": "#/components/schemas/WebhookEvaluatorConfig"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/HeuristicEvaluatorConfig"
              },
              {
                "$ref": "#/components/schemas/JudgeConfigIn"
              },
              {
                "$ref": "#/components/schemas/WebhookEvaluatorConfig"
              }
            ],
            "title": "Config"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "filters": {
            "$ref": "#/components/schemas/EvaluatorFilters"
          },
          "monthly_budget_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,13}0*$)\\d{0,8}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Budget Usd"
          },
          "name": {
            "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
            "title": "Name",
            "type": "string"
          },
          "sampling_rate": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,1}|(?=[\\d.]{1,6}0*$)\\d{0,1}\\.\\d{0,4}0*$)",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Sampling Rate"
          }
        },
        "required": [
          "name",
          "config"
        ],
        "title": "EvaluatorSpec",
        "type": "object"
      },
      "EvaluatorTestIn": {
        "properties": {
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id"
        ],
        "title": "EvaluatorTestIn",
        "type": "object"
      },
      "EvidenceOut": {
        "description": "The traces and numbers behind an insight; decimals are strings, unknown values `None`.",
        "properties": {
          "metrics": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Metrics",
            "type": "object"
          },
          "trace_ids": {
            "items": {
              "type": "string"
            },
            "title": "Trace Ids",
            "type": "array"
          },
          "window": {
            "$ref": "#/components/schemas/EvidenceWindowOut"
          }
        },
        "required": [
          "trace_ids",
          "metrics",
          "window"
        ],
        "title": "EvidenceOut",
        "type": "object"
      },
      "EvidenceWindowOut": {
        "properties": {
          "end": {
            "format": "date-time",
            "title": "End",
            "type": "string"
          },
          "start": {
            "format": "date-time",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "EvidenceWindowOut",
        "type": "object"
      },
      "ExactMatchRule": {
        "additionalProperties": false,
        "properties": {
          "case_sensitive": {
            "default": true,
            "title": "Case Sensitive",
            "type": "boolean"
          },
          "normalize_whitespace": {
            "default": true,
            "title": "Normalize Whitespace",
            "type": "boolean"
          },
          "rule": {
            "const": "exact_match",
            "title": "Rule",
            "type": "string"
          }
        },
        "required": [
          "rule"
        ],
        "title": "ExactMatchRule",
        "type": "object"
      },
      "ExperimentConfig-Input": {
        "additionalProperties": false,
        "properties": {
          "max_cost_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 1000,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              }
            ],
            "default": "5",
            "title": "Max Cost Usd"
          },
          "max_items": {
            "default": 1000,
            "minimum": 1,
            "title": "Max Items",
            "type": "integer"
          },
          "target": {
            "discriminator": {
              "mapping": {
                "messages": "#/components/schemas/AdHocTarget",
                "prompt_version": "#/components/schemas/PromptVersionTarget"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/PromptVersionTarget"
              },
              {
                "$ref": "#/components/schemas/AdHocTarget"
              }
            ],
            "title": "Target"
          }
        },
        "required": [
          "target"
        ],
        "title": "ExperimentConfig",
        "type": "object"
      },
      "ExperimentConfig-Output": {
        "additionalProperties": false,
        "properties": {
          "max_cost_usd": {
            "default": "5",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
            "title": "Max Cost Usd",
            "type": "string"
          },
          "max_items": {
            "default": 1000,
            "minimum": 1,
            "title": "Max Items",
            "type": "integer"
          },
          "target": {
            "discriminator": {
              "mapping": {
                "messages": "#/components/schemas/AdHocTarget",
                "prompt_version": "#/components/schemas/PromptVersionTarget"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/PromptVersionTarget"
              },
              {
                "$ref": "#/components/schemas/AdHocTarget"
              }
            ],
            "title": "Target"
          }
        },
        "required": [
          "target"
        ],
        "title": "ExperimentConfig",
        "type": "object"
      },
      "ExperimentItemOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dataset_item_id": {
            "format": "uuid",
            "title": "Dataset Item Id",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "evaluator_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluator Error"
          },
          "expected_output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "input": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Input"
          },
          "item_metadata": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Item Metadata"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "scores": {
            "additionalProperties": true,
            "title": "Scores",
            "type": "object"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id"
          }
        },
        "required": [
          "dataset_item_id",
          "position",
          "input",
          "expected_output",
          "item_metadata",
          "trace_id",
          "output",
          "scores",
          "latency_ms",
          "cost_usd",
          "error",
          "evaluator_error",
          "created_at"
        ],
        "title": "ExperimentItemOut",
        "type": "object"
      },
      "ExperimentOut": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/ExperimentConfig-Output"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "dataset_id": {
            "format": "uuid",
            "title": "Dataset Id",
            "type": "string"
          },
          "evaluator_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Evaluator Ids",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LastRunOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "run_count": {
            "title": "Run Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "dataset_id",
          "config",
          "evaluator_ids",
          "created_by",
          "created_at",
          "run_count",
          "last_run"
        ],
        "title": "ExperimentOut",
        "type": "object"
      },
      "ExperimentRunOut": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "experiment_id": {
            "format": "uuid",
            "title": "Experiment Id",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "heartbeat_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heartbeat At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "started_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started By"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "target": {
            "discriminator": {
              "mapping": {
                "messages": "#/components/schemas/AdHocTarget",
                "prompt_version": "#/components/schemas/PromptVersionTarget"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/PromptVersionTarget"
              },
              {
                "$ref": "#/components/schemas/AdHocTarget"
              }
            ],
            "title": "Target"
          },
          "totals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TotalsOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "experiment_id",
          "number",
          "target",
          "status",
          "error",
          "started_at",
          "finished_at",
          "heartbeat_at",
          "started_by"
        ],
        "title": "ExperimentRunOut",
        "type": "object"
      },
      "ExperimentSpec": {
        "additionalProperties": false,
        "description": "The body that creates an experiment.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/ExperimentConfig-Input"
          },
          "dataset_id": {
            "format": "uuid",
            "title": "Dataset Id",
            "type": "string"
          },
          "evaluator_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 20,
            "title": "Evaluator Ids",
            "type": "array"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "dataset_id",
          "config"
        ],
        "title": "ExperimentSpec",
        "type": "object"
      },
      "ExplainedLineOut": {
        "description": "One known cause of a gap; `usd` is null when the cause has no computable amount.",
        "properties": {
          "count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Count"
          },
          "kind": {
            "enum": [
              "batch_spend",
              "server_tool_fees",
              "unpriced_spans",
              "usage_not_reported",
              "untraced_traffic",
              "priority_commitment",
              "unmodelled_modifiers",
              "beyond_retention"
            ],
            "title": "Kind",
            "type": "string"
          },
          "note": {
            "title": "Note",
            "type": "string"
          },
          "tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens"
          },
          "usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd"
          }
        },
        "required": [
          "kind",
          "usd",
          "count",
          "tokens",
          "note"
        ],
        "title": "ExplainedLineOut",
        "type": "object"
      },
      "ExplanationOut": {
        "description": "Claude's explanation of an insight: plain text, advisory, and what the call cost.\n\n`cost_usd` is the call's cost from its token usage (the reserved worst case when the answer\nreported no usage).",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "model",
          "text",
          "cost_usd",
          "created_by",
          "created_at"
        ],
        "title": "ExplanationOut",
        "type": "object"
      },
      "ExportFilters": {
        "additionalProperties": false,
        "description": "The trace-list filters. `from` and `to` are required and at most 90 days apart.",
        "properties": {
          "environment": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "error_class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorClass"
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "format": "date-time",
            "title": "From",
            "type": "string"
          },
          "metadata_key": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9_.-]{1,64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata Key"
          },
          "metadata_value": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata Value"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "q": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Q"
          },
          "release": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release"
          },
          "session_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "ok",
                  "error"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tag": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tag"
          },
          "to": {
            "format": "date-time",
            "title": "To",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "title": "ExportFilters",
        "type": "object"
      },
      "ExportFormat": {
        "enum": [
          "jsonl",
          "csv"
        ],
        "title": "ExportFormat",
        "type": "string"
      },
      "ExportKind": {
        "enum": [
          "traces",
          "attribution"
        ],
        "title": "ExportKind",
        "type": "string"
      },
      "ExportOut": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExportFilters"
              },
              {
                "$ref": "#/components/schemas/AttributionExportFilters"
              }
            ],
            "title": "Filters"
          },
          "format": {
            "$ref": "#/components/schemas/ExportFormat"
          },
          "group_by": {
            "anyOf": [
              {
                "enum": [
                  "metadata",
                  "trace_name",
                  "user",
                  "release"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group By"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "kind": {
            "$ref": "#/components/schemas/ExportKind"
          },
          "row_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Row Count"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "status": {
            "$ref": "#/components/schemas/ExportStatus"
          }
        },
        "required": [
          "id",
          "kind",
          "format",
          "filters",
          "group_by",
          "key",
          "status",
          "row_count",
          "size_bytes",
          "error_code",
          "created_at",
          "completed_at",
          "expires_at",
          "download_url"
        ],
        "title": "ExportOut",
        "type": "object"
      },
      "ExportStatus": {
        "enum": [
          "queued",
          "running",
          "done",
          "failed",
          "expired"
        ],
        "title": "ExportStatus",
        "type": "string"
      },
      "FailureCategoriesIn": {
        "additionalProperties": false,
        "description": "The categories of a new failure-category config, in the order the dashboard shows them.",
        "properties": {
          "categories": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 30,
            "minItems": 2,
            "title": "Categories",
            "type": "array"
          }
        },
        "required": [
          "categories"
        ],
        "title": "FailureCategoriesIn",
        "type": "object"
      },
      "FailureCategoriesOut": {
        "description": "`categories` is the config's list in its order; a label outside it still appears in\n`rates` after the configured ones.",
        "properties": {
          "categories": {
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "releases": {
            "items": {
              "$ref": "#/components/schemas/ReleaseRatesOut"
            },
            "title": "Releases",
            "type": "array"
          },
          "score_name": {
            "title": "Score Name",
            "type": "string"
          }
        },
        "required": [
          "score_name",
          "categories",
          "releases"
        ],
        "title": "FailureCategoriesOut",
        "type": "object"
      },
      "FallbackCondition": {
        "description": "A failure after which the gateway moves on to the route's next target.",
        "enum": [
          "status_5xx",
          "rate_limited",
          "timeout",
          "connection_error",
          "auth_error"
        ],
        "title": "FallbackCondition",
        "type": "string"
      },
      "FallbackPolicy": {
        "additionalProperties": false,
        "description": "The failures after which the gateway tries the next target. Empty means never.",
        "properties": {
          "on": {
            "items": {
              "$ref": "#/components/schemas/FallbackCondition"
            },
            "title": "On",
            "type": "array"
          }
        },
        "title": "FallbackPolicy",
        "type": "object"
      },
      "FaultProfileCreate": {
        "additionalProperties": false,
        "description": "A new fault profile. Omitted `params` are the scenario's defaults.",
        "properties": {
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "params": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthExpiredParams"
              },
              {
                "$ref": "#/components/schemas/ScopeDeniedParams"
              },
              {
                "$ref": "#/components/schemas/RateLimitedParams"
              },
              {
                "$ref": "#/components/schemas/UnsupportedParameterParams"
              },
              {
                "$ref": "#/components/schemas/Provider5xxParams"
              },
              {
                "$ref": "#/components/schemas/MalformedJsonParams"
              },
              {
                "$ref": "#/components/schemas/TruncatedStreamParams"
              },
              {
                "$ref": "#/components/schemas/SlowResponseParams"
              },
              {
                "$ref": "#/components/schemas/TimeoutParams"
              }
            ],
            "default": {},
            "title": "Params"
          },
          "probability": {
            "default": 1,
            "maximum": 1,
            "minimum": 0,
            "title": "Probability",
            "type": "number"
          },
          "scenario": {
            "$ref": "#/components/schemas/FaultScenario"
          }
        },
        "required": [
          "name",
          "scenario"
        ],
        "title": "FaultProfileCreate",
        "type": "object"
      },
      "FaultProfileOut": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "attached_key_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Attached Key Ids",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "params": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthExpiredParams"
              },
              {
                "$ref": "#/components/schemas/ScopeDeniedParams"
              },
              {
                "$ref": "#/components/schemas/RateLimitedParams"
              },
              {
                "$ref": "#/components/schemas/UnsupportedParameterParams"
              },
              {
                "$ref": "#/components/schemas/Provider5xxParams"
              },
              {
                "$ref": "#/components/schemas/MalformedJsonParams"
              },
              {
                "$ref": "#/components/schemas/TruncatedStreamParams"
              },
              {
                "$ref": "#/components/schemas/SlowResponseParams"
              },
              {
                "$ref": "#/components/schemas/TimeoutParams"
              }
            ],
            "title": "Params"
          },
          "probability": {
            "title": "Probability",
            "type": "number"
          },
          "scenario": {
            "$ref": "#/components/schemas/FaultScenario"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "scenario",
          "params",
          "probability",
          "enabled",
          "expires_at",
          "active",
          "attached_key_ids",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "FaultProfileOut",
        "type": "object"
      },
      "FaultProfileUpdate": {
        "additionalProperties": false,
        "description": "A partial edit: only the fields sent change.\n\n`params` must be sent with `scenario` (they are only meaningful together); a `scenario`\nsent without `params` resets the params to that scenario's defaults. `expires_at` is cleared\nby sending `null`; every other field must have a value when it is sent. `changes()` tells an\nabsent field from one sent as `null`.",
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "params": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthExpiredParams"
              },
              {
                "$ref": "#/components/schemas/ScopeDeniedParams"
              },
              {
                "$ref": "#/components/schemas/RateLimitedParams"
              },
              {
                "$ref": "#/components/schemas/UnsupportedParameterParams"
              },
              {
                "$ref": "#/components/schemas/Provider5xxParams"
              },
              {
                "$ref": "#/components/schemas/MalformedJsonParams"
              },
              {
                "$ref": "#/components/schemas/TruncatedStreamParams"
              },
              {
                "$ref": "#/components/schemas/SlowResponseParams"
              },
              {
                "$ref": "#/components/schemas/TimeoutParams"
              },
              {
                "type": "null"
              }
            ],
            "title": "Params"
          },
          "probability": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "scenario": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FaultScenario"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "FaultProfileUpdate",
        "type": "object"
      },
      "FaultScenario": {
        "description": "A failure the gateway can inject (the Integration Lab); each has its own params.",
        "enum": [
          "auth_expired",
          "scope_denied",
          "rate_limited",
          "unsupported_parameter",
          "provider_5xx",
          "malformed_json",
          "truncated_stream",
          "slow_response",
          "timeout"
        ],
        "title": "FaultScenario",
        "type": "string"
      },
      "FaultScenarioCountOut": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "scenario": {
            "$ref": "#/components/schemas/FaultScenario"
          }
        },
        "required": [
          "scenario",
          "count"
        ],
        "title": "FaultScenarioCountOut",
        "type": "object"
      },
      "FeedbackIn": {
        "additionalProperties": false,
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "verdict": {
            "enum": [
              "right",
              "wrong"
            ],
            "title": "Verdict",
            "type": "string"
          }
        },
        "required": [
          "verdict"
        ],
        "title": "FeedbackIn",
        "type": "object"
      },
      "FeedbackMineOut": {
        "description": "The caller's own vote. `updated_at` is when it was last given (the \"on 14 Oct\" line).",
        "properties": {
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "verdict": {
            "enum": [
              "right",
              "wrong"
            ],
            "title": "Verdict",
            "type": "string"
          }
        },
        "required": [
          "verdict",
          "note",
          "updated_at"
        ],
        "title": "FeedbackMineOut",
        "type": "object"
      },
      "FeedbackOut": {
        "description": "The caller's vote as stored. `updated_at` moves on every vote.",
        "properties": {
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "verdict": {
            "enum": [
              "right",
              "wrong"
            ],
            "title": "Verdict",
            "type": "string"
          }
        },
        "required": [
          "verdict",
          "note",
          "updated_at"
        ],
        "title": "FeedbackOut",
        "type": "object"
      },
      "FeedbackSummaryOut": {
        "description": "The caller's own vote (`null` when they have not voted) and every member's counts.",
        "properties": {
          "mine": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeedbackMineOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "right": {
            "title": "Right",
            "type": "integer"
          },
          "wrong": {
            "title": "Wrong",
            "type": "integer"
          }
        },
        "required": [
          "mine",
          "right",
          "wrong"
        ],
        "title": "FeedbackSummaryOut",
        "type": "object"
      },
      "FiltersOut": {
        "properties": {
          "environments": {
            "items": {
              "type": "string"
            },
            "title": "Environments",
            "type": "array"
          },
          "metadata_keys": {
            "items": {
              "type": "string"
            },
            "title": "Metadata Keys",
            "type": "array"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "title": "Models",
            "type": "array"
          },
          "releases": {
            "items": {
              "type": "string"
            },
            "title": "Releases",
            "type": "array"
          },
          "score_names": {
            "items": {
              "type": "string"
            },
            "title": "Score Names",
            "type": "array"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "trace_names": {
            "items": {
              "type": "string"
            },
            "title": "Trace Names",
            "type": "array"
          }
        },
        "required": [
          "environments",
          "releases",
          "models",
          "tags",
          "score_names",
          "metadata_keys",
          "trace_names"
        ],
        "title": "FiltersOut",
        "type": "object"
      },
      "GatewayCacheOut": {
        "properties": {
          "hit_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hit Rate"
          },
          "hits": {
            "title": "Hits",
            "type": "integer"
          },
          "misses": {
            "title": "Misses",
            "type": "integer"
          }
        },
        "required": [
          "hits",
          "misses",
          "hit_rate"
        ],
        "title": "GatewayCacheOut",
        "type": "object"
      },
      "GatewayKeyCreate": {
        "additionalProperties": false,
        "description": "A new gateway key. Without `route_id` it uses the project's default route.\n\nA `None` limit means no limit; a `None` `cache_ttl_seconds` leaves the cache off.",
        "properties": {
          "allowed_models": {
            "items": {
              "pattern": "^[A-Za-z0-9._:/-]{1,128}$",
              "type": "string"
            },
            "maxItems": 100,
            "title": "Allowed Models",
            "type": "array"
          },
          "cache_ttl_seconds": {
            "anyOf": [
              {
                "maximum": 86400,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Ttl Seconds"
          },
          "default_tags": {
            "items": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 20,
            "title": "Default Tags",
            "type": "array"
          },
          "environment": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Environment",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "route_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Id"
          },
          "rpm_limit": {
            "anyOf": [
              {
                "maximum": 100000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpm Limit"
          },
          "tpm_limit": {
            "anyOf": [
              {
                "maximum": 100000000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tpm Limit"
          }
        },
        "required": [
          "name",
          "environment"
        ],
        "title": "GatewayKeyCreate",
        "type": "object"
      },
      "GatewayKeyCreatedOut": {
        "properties": {
          "allowed_models": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Models",
            "type": "array"
          },
          "cache_ttl_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Ttl Seconds"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_tags": {
            "items": {
              "type": "string"
            },
            "title": "Default Tags",
            "type": "array"
          },
          "environment": {
            "title": "Environment",
            "type": "string"
          },
          "fault_profile_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fault Profile Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "route_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Id"
          },
          "rpm_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpm Limit"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          },
          "tpm_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tpm Limit"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "route_id",
          "environment",
          "rpm_limit",
          "tpm_limit",
          "allowed_models",
          "default_tags",
          "cache_ttl_seconds",
          "fault_profile_id",
          "created_by",
          "created_at",
          "last_used_at",
          "revoked_at",
          "secret"
        ],
        "title": "GatewayKeyCreatedOut",
        "type": "object"
      },
      "GatewayKeyOut": {
        "properties": {
          "allowed_models": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Models",
            "type": "array"
          },
          "cache_ttl_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Ttl Seconds"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_tags": {
            "items": {
              "type": "string"
            },
            "title": "Default Tags",
            "type": "array"
          },
          "environment": {
            "title": "Environment",
            "type": "string"
          },
          "fault_profile_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fault Profile Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "route_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Id"
          },
          "rpm_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpm Limit"
          },
          "tpm_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tpm Limit"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "route_id",
          "environment",
          "rpm_limit",
          "tpm_limit",
          "allowed_models",
          "default_tags",
          "cache_ttl_seconds",
          "fault_profile_id",
          "created_by",
          "created_at",
          "last_used_at",
          "revoked_at"
        ],
        "title": "GatewayKeyOut",
        "type": "object"
      },
      "GatewayKeyUpdate": {
        "additionalProperties": false,
        "description": "A partial edit: only the fields sent change.\n\nThe four nullable settings (`rpm_limit`, `tpm_limit`, `cache_ttl_seconds`, `fault_profile_id`)\nare cleared by sending `null`; every other field must have a value when it is sent.\n`changes()` tells an absent field from one sent as `null`.",
        "properties": {
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "pattern": "^[A-Za-z0-9._:/-]{1,128}$",
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "cache_ttl_seconds": {
            "anyOf": [
              {
                "maximum": 86400,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Ttl Seconds"
          },
          "default_tags": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 64,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Tags"
          },
          "environment": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "fault_profile_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fault Profile Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "route_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Id"
          },
          "rpm_limit": {
            "anyOf": [
              {
                "maximum": 100000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpm Limit"
          },
          "tpm_limit": {
            "anyOf": [
              {
                "maximum": 100000000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tpm Limit"
          }
        },
        "title": "GatewayKeyUpdate",
        "type": "object"
      },
      "GatewayKeyUsageOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "environment": {
            "title": "Environment",
            "type": "string"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "key_id": {
            "format": "uuid",
            "title": "Key Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          }
        },
        "required": [
          "key_id",
          "name",
          "environment",
          "requests",
          "errors",
          "cost_usd"
        ],
        "title": "GatewayKeyUsageOut",
        "type": "object"
      },
      "GatewayOverviewOut": {
        "description": "Gateway traffic of a window of at most 7 days.\n\n`errors` includes calls failed on purpose by Lab faults; `faults` says how many of the\nrequests carried one. `fallbacks` and `retries` are event counts, not request counts: the\nswitches to another target, and the repeated tries on one target, summed over all requests.\nA latency is `null` when no request measured it.",
        "properties": {
          "by_key": {
            "items": {
              "$ref": "#/components/schemas/GatewayKeyUsageOut"
            },
            "title": "By Key",
            "type": "array"
          },
          "by_target": {
            "items": {
              "$ref": "#/components/schemas/GatewayTargetUsageOut"
            },
            "title": "By Target",
            "type": "array"
          },
          "cache": {
            "$ref": "#/components/schemas/GatewayCacheOut"
          },
          "error_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Rate"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "fallbacks": {
            "title": "Fallbacks",
            "type": "integer"
          },
          "faults": {
            "items": {
              "$ref": "#/components/schemas/FaultScenarioCountOut"
            },
            "title": "Faults",
            "type": "array"
          },
          "p95_overhead_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Overhead Ms"
          },
          "p95_ttft_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ttft Ms"
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          },
          "retries": {
            "title": "Retries",
            "type": "integer"
          }
        },
        "required": [
          "requests",
          "errors",
          "error_rate",
          "cache",
          "fallbacks",
          "retries",
          "p95_overhead_ms",
          "p95_ttft_ms",
          "by_target",
          "by_key",
          "faults"
        ],
        "title": "GatewayOverviewOut",
        "type": "object"
      },
      "GatewayTargetUsageOut": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "credential_name": {
            "title": "Credential Name",
            "type": "string"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProviderKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          }
        },
        "required": [
          "credential_id",
          "credential_name",
          "provider",
          "requests",
          "errors",
          "p95_ms"
        ],
        "title": "GatewayTargetUsageOut",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HealthComponentOut": {
        "description": "One source of penalty. `observed` and `baseline` are decimal strings, `None` when unknown\n(or when the component has no baseline: findings and errors).",
        "properties": {
          "baseline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "observed": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed"
          },
          "penalty": {
            "title": "Penalty",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "penalty",
          "observed",
          "baseline"
        ],
        "title": "HealthComponentOut",
        "type": "object"
      },
      "HealthOut": {
        "description": "The health score over the window; `value` is `None` (never 0) when it had no LLM calls.\n\n`approximate` is true when a percentile behind the score was estimated from rollup histograms.",
        "properties": {
          "approximate": {
            "title": "Approximate",
            "type": "boolean"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/HealthComponentOut"
            },
            "title": "Components",
            "type": "array"
          },
          "open_critical": {
            "title": "Open Critical",
            "type": "integer"
          },
          "open_warning": {
            "title": "Open Warning",
            "type": "integer"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "window": {
            "$ref": "#/components/schemas/EvidenceWindowOut"
          }
        },
        "required": [
          "value",
          "components",
          "open_critical",
          "open_warning",
          "window",
          "approximate"
        ],
        "title": "HealthOut",
        "type": "object"
      },
      "HealthReportOut": {
        "properties": {
          "approximate": {
            "description": "Whole hours were read from the hourly rollups, as of their last run.",
            "title": "Approximate",
            "type": "boolean"
          },
          "providers": {
            "description": "Busiest first.",
            "items": {
              "$ref": "#/components/schemas/ProviderHealthOut"
            },
            "title": "Providers",
            "type": "array"
          },
          "retry_cost_note": {
            "title": "Retry Cost Note",
            "type": "string"
          },
          "window": {
            "$ref": "#/components/schemas/WindowOut"
          }
        },
        "required": [
          "window",
          "approximate",
          "providers",
          "retry_cost_note"
        ],
        "title": "HealthReportOut",
        "type": "object"
      },
      "HeuristicEvaluatorConfig": {
        "additionalProperties": false,
        "properties": {
          "check": {
            "discriminator": {
              "mapping": {
                "contains": "#/components/schemas/ContainsRule",
                "exact_match": "#/components/schemas/ExactMatchRule",
                "json_valid": "#/components/schemas/JsonValidRule",
                "length": "#/components/schemas/LengthRule",
                "levenshtein": "#/components/schemas/LevenshteinRule",
                "regex": "#/components/schemas/RegexRule"
              },
              "propertyName": "rule"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/RegexRule"
              },
              {
                "$ref": "#/components/schemas/JsonValidRule"
              },
              {
                "$ref": "#/components/schemas/LengthRule"
              },
              {
                "$ref": "#/components/schemas/ContainsRule"
              },
              {
                "$ref": "#/components/schemas/ExactMatchRule"
              },
              {
                "$ref": "#/components/schemas/LevenshteinRule"
              }
            ],
            "title": "Check"
          },
          "kind": {
            "const": "heuristic",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "check"
        ],
        "title": "HeuristicEvaluatorConfig",
        "type": "object"
      },
      "IncidentListOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IncidentOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "polling": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "title": "Polling",
            "type": "string"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/StatusSourceOut"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "required": [
          "polling",
          "sources",
          "items",
          "next_cursor"
        ],
        "title": "IncidentListOut",
        "type": "object"
      },
      "IncidentOut": {
        "properties": {
          "api_affected": {
            "title": "Api Affected",
            "type": "boolean"
          },
          "components": {
            "items": {
              "type": "string"
            },
            "title": "Components",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "impact": {
            "title": "Impact",
            "type": "string"
          },
          "latest_update": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Update"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "title",
          "impact",
          "status",
          "api_affected",
          "components",
          "started_at",
          "resolved_at",
          "url",
          "latest_update"
        ],
        "title": "IncidentOut",
        "type": "object"
      },
      "IncidentRefOut": {
        "description": "A provider status page incident that overlapped the window and touched the API.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "impact": {
            "title": "Impact",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "impact",
          "status",
          "started_at",
          "resolved_at",
          "url"
        ],
        "title": "IncidentRefOut",
        "type": "object"
      },
      "IngestResponse": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/RejectedSpan"
            },
            "title": "Rejected",
            "type": "array"
          }
        },
        "required": [
          "accepted",
          "rejected"
        ],
        "title": "IngestResponse",
        "type": "object"
      },
      "InsightDetailOut": {
        "description": "The insight, its completed explanations (newest first) and the \"Was this right?\" votes.",
        "properties": {
          "acknowledged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged At"
          },
          "certainty": {
            "title": "Certainty",
            "type": "string"
          },
          "evidence": {
            "$ref": "#/components/schemas/EvidenceOut"
          },
          "explanations": {
            "items": {
              "$ref": "#/components/schemas/ExplanationOut"
            },
            "title": "Explanations",
            "type": "array"
          },
          "failure_layer": {
            "title": "Failure Layer",
            "type": "string"
          },
          "feedback": {
            "$ref": "#/components/schemas/FeedbackSummaryOut"
          },
          "first_seen_at": {
            "format": "date-time",
            "title": "First Seen At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "mute_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mute Reason"
          },
          "muted_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Muted Until"
          },
          "occurrences": {
            "title": "Occurrences",
            "type": "integer"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "status": {
            "$ref": "#/components/schemas/InsightStatus"
          },
          "suggested_fix": {
            "title": "Suggested Fix",
            "type": "string"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "verification": {
            "title": "Verification",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "severity",
          "status",
          "title",
          "summary",
          "failure_layer",
          "certainty",
          "evidence",
          "suggested_fix",
          "verification",
          "first_seen_at",
          "last_seen_at",
          "occurrences",
          "resolved_at",
          "muted_until",
          "mute_reason",
          "acknowledged_at",
          "explanations",
          "feedback"
        ],
        "title": "InsightDetailOut",
        "type": "object"
      },
      "InsightOut": {
        "properties": {
          "acknowledged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged At"
          },
          "certainty": {
            "title": "Certainty",
            "type": "string"
          },
          "evidence": {
            "$ref": "#/components/schemas/EvidenceOut"
          },
          "failure_layer": {
            "title": "Failure Layer",
            "type": "string"
          },
          "first_seen_at": {
            "format": "date-time",
            "title": "First Seen At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "mute_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mute Reason"
          },
          "muted_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Muted Until"
          },
          "occurrences": {
            "title": "Occurrences",
            "type": "integer"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "status": {
            "$ref": "#/components/schemas/InsightStatus"
          },
          "suggested_fix": {
            "title": "Suggested Fix",
            "type": "string"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "verification": {
            "title": "Verification",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "severity",
          "status",
          "title",
          "summary",
          "failure_layer",
          "certainty",
          "evidence",
          "suggested_fix",
          "verification",
          "first_seen_at",
          "last_seen_at",
          "occurrences",
          "resolved_at",
          "muted_until",
          "mute_reason",
          "acknowledged_at"
        ],
        "title": "InsightOut",
        "type": "object"
      },
      "InsightStatus": {
        "enum": [
          "open",
          "acknowledged",
          "resolved",
          "muted"
        ],
        "title": "InsightStatus",
        "type": "string"
      },
      "InsightSummaryOut": {
        "description": "Counts of the insights that still need a person: `open` and `acknowledged` ones.",
        "properties": {
          "open_critical": {
            "title": "Open Critical",
            "type": "integer"
          },
          "open_info": {
            "title": "Open Info",
            "type": "integer"
          },
          "open_warning": {
            "title": "Open Warning",
            "type": "integer"
          }
        },
        "required": [
          "open_critical",
          "open_warning",
          "open_info"
        ],
        "title": "InsightSummaryOut",
        "type": "object"
      },
      "IntervalOut": {
        "properties": {
          "high": {
            "title": "High",
            "type": "string"
          },
          "low": {
            "title": "Low",
            "type": "string"
          }
        },
        "required": [
          "low",
          "high"
        ],
        "title": "IntervalOut",
        "type": "object"
      },
      "InviteAcceptIn": {
        "properties": {
          "token": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "InviteAcceptIn",
        "type": "object"
      },
      "InviteCreateIn": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "InviteCreateIn",
        "type": "object"
      },
      "InviteCreatedOut": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "email",
          "url",
          "expires_at"
        ],
        "title": "InviteCreatedOut",
        "type": "object"
      },
      "InviteOrgOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug"
        ],
        "title": "InviteOrgOut",
        "type": "object"
      },
      "InviteOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "id",
          "role",
          "email",
          "created_at",
          "expires_at"
        ],
        "title": "InviteOut",
        "type": "object"
      },
      "InvitePreviewOut": {
        "description": "What an invite grants, shown to the signed-in invitee before they accept.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "org": {
            "$ref": "#/components/schemas/InviteOrgOut"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "org",
          "role",
          "expires_at"
        ],
        "title": "InvitePreviewOut",
        "type": "object"
      },
      "ItemAddIn": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DatasetItemIn"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "ItemAddIn",
        "type": "object"
      },
      "ItemAddedOut": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          }
        },
        "required": [
          "accepted"
        ],
        "title": "ItemAddedOut",
        "type": "object"
      },
      "ItemDeltaOut": {
        "properties": {
          "a": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompareItemOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "b": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompareItemOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "changed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed"
          },
          "dataset_item_id": {
            "format": "uuid",
            "title": "Dataset Item Id",
            "type": "string"
          },
          "deltas": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Deltas",
            "type": "object"
          },
          "expected_output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "input": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Input"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          }
        },
        "required": [
          "dataset_item_id",
          "position",
          "input",
          "expected_output",
          "changed",
          "a",
          "b",
          "deltas"
        ],
        "title": "ItemDeltaOut",
        "type": "object"
      },
      "ItemFromTracesIn": {
        "properties": {
          "span_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "trace_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Trace Ids",
            "type": "array"
          }
        },
        "required": [
          "trace_ids"
        ],
        "title": "ItemFromTracesIn",
        "type": "object"
      },
      "ItemOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expected_output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input": {
            "title": "Input"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "source_span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Span Id"
          },
          "source_trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Trace Id"
          }
        },
        "required": [
          "id",
          "input",
          "expected_output",
          "metadata",
          "source_trace_id",
          "source_span_id",
          "created_at"
        ],
        "title": "ItemOut",
        "type": "object"
      },
      "ItemPatch": {
        "additionalProperties": false,
        "description": "The body that edits an item: the fields sent change, `null` clears `expected_output`.",
        "properties": {
          "expected_output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "title": "ItemPatch",
        "type": "object"
      },
      "ItemsAddedOut": {
        "properties": {
          "added": {
            "title": "Added",
            "type": "integer"
          },
          "skipped_duplicates": {
            "title": "Skipped Duplicates",
            "type": "integer"
          }
        },
        "required": [
          "added",
          "skipped_duplicates"
        ],
        "title": "ItemsAddedOut",
        "type": "object"
      },
      "ItemsIn": {
        "additionalProperties": false,
        "description": "Traces to queue; `span_id` queues that span of each trace instead of the whole trace.",
        "properties": {
          "span_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "trace_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Trace Ids",
            "type": "array"
          }
        },
        "required": [
          "trace_ids"
        ],
        "title": "ItemsIn",
        "type": "object"
      },
      "JsonValidRule": {
        "additionalProperties": false,
        "properties": {
          "rule": {
            "const": "json_valid",
            "title": "Rule",
            "type": "string"
          },
          "target": {
            "default": "output",
            "enum": [
              "output",
              "input"
            ],
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "rule"
        ],
        "title": "JsonValidRule",
        "type": "object"
      },
      "JudgeConfig": {
        "additionalProperties": false,
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "kind": {
            "const": "llm_judge",
            "title": "Kind",
            "type": "string"
          },
          "max_tokens": {
            "default": 1024,
            "maximum": 4096,
            "minimum": 1,
            "title": "Max Tokens",
            "type": "integer"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "prompt_version_id": {
            "format": "uuid",
            "title": "Prompt Version Id",
            "type": "string"
          },
          "temperature": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          }
        },
        "required": [
          "kind",
          "prompt_version_id",
          "credential_id",
          "model"
        ],
        "title": "JudgeConfig",
        "type": "object"
      },
      "JudgeConfigIn": {
        "additionalProperties": false,
        "description": "A judge config as a request sends it: a prompt version of the project, or one of the\nbuilt-in judge templates (`app.evals.judge_templates`), exactly one of them. The service\nturns a template into the project's prompt `judges/<name>` version 1 and stores the version\nid, so a stored judge always names a prompt version (`JudgeConfig`).",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "judge_template": {
            "anyOf": [
              {
                "enum": [
                  "relevance",
                  "faithfulness",
                  "toxicity",
                  "format_compliance"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Judge Template"
          },
          "kind": {
            "const": "llm_judge",
            "title": "Kind",
            "type": "string"
          },
          "max_tokens": {
            "default": 1024,
            "maximum": 4096,
            "minimum": 1,
            "title": "Max Tokens",
            "type": "integer"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "prompt_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version Id"
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          }
        },
        "required": [
          "kind",
          "credential_id",
          "model"
        ],
        "title": "JudgeConfigIn",
        "type": "object"
      },
      "KeyScope": {
        "enum": [
          "ingest:write",
          "traces:read",
          "scores:write",
          "prompts:read"
        ],
        "title": "KeyScope",
        "type": "string"
      },
      "KpisOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Rate"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "traces",
          "llm_calls",
          "error_rate",
          "p50_ms",
          "p95_ms",
          "cost_usd",
          "unpriced_calls",
          "input_tokens",
          "output_tokens"
        ],
        "title": "KpisOut",
        "type": "object"
      },
      "LabelOut": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "label",
          "version"
        ],
        "title": "LabelOut",
        "type": "object"
      },
      "LabelSetIn": {
        "properties": {
          "version": {
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version"
        ],
        "title": "LabelSetIn",
        "type": "object"
      },
      "LastRunOut": {
        "description": "An experiment's latest run, for its list row.",
        "properties": {
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "totals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TotalsOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "started_at",
          "finished_at",
          "totals"
        ],
        "title": "LastRunOut",
        "type": "object"
      },
      "LengthRule": {
        "additionalProperties": false,
        "properties": {
          "rule": {
            "const": "length",
            "title": "Rule",
            "type": "string"
          },
          "target": {
            "default": "output",
            "enum": [
              "output",
              "input"
            ],
            "title": "Target",
            "type": "string"
          },
          "unit": {
            "default": "chars",
            "enum": [
              "chars",
              "words"
            ],
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "rule"
        ],
        "title": "LengthRule",
        "type": "object"
      },
      "LevenshteinRule": {
        "additionalProperties": false,
        "properties": {
          "rule": {
            "const": "levenshtein",
            "title": "Rule",
            "type": "string"
          }
        },
        "required": [
          "rule"
        ],
        "title": "LevenshteinRule",
        "type": "object"
      },
      "ListedChargeOut": {
        "description": "A credit or a charge Spanlight cannot see: listed apart, never in the comparison.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "usd": {
            "title": "Usd",
            "type": "string"
          }
        },
        "required": [
          "description",
          "usd"
        ],
        "title": "ListedChargeOut",
        "type": "object"
      },
      "LoginIn": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "password": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "LoginIn",
        "type": "object"
      },
      "LoginSignedInOut": {
        "description": "The password (or the second step) was enough: the session cookies are set.",
        "properties": {
          "status": {
            "const": "signed_in",
            "title": "Status",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          }
        },
        "required": [
          "status",
          "user"
        ],
        "title": "LoginSignedInOut",
        "type": "object"
      },
      "LoginTotpRequiredOut": {
        "description": "The password was right but the account has two-factor authentication: no cookies yet.\n\nSend `challenge` with a code to `POST /auth/totp/verify` before `expires_at`.",
        "properties": {
          "challenge": {
            "title": "Challenge",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "status": {
            "const": "totp_required",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "challenge",
          "expires_at"
        ],
        "title": "LoginTotpRequiredOut",
        "type": "object"
      },
      "LossOut": {
        "properties": {
          "count": {
            "description": "Clamped to 9007199254740991 (2^53 - 1).",
            "title": "Count",
            "type": "integer"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source",
          "reason",
          "count"
        ],
        "title": "LossOut",
        "type": "object"
      },
      "MalformedJsonParams": {
        "additionalProperties": false,
        "description": "A 200 whose body is cut to `keep_fraction` of its length; non-streaming calls only.",
        "properties": {
          "keep_fraction": {
            "default": 0.6,
            "maximum": 0.9,
            "minimum": 0.1,
            "title": "Keep Fraction",
            "type": "number"
          }
        },
        "title": "MalformedJsonParams",
        "type": "object"
      },
      "MeOut": {
        "properties": {
          "email_verification_required": {
            "title": "Email Verification Required",
            "type": "boolean"
          },
          "has_password": {
            "title": "Has Password",
            "type": "boolean"
          },
          "memberships": {
            "items": {
              "$ref": "#/components/schemas/MembershipOut"
            },
            "title": "Memberships",
            "type": "array"
          },
          "totp_enabled": {
            "title": "Totp Enabled",
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          }
        },
        "required": [
          "user",
          "memberships",
          "has_password",
          "totp_enabled",
          "email_verification_required"
        ],
        "title": "MeOut",
        "type": "object"
      },
      "MemberOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          }
        },
        "required": [
          "user",
          "role",
          "created_at"
        ],
        "title": "MemberOut",
        "type": "object"
      },
      "MemberUpdateIn": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "MemberUpdateIn",
        "type": "object"
      },
      "MembershipOut": {
        "properties": {
          "org": {
            "$ref": "#/components/schemas/OrgOut"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "org",
          "role"
        ],
        "title": "MembershipOut",
        "type": "object"
      },
      "MembershipRole": {
        "enum": [
          "owner",
          "admin",
          "member",
          "viewer"
        ],
        "title": "MembershipRole",
        "type": "string"
      },
      "MessagesSource": {
        "additionalProperties": false,
        "description": "Messages typed in the playground, sent as they are.",
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessageIn"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Messages",
            "type": "array"
          }
        },
        "required": [
          "messages"
        ],
        "title": "MessagesSource",
        "type": "object"
      },
      "Metric": {
        "enum": [
          "error_rate",
          "p95_ms",
          "ttft_p95_ms",
          "cost_usd",
          "llm_calls",
          "tokens",
          "spend",
          "error_calls"
        ],
        "title": "Metric",
        "type": "string"
      },
      "ModelAdvice": {
        "additionalProperties": false,
        "description": "Free-form advice for clients on how to run the prompt; the server never uses it.",
        "properties": {
          "max_tokens": {
            "anyOf": [
              {
                "maximum": 10000000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "title": "ModelAdvice",
        "type": "object"
      },
      "ModelMetricsOut": {
        "properties": {
          "approximate": {
            "title": "Approximate",
            "type": "boolean"
          },
          "calls": {
            "title": "Calls",
            "type": "integer"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          }
        },
        "required": [
          "provider",
          "model",
          "calls",
          "errors",
          "p50_ms",
          "p95_ms",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "approximate"
        ],
        "title": "ModelMetricsOut",
        "type": "object"
      },
      "ModelShare": {
        "description": "A model's share of each release's LLM calls (`None`: that release made no calls).",
        "properties": {
          "a_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "A Share"
          },
          "b_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "B Share"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          }
        },
        "required": [
          "model",
          "a_share",
          "b_share"
        ],
        "title": "ModelShare",
        "type": "object"
      },
      "MuteIn": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "maxLength": 2000,
            "title": "Reason",
            "type": "string"
          },
          "until": {
            "format": "date-time",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "until",
          "reason"
        ],
        "title": "MuteIn",
        "type": "object"
      },
      "MuteRequest": {
        "additionalProperties": false,
        "properties": {
          "until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Until"
          }
        },
        "required": [
          "until"
        ],
        "title": "MuteRequest",
        "type": "object"
      },
      "NewError": {
        "description": "A normalised failure message that spans of `b` have and spans of `a` do not.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "example_trace_id": {
            "title": "Example Trace Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message",
          "count",
          "example_trace_id"
        ],
        "title": "NewError",
        "type": "object"
      },
      "NotificationStatus": {
        "enum": [
          "pending",
          "sent",
          "failed"
        ],
        "title": "NotificationStatus",
        "type": "string"
      },
      "OAuthIdentityOut": {
        "description": "A sign-in provider account linked to the caller.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "last_used_at": {
            "format": "date-time",
            "title": "Last Used At",
            "type": "string"
          },
          "provider": {
            "enum": [
              "github",
              "google"
            ],
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "email",
          "created_at",
          "last_used_at"
        ],
        "title": "OAuthIdentityOut",
        "type": "object"
      },
      "OAuthProviderOut": {
        "properties": {
          "provider": {
            "enum": [
              "github",
              "google"
            ],
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider"
        ],
        "title": "OAuthProviderOut",
        "type": "object"
      },
      "OnboardingOut": {
        "properties": {
          "first_trace_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Trace At"
          },
          "has_traces": {
            "title": "Has Traces",
            "type": "boolean"
          }
        },
        "required": [
          "has_traces",
          "first_trace_at"
        ],
        "title": "OnboardingOut",
        "type": "object"
      },
      "OrgCreateIn": {
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "OrgCreateIn",
        "type": "object"
      },
      "OrgDeleteIn": {
        "properties": {
          "confirm": {
            "maxLength": 200,
            "title": "Confirm",
            "type": "string"
          }
        },
        "required": [
          "confirm"
        ],
        "title": "OrgDeleteIn",
        "type": "object"
      },
      "OrgOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_demo": {
            "title": "Is Demo",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "require_2fa": {
            "title": "Require 2Fa",
            "type": "boolean"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "is_demo",
          "require_2fa"
        ],
        "title": "OrgOut",
        "type": "object"
      },
      "OrgUpdateIn": {
        "additionalProperties": false,
        "description": "A change to the organization: any of its fields, and at least one.\n\nA field that is left out is left alone; `null` is not a way to say that, so it is refused.\nStrict about unknown fields, so a client that sends one this route does not handle is told\ninstead of being answered 200 with nothing changed.",
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "require_2fa": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Require 2Fa"
          }
        },
        "title": "OrgUpdateIn",
        "type": "object"
      },
      "OrgWithRoleOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_demo": {
            "title": "Is Demo",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "require_2fa": {
            "title": "Require 2Fa",
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "is_demo",
          "require_2fa",
          "role"
        ],
        "title": "OrgWithRoleOut",
        "type": "object"
      },
      "OriginalUsageOut": {
        "description": "What the call billed when it filled the gateway cache (`spanlight.cache.original_usage`).",
        "properties": {
          "cache_write_1h_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Tokens"
          },
          "cache_write_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Tokens"
          },
          "cached_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Tokens"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "cached_tokens",
          "cache_write_tokens",
          "cache_write_1h_tokens"
        ],
        "title": "OriginalUsageOut",
        "type": "object"
      },
      "OutputBreakdownOut": {
        "description": "Reasoning tokens are part of `output_tokens`; never a line of their own.",
        "properties": {
          "other": {
            "title": "Other",
            "type": "integer"
          },
          "reasoning": {
            "title": "Reasoning",
            "type": "integer"
          }
        },
        "required": [
          "reasoning",
          "other"
        ],
        "title": "OutputBreakdownOut",
        "type": "object"
      },
      "OverviewOut": {
        "properties": {
          "approximate": {
            "title": "Approximate",
            "type": "boolean"
          },
          "current": {
            "$ref": "#/components/schemas/KpisOut"
          },
          "previous": {
            "$ref": "#/components/schemas/KpisOut"
          }
        },
        "required": [
          "current",
          "previous",
          "approximate"
        ],
        "title": "OverviewOut",
        "type": "object"
      },
      "Page_AlertEventOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AlertEventOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[AlertEventOut]",
        "type": "object"
      },
      "Page_AuditEventOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditEventOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[AuditEventOut]",
        "type": "object"
      },
      "Page_BillingRunOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BillingRunOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[BillingRunOut]",
        "type": "object"
      },
      "Page_DatasetOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DatasetOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[DatasetOut]",
        "type": "object"
      },
      "Page_DeliveryOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DeliveryOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[DeliveryOut]",
        "type": "object"
      },
      "Page_EvaluatorOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EvaluatorOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[EvaluatorOut]",
        "type": "object"
      },
      "Page_EvaluatorRunOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EvaluatorRunOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[EvaluatorRunOut]",
        "type": "object"
      },
      "Page_ExperimentItemOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExperimentItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ExperimentItemOut]",
        "type": "object"
      },
      "Page_ExperimentOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExperimentOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ExperimentOut]",
        "type": "object"
      },
      "Page_ExperimentRunOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExperimentRunOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ExperimentRunOut]",
        "type": "object"
      },
      "Page_ExportOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExportOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ExportOut]",
        "type": "object"
      },
      "Page_InsightOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InsightOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[InsightOut]",
        "type": "object"
      },
      "Page_ItemOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ItemOut]",
        "type": "object"
      },
      "Page_PromptListItemOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PromptListItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[PromptListItemOut]",
        "type": "object"
      },
      "Page_QueueItemOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/QueueItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[QueueItemOut]",
        "type": "object"
      },
      "Page_QueueOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/QueueOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[QueueOut]",
        "type": "object"
      },
      "Page_ReplaySummaryOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReplaySummaryOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[ReplaySummaryOut]",
        "type": "object"
      },
      "Page_SelectionOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SelectionOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[SelectionOut]",
        "type": "object"
      },
      "Page_SessionSummaryOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SessionSummaryOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[SessionSummaryOut]",
        "type": "object"
      },
      "Page_TraceSummaryOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TraceSummaryOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[TraceSummaryOut]",
        "type": "object"
      },
      "Page_VersionOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VersionOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "Page[VersionOut]",
        "type": "object"
      },
      "PagerDutyConfig": {
        "additionalProperties": false,
        "description": "The severity PagerDuty shows on events from this channel.",
        "properties": {
          "severity": {
            "default": "error",
            "enum": [
              "critical",
              "error",
              "warning",
              "info"
            ],
            "title": "Severity",
            "type": "string"
          }
        },
        "title": "PagerDutyConfig",
        "type": "object"
      },
      "PairedTestOut": {
        "properties": {
          "improved": {
            "title": "Improved",
            "type": "integer"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "n": {
            "title": "N",
            "type": "integer"
          },
          "p_value": {
            "title": "P Value",
            "type": "string"
          },
          "regressed": {
            "title": "Regressed",
            "type": "integer"
          },
          "significant": {
            "title": "Significant",
            "type": "boolean"
          },
          "unchanged": {
            "title": "Unchanged",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "n",
          "improved",
          "regressed",
          "unchanged",
          "p_value",
          "significant"
        ],
        "title": "PairedTestOut",
        "type": "object"
      },
      "Params": {
        "additionalProperties": false,
        "description": "Sampling parameters; an unset one is left to the provider's default.",
        "properties": {
          "max_tokens": {
            "anyOf": [
              {
                "maximum": 4096,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "title": "Params",
        "type": "object"
      },
      "PasswordForgotIn": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "PasswordForgotIn",
        "type": "object"
      },
      "PasswordResetIn": {
        "properties": {
          "password": {
            "maxLength": 256,
            "minLength": 10,
            "title": "Password",
            "type": "string"
          },
          "token": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "password"
        ],
        "title": "PasswordResetIn",
        "type": "object"
      },
      "PersonalAccessTokenCreateIn": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/TokenScope"
          }
        },
        "required": [
          "name",
          "scope"
        ],
        "title": "PersonalAccessTokenCreateIn",
        "type": "object"
      },
      "PersonalAccessTokenCreatedOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/TokenScope"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "created_at",
          "expires_at",
          "last_used_at",
          "token"
        ],
        "title": "PersonalAccessTokenCreatedOut",
        "type": "object"
      },
      "PersonalAccessTokenOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/TokenScope"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "created_at",
          "expires_at",
          "last_used_at"
        ],
        "title": "PersonalAccessTokenOut",
        "type": "object"
      },
      "PlaygroundConfig": {
        "additionalProperties": false,
        "description": "One run: a credential of the organization, a model, parameters and what to send.",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/Params"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptSource"
              },
              {
                "$ref": "#/components/schemas/MessagesSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "credential_id",
          "model",
          "source"
        ],
        "title": "PlaygroundConfig",
        "type": "object"
      },
      "PlaygroundResultOut": {
        "description": "One configuration's run, in the order of the request. `error` set means no `output`.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "output": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id"
          },
          "ttft_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ttft Ms"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "output",
          "usage",
          "cost_usd",
          "latency_ms",
          "ttft_ms",
          "trace_id",
          "span_id",
          "error"
        ],
        "title": "PlaygroundResultOut",
        "type": "object"
      },
      "PlaygroundRunIn": {
        "additionalProperties": false,
        "description": "The body of `POST /playground/runs`.",
        "properties": {
          "configs": {
            "items": {
              "$ref": "#/components/schemas/PlaygroundConfig"
            },
            "maxItems": 3,
            "minItems": 1,
            "title": "Configs",
            "type": "array"
          }
        },
        "required": [
          "configs"
        ],
        "title": "PlaygroundRunIn",
        "type": "object"
      },
      "PlaygroundRunOut": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/PlaygroundResultOut"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "title": "PlaygroundRunOut",
        "type": "object"
      },
      "PrecisionKindOut": {
        "description": "One detector kind's votes. The ratios are decimal strings to four places, `null` when the\nkind has no votes (`n` is 0).",
        "properties": {
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "meets_target": {
            "description": "precision >= 0.8, Wilson 95 % lower bound >= 0.6 and n >= 20.",
            "title": "Meets Target",
            "type": "boolean"
          },
          "n": {
            "title": "N",
            "type": "integer"
          },
          "precision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Precision"
          },
          "right": {
            "title": "Right",
            "type": "integer"
          },
          "wilson_high": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wilson High"
          },
          "wilson_low": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wilson Low"
          },
          "wrong": {
            "title": "Wrong",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "label",
          "right",
          "wrong",
          "n",
          "precision",
          "wilson_low",
          "wilson_high",
          "meets_target"
        ],
        "title": "PrecisionKindOut",
        "type": "object"
      },
      "PrecisionOut": {
        "properties": {
          "kinds": {
            "items": {
              "$ref": "#/components/schemas/PrecisionKindOut"
            },
            "title": "Kinds",
            "type": "array"
          }
        },
        "required": [
          "kinds"
        ],
        "title": "PrecisionOut",
        "type": "object"
      },
      "PriceOut": {
        "properties": {
          "cache_write_1h_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Per Mtok"
          },
          "cache_write_5m_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 5M Per Mtok"
          },
          "cached_input_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Input Per Mtok"
          },
          "effective_from": {
            "format": "date-time",
            "title": "Effective From",
            "type": "string"
          },
          "input_per_mtok": {
            "title": "Input Per Mtok",
            "type": "string"
          },
          "min_prompt_tokens": {
            "title": "Min Prompt Tokens",
            "type": "integer"
          },
          "model_pattern": {
            "title": "Model Pattern",
            "type": "string"
          },
          "output_per_mtok": {
            "title": "Output Per Mtok",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "model_pattern",
          "input_per_mtok",
          "output_per_mtok",
          "cached_input_per_mtok",
          "cache_write_5m_per_mtok",
          "cache_write_1h_per_mtok",
          "min_prompt_tokens",
          "effective_from",
          "version"
        ],
        "title": "PriceOut",
        "type": "object"
      },
      "PriceOverrideCreate": {
        "properties": {
          "cache_write_1h_per_mtok": {
            "anyOf": [
              {
                "exclusiveMaximum": 1000000,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Per Mtok"
          },
          "cache_write_5m_per_mtok": {
            "anyOf": [
              {
                "exclusiveMaximum": 1000000,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 5M Per Mtok"
          },
          "cached_input_per_mtok": {
            "anyOf": [
              {
                "exclusiveMaximum": 1000000,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Input Per Mtok"
          },
          "effective_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective From"
          },
          "input_per_mtok": {
            "anyOf": [
              {
                "exclusiveMaximum": 1000000,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)",
                "type": "string"
              }
            ],
            "title": "Input Per Mtok"
          },
          "min_prompt_tokens": {
            "default": 0,
            "minimum": 0,
            "title": "Min Prompt Tokens",
            "type": "integer"
          },
          "model_pattern": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model Pattern",
            "type": "string"
          },
          "output_per_mtok": {
            "anyOf": [
              {
                "exclusiveMaximum": 1000000,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)",
                "type": "string"
              }
            ],
            "title": "Output Per Mtok"
          },
          "provider": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "model_pattern",
          "input_per_mtok",
          "output_per_mtok"
        ],
        "title": "PriceOverrideCreate",
        "type": "object"
      },
      "PriceOverrideOut": {
        "properties": {
          "cache_write_1h_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Per Mtok"
          },
          "cache_write_5m_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 5M Per Mtok"
          },
          "cached_input_per_mtok": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Input Per Mtok"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from": {
            "format": "date-time",
            "title": "Effective From",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_per_mtok": {
            "title": "Input Per Mtok",
            "type": "string"
          },
          "min_prompt_tokens": {
            "title": "Min Prompt Tokens",
            "type": "integer"
          },
          "model_pattern": {
            "title": "Model Pattern",
            "type": "string"
          },
          "output_per_mtok": {
            "title": "Output Per Mtok",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "model_pattern",
          "input_per_mtok",
          "output_per_mtok",
          "cached_input_per_mtok",
          "cache_write_5m_per_mtok",
          "cache_write_1h_per_mtok",
          "min_prompt_tokens",
          "effective_from",
          "created_by",
          "created_at"
        ],
        "title": "PriceOverrideOut",
        "type": "object"
      },
      "ProjectCreateIn": {
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ProjectCreateIn",
        "type": "object"
      },
      "ProjectDeleteIn": {
        "properties": {
          "confirm": {
            "maxLength": 200,
            "title": "Confirm",
            "type": "string"
          }
        },
        "required": [
          "confirm"
        ],
        "title": "ProjectDeleteIn",
        "type": "object"
      },
      "ProjectOut": {
        "properties": {
          "capture_payloads": {
            "title": "Capture Payloads",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "insight_channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Insight Channel Ids",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "org_id": {
            "format": "uuid",
            "title": "Org Id",
            "type": "string"
          },
          "promoted_metadata_keys": {
            "items": {
              "type": "string"
            },
            "title": "Promoted Metadata Keys",
            "type": "array"
          },
          "retention_days": {
            "title": "Retention Days",
            "type": "integer"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "weekly_digest_enabled": {
            "title": "Weekly Digest Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "org_id",
          "name",
          "slug",
          "retention_days",
          "capture_payloads",
          "weekly_digest_enabled",
          "insight_channel_ids",
          "promoted_metadata_keys",
          "created_at"
        ],
        "title": "ProjectOut",
        "type": "object"
      },
      "ProjectUpdateIn": {
        "properties": {
          "capture_payloads": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Capture Payloads"
          },
          "insight_channel_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Insight Channel Ids"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "promoted_metadata_keys": {
            "anyOf": [
              {
                "items": {
                  "pattern": "^[a-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Promoted Metadata Keys"
          },
          "retention_days": {
            "anyOf": [
              {
                "maximum": 90,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Days"
          },
          "weekly_digest_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekly Digest Enabled"
          }
        },
        "title": "ProjectUpdateIn",
        "type": "object"
      },
      "PromptCreate": {
        "additionalProperties": false,
        "description": "The body of `POST /prompts`: the prompt and its version 1.",
        "properties": {
          "commit_message": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Message"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "enum": [
              "text",
              "chat"
            ],
            "title": "Kind",
            "type": "string"
          },
          "model_config": {
            "$ref": "#/components/schemas/ModelAdvice"
          },
          "name": {
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$",
            "title": "Name",
            "type": "string"
          },
          "template": {
            "discriminator": {
              "mapping": {
                "chat": "#/components/schemas/ChatTemplateIn",
                "text": "#/components/schemas/TextTemplateIn"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/TextTemplateIn"
              },
              {
                "$ref": "#/components/schemas/ChatTemplateIn"
              }
            ],
            "title": "Template"
          }
        },
        "required": [
          "template",
          "name",
          "kind"
        ],
        "title": "PromptCreate",
        "type": "object"
      },
      "PromptKind": {
        "enum": [
          "text",
          "chat"
        ],
        "title": "PromptKind",
        "type": "string"
      },
      "PromptListItemOut": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PromptKind"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/LabelOut"
            },
            "title": "Labels",
            "type": "array"
          },
          "latest_version": {
            "title": "Latest Version",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "kind",
          "latest_version",
          "labels",
          "updated_at"
        ],
        "title": "PromptListItemOut",
        "type": "object"
      },
      "PromptOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PromptKind"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/LabelOut"
            },
            "title": "Labels",
            "type": "array"
          },
          "latest": {
            "$ref": "#/components/schemas/VersionOut"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "kind",
          "created_at",
          "updated_at",
          "latest",
          "labels"
        ],
        "title": "PromptOut",
        "type": "object"
      },
      "PromptReadOut": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/PromptKind"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "model_config": {
            "additionalProperties": true,
            "title": "Model Config",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "template": {
            "additionalProperties": true,
            "title": "Template",
            "type": "object"
          },
          "variables": {
            "items": {
              "type": "string"
            },
            "title": "Variables",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "version_id": {
            "format": "uuid",
            "title": "Version Id",
            "type": "string"
          }
        },
        "required": [
          "name",
          "version",
          "version_id",
          "kind",
          "template",
          "variables",
          "model_config",
          "labels"
        ],
        "title": "PromptReadOut",
        "type": "object"
      },
      "PromptSource": {
        "additionalProperties": false,
        "description": "A stored prompt version with the values of its variables.",
        "properties": {
          "prompt_version_id": {
            "format": "uuid",
            "title": "Prompt Version Id",
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "maxLength": 65536,
              "type": "string"
            },
            "maxProperties": 100,
            "propertyNames": {
              "maxLength": 64
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "prompt_version_id"
        ],
        "title": "PromptSource",
        "type": "object"
      },
      "PromptVersionByIdOut": {
        "description": "The version with its prompt's name. The model advice is `model_config` on the wire and\n`advice` in code, because pydantic reserves the name.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PromptKind"
          },
          "model_config": {
            "additionalProperties": true,
            "title": "Model Config",
            "type": "object"
          },
          "prompt_name": {
            "title": "Prompt Name",
            "type": "string"
          },
          "template": {
            "additionalProperties": true,
            "title": "Template",
            "type": "object"
          },
          "variables": {
            "items": {
              "type": "string"
            },
            "title": "Variables",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "prompt_name",
          "version",
          "kind",
          "template",
          "variables",
          "model_config",
          "created_at"
        ],
        "title": "PromptVersionByIdOut",
        "type": "object"
      },
      "PromptVersionTarget": {
        "additionalProperties": false,
        "description": "A stored prompt version; each item's input fills its variables.",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "kind": {
            "const": "prompt_version",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/Params"
          },
          "prompt_version_id": {
            "format": "uuid",
            "title": "Prompt Version Id",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "prompt_version_id",
          "credential_id",
          "model"
        ],
        "title": "PromptVersionTarget",
        "type": "object"
      },
      "Provider5xxParams": {
        "additionalProperties": false,
        "description": "The provider's error at `status`.",
        "properties": {
          "status": {
            "default": 500,
            "enum": [
              500,
              502,
              503,
              529
            ],
            "title": "Status",
            "type": "integer"
          }
        },
        "title": "Provider5xxParams",
        "type": "object"
      },
      "ProviderHealthOut": {
        "properties": {
          "by_class": {
            "description": "Classes with failures, in the page's fixed order.",
            "items": {
              "$ref": "#/components/schemas/ErrorClassCountOut"
            },
            "title": "By Class",
            "type": "array"
          },
          "error_rate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`errors / llm_calls`; null without calls.",
            "title": "Error Rate"
          },
          "errors": {
            "description": "Failed llm calls, gateway lab fault injections left out.",
            "title": "Errors",
            "type": "integer"
          },
          "incidents": {
            "items": {
              "$ref": "#/components/schemas/IncidentRefOut"
            },
            "title": "Incidents",
            "type": "array"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null for llm calls whose provider is unknown.",
            "title": "Provider"
          },
          "rate_limit_kinds": {
            "items": {
              "$ref": "#/components/schemas/RateLimitKindCountOut"
            },
            "title": "Rate Limit Kinds",
            "type": "array"
          },
          "retry_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Retried calls; null when any trace's count is unknown (stored before retries were tracked).",
            "title": "Retry Calls"
          },
          "retry_cost_unknown": {
            "title": "Retry Cost Unknown",
            "type": "boolean"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when any trace's retry cost is unknown (`retry_cost_unknown`).",
            "title": "Retry Cost Usd"
          }
        },
        "required": [
          "provider",
          "llm_calls",
          "errors",
          "error_rate",
          "by_class",
          "rate_limit_kinds",
          "retry_calls",
          "retry_cost_usd",
          "retry_cost_unknown",
          "incidents"
        ],
        "title": "ProviderHealthOut",
        "type": "object"
      },
      "ProviderKind": {
        "enum": [
          "openai",
          "anthropic",
          "openai_compatible"
        ],
        "title": "ProviderKind",
        "type": "string"
      },
      "QueueItemOut": {
        "properties": {
          "assigned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At"
          },
          "assigned_to": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "completed_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed By"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "reason_detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Detail"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "trace_id",
          "span_id",
          "status",
          "reason",
          "reason_detail",
          "assigned_to",
          "assigned_at",
          "completed_by",
          "completed_at",
          "created_at"
        ],
        "title": "QueueItemOut",
        "type": "object"
      },
      "QueueItemStatus": {
        "enum": [
          "pending",
          "done",
          "skipped"
        ],
        "title": "QueueItemStatus",
        "type": "string"
      },
      "QueueOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "progress": {
            "$ref": "#/components/schemas/QueueProgressOut"
          },
          "score_config_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Score Config Ids",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "instructions",
          "score_config_ids",
          "progress",
          "created_at"
        ],
        "title": "QueueOut",
        "type": "object"
      },
      "QueueProgressOut": {
        "description": "Counts over the whole queue, then per reason; every reason is present, zeros included.",
        "properties": {
          "by_reason": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ReasonProgressOut"
            },
            "title": "By Reason",
            "type": "object"
          },
          "done": {
            "title": "Done",
            "type": "integer"
          },
          "pending": {
            "title": "Pending",
            "type": "integer"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          }
        },
        "required": [
          "pending",
          "done",
          "skipped",
          "by_reason"
        ],
        "title": "QueueProgressOut",
        "type": "object"
      },
      "QueueSpec": {
        "additionalProperties": false,
        "description": "The body of a queue create.",
        "properties": {
          "instructions": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "score_config_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Score Config Ids",
            "type": "array"
          }
        },
        "required": [
          "name",
          "score_config_ids"
        ],
        "title": "QueueSpec",
        "type": "object"
      },
      "RateLimitKind": {
        "enum": [
          "requests",
          "tokens",
          "spend_cap",
          "acceleration",
          "overloaded",
          "gateway",
          "unknown"
        ],
        "title": "RateLimitKind",
        "type": "string"
      },
      "RateLimitKindCountOut": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "with_retry_after": {
            "description": "How many of these refusals carried a `retry-after`: the provider's, or for the `gateway` kind the one the gateway's key limit told the client.",
            "title": "With Retry After",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "count",
          "with_retry_after"
        ],
        "title": "RateLimitKindCountOut",
        "type": "object"
      },
      "RateLimitedParams": {
        "additionalProperties": false,
        "description": "429 with `Retry-After: retry_after_s`.",
        "properties": {
          "retry_after_s": {
            "default": 2,
            "maximum": 3600,
            "minimum": 1,
            "title": "Retry After S",
            "type": "integer"
          }
        },
        "title": "RateLimitedParams",
        "type": "object"
      },
      "ReasonProgressOut": {
        "properties": {
          "done": {
            "title": "Done",
            "type": "integer"
          },
          "pending": {
            "title": "Pending",
            "type": "integer"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          }
        },
        "required": [
          "pending",
          "done",
          "skipped"
        ],
        "title": "ReasonProgressOut",
        "type": "object"
      },
      "ReconciliationOut": {
        "properties": {
          "days": {
            "items": {
              "$ref": "#/components/schemas/ReportDayOut"
            },
            "title": "Days",
            "type": "array"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ReportProjectOut"
            },
            "title": "Projects",
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/ReportSourceOut"
          },
          "summary": {
            "$ref": "#/components/schemas/ReportSummaryOut"
          },
          "window": {
            "$ref": "#/components/schemas/ReportWindowOut"
          }
        },
        "required": [
          "source",
          "window",
          "projects",
          "days",
          "summary"
        ],
        "title": "ReconciliationOut",
        "type": "object"
      },
      "RefreshAccepted": {
        "description": "A manual refresh was queued; `run_id` is the run it opened, listed under `/runs`.",
        "properties": {
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "RefreshAccepted",
        "type": "object"
      },
      "RefusalOut": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "code",
          "detail"
        ],
        "title": "RefusalOut",
        "type": "object"
      },
      "RegexRule": {
        "additionalProperties": false,
        "properties": {
          "ignore_case": {
            "default": false,
            "title": "Ignore Case",
            "type": "boolean"
          },
          "pattern": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Pattern",
            "type": "string"
          },
          "rule": {
            "const": "regex",
            "title": "Rule",
            "type": "string"
          },
          "target": {
            "default": "output",
            "enum": [
              "output",
              "input"
            ],
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "rule",
          "pattern"
        ],
        "title": "RegexRule",
        "type": "object"
      },
      "RejectedScoreOut": {
        "properties": {
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "index",
          "reason"
        ],
        "title": "RejectedScoreOut",
        "type": "object"
      },
      "RejectedSpan": {
        "properties": {
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          }
        },
        "required": [
          "index",
          "span_id",
          "reason"
        ],
        "title": "RejectedSpan",
        "type": "object"
      },
      "ReleaseRatesOut": {
        "description": "One release's reviewed traces (`release: None` is the traces without a release) and the\nrate of each failure category among them; `rates` is empty when nothing was reviewed.",
        "properties": {
          "rates": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CategoryRateOut"
            },
            "title": "Rates",
            "type": "object"
          },
          "release": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release"
          },
          "reviewed": {
            "title": "Reviewed",
            "type": "integer"
          }
        },
        "required": [
          "release",
          "reviewed",
          "rates"
        ],
        "title": "ReleaseRatesOut",
        "type": "object"
      },
      "ReleaseStats": {
        "description": "One release over a window. Unknown values are `None`, never 0.\n\n`cost_usd` is the sum of the priced spans: `None` only when nothing was priced, and a lower\nbound while `unpriced_calls` is above 0.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Rate"
          },
          "first_seen_at": {
            "format": "date-time",
            "title": "First Seen At",
            "type": "string"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "release": {
            "title": "Release",
            "type": "string"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "release",
          "first_seen_at",
          "last_seen_at",
          "traces",
          "llm_calls",
          "unpriced_calls",
          "error_rate",
          "p50_ms",
          "p95_ms",
          "cost_usd",
          "input_tokens",
          "output_tokens"
        ],
        "title": "ReleaseStats",
        "type": "object"
      },
      "ReplayBudgetOut": {
        "description": "The project's replay budget for the current UTC month.",
        "properties": {
          "month_start": {
            "format": "date-time",
            "title": "Month Start",
            "type": "string"
          },
          "monthly_budget_usd": {
            "title": "Monthly Budget Usd",
            "type": "string"
          },
          "remaining_usd": {
            "title": "Remaining Usd",
            "type": "string"
          },
          "reserved_usd": {
            "title": "Reserved Usd",
            "type": "string"
          },
          "spent_usd": {
            "title": "Spent Usd",
            "type": "string"
          }
        },
        "required": [
          "monthly_budget_usd",
          "spent_usd",
          "reserved_usd",
          "remaining_usd",
          "month_start"
        ],
        "title": "ReplayBudgetOut",
        "type": "object"
      },
      "ReplayIn": {
        "additionalProperties": false,
        "description": "The body of `POST /playground/replays`: which span, which credential, and what to change.\n\n`edited_body` replaces the stored request as a whole; its size (256 KB) is checked by the\nservice with the replay's other refusals (`REPLAY_BODY_TOO_LARGE`), not here.",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "edited_body": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edited Body"
          },
          "max_tokens": {
            "anyOf": [
              {
                "maximum": 4096,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "span_id": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Span Id",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "span_id",
          "credential_id"
        ],
        "title": "ReplayIn",
        "type": "object"
      },
      "ReplayOut": {
        "description": "One finished replay. `error` set means no `output`; `cost_usd`, `usage`, `latency_ms`\nand `ttft_ms` follow the playground's result.",
        "properties": {
          "changed": {
            "items": {
              "type": "string"
            },
            "title": "Changed",
            "type": "array"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "fidelity": {
            "title": "Fidelity",
            "type": "string"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "output": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "replay_id": {
            "format": "uuid",
            "title": "Replay Id",
            "type": "string"
          },
          "same_request_hash": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Same Request Hash"
          },
          "source": {
            "$ref": "#/components/schemas/ReplaySourceRefOut"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id"
          },
          "ttft_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ttft Ms"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "replay_id",
          "fidelity",
          "changed",
          "same_request_hash",
          "source",
          "output",
          "usage",
          "cost_usd",
          "latency_ms",
          "ttft_ms",
          "trace_id",
          "span_id",
          "error"
        ],
        "title": "ReplayOut",
        "type": "object"
      },
      "ReplaySourceOut": {
        "description": "What a replay of the span would send, or why it is refused (then the first four fields\nare null), and the span's last replays.",
        "properties": {
          "body": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "fidelity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fidelity"
          },
          "provider_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Kind"
          },
          "refusal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RefusalOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "replays": {
            "items": {
              "$ref": "#/components/schemas/ReplaySummaryOut"
            },
            "title": "Replays",
            "type": "array"
          },
          "surface": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface"
          }
        },
        "required": [
          "fidelity",
          "surface",
          "provider_kind",
          "body",
          "refusal",
          "replays"
        ],
        "title": "ReplaySourceOut",
        "type": "object"
      },
      "ReplaySourceRefOut": {
        "properties": {
          "output_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Text"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "span_id",
          "output_text"
        ],
        "title": "ReplaySourceRefOut",
        "type": "object"
      },
      "ReplaySummaryOut": {
        "description": "One row of the replay ledger.",
        "properties": {
          "cost_usd": {
            "title": "Cost Usd",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "fidelity": {
            "title": "Fidelity",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "replay_id": {
            "format": "uuid",
            "title": "Replay Id",
            "type": "string"
          },
          "requested_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By"
          },
          "result_span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Span Id"
          },
          "result_trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Trace Id"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "replay_id",
          "requested_by",
          "model",
          "fidelity",
          "status",
          "error",
          "cost_usd",
          "started_at",
          "finished_at",
          "result_trace_id",
          "result_span_id"
        ],
        "title": "ReplaySummaryOut",
        "type": "object"
      },
      "ReportDayOut": {
        "properties": {
          "credits": {
            "items": {
              "$ref": "#/components/schemas/ListedChargeOut"
            },
            "title": "Credits",
            "type": "array"
          },
          "credits_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Usd"
          },
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "explained_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explained Usd"
          },
          "fetched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fetched At"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ReportGroupOut"
            },
            "title": "Groups",
            "type": "array"
          },
          "incomplete": {
            "title": "Incomplete",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "other": {
            "items": {
              "$ref": "#/components/schemas/ListedChargeOut"
            },
            "title": "Other",
            "type": "array"
          },
          "other_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Usd"
          },
          "provider_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Usd"
          },
          "provisional": {
            "title": "Provisional",
            "type": "boolean"
          },
          "residual_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Residual Usd"
          },
          "spanlight_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spanlight Usd"
          },
          "unattributed_calls": {
            "title": "Unattributed Calls",
            "type": "integer"
          },
          "variance_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variance Ratio"
          }
        },
        "required": [
          "day",
          "provisional",
          "fetched_at",
          "incomplete",
          "note",
          "provider_usd",
          "spanlight_usd",
          "explained_usd",
          "residual_usd",
          "variance_ratio",
          "credits_usd",
          "other_usd",
          "unattributed_calls",
          "groups",
          "credits",
          "other"
        ],
        "title": "ReportDayOut",
        "type": "object"
      },
      "ReportGroupOut": {
        "description": "One model group of one day: the seed or override pattern, or `unmapped:<name>`.",
        "properties": {
          "explained": {
            "items": {
              "$ref": "#/components/schemas/ExplainedLineOut"
            },
            "title": "Explained",
            "type": "array"
          },
          "explained_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explained Usd"
          },
          "group": {
            "title": "Group",
            "type": "string"
          },
          "model_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Pattern"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "provider_models": {
            "items": {
              "type": "string"
            },
            "title": "Provider Models",
            "type": "array"
          },
          "provider_tokens": {
            "$ref": "#/components/schemas/ReportTokensOut"
          },
          "provider_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Usd"
          },
          "residual_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Residual Usd"
          },
          "spanlight_models": {
            "items": {
              "type": "string"
            },
            "title": "Spanlight Models",
            "type": "array"
          },
          "spanlight_tokens": {
            "$ref": "#/components/schemas/ReportTokensOut"
          },
          "spanlight_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spanlight Usd"
          },
          "variance_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variance Ratio"
          }
        },
        "required": [
          "group",
          "model_pattern",
          "provider_models",
          "spanlight_models",
          "provider_usd",
          "spanlight_usd",
          "explained_usd",
          "residual_usd",
          "variance_ratio",
          "provider_tokens",
          "spanlight_tokens",
          "explained",
          "note"
        ],
        "title": "ReportGroupOut",
        "type": "object"
      },
      "ReportProjectOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ReportProjectOut",
        "type": "object"
      },
      "ReportSourceOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "anthropic_admin_api",
              "openai_costs_api",
              "csv_upload"
            ],
            "title": "Kind",
            "type": "string"
          },
          "provider": {
            "enum": [
              "anthropic",
              "openai",
              "google"
            ],
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "kind"
        ],
        "title": "ReportSourceOut",
        "type": "object"
      },
      "ReportSummaryOut": {
        "description": "`settled_days` are the days no longer provisional; `days_within_2pct` and\n`max_abs_variance_ratio` read only settled, complete days (the ratio over groups the provider\nbilled at least $0.01).",
        "properties": {
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "days_within_2pct": {
            "title": "Days Within 2Pct",
            "type": "integer"
          },
          "max_abs_variance_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Abs Variance Ratio"
          },
          "settled_days": {
            "title": "Settled Days",
            "type": "integer"
          }
        },
        "required": [
          "days",
          "settled_days",
          "days_within_2pct",
          "max_abs_variance_ratio"
        ],
        "title": "ReportSummaryOut",
        "type": "object"
      },
      "ReportTokensOut": {
        "description": "Tokens by billing class; null when a count is unknown on that side.",
        "properties": {
          "cache_read": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read"
          },
          "cache_write_1h": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H"
          },
          "cache_write_5m": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 5M"
          },
          "output": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "uncached_input": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uncached Input"
          }
        },
        "required": [
          "uncached_input",
          "cache_read",
          "cache_write_5m",
          "cache_write_1h",
          "output"
        ],
        "title": "ReportTokensOut",
        "type": "object"
      },
      "ReportWindowOut": {
        "description": "Whole UTC days: `start` is the first day's midnight, `end` the midnight after the last.",
        "properties": {
          "end": {
            "format": "date-time",
            "title": "End",
            "type": "string"
          },
          "start": {
            "format": "date-time",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "ReportWindowOut",
        "type": "object"
      },
      "RetryPolicy": {
        "additionalProperties": false,
        "description": "How often a target is tried, the first try included, and how long to wait in between.\n\nThe wait before retry *n* is `min(backoff_ms * 2 ** (n - 1), max_backoff_ms)`, replaced by a\nprovider's `Retry-After` when `honour_retry_after` is set.",
        "properties": {
          "backoff_ms": {
            "default": 200,
            "maximum": 10000,
            "minimum": 0,
            "title": "Backoff Ms",
            "type": "integer"
          },
          "honour_retry_after": {
            "default": true,
            "title": "Honour Retry After",
            "type": "boolean"
          },
          "max_attempts": {
            "default": 2,
            "maximum": 5,
            "minimum": 1,
            "title": "Max Attempts",
            "type": "integer"
          },
          "max_backoff_ms": {
            "default": 2000,
            "maximum": 30000,
            "minimum": 0,
            "title": "Max Backoff Ms",
            "type": "integer"
          },
          "on_statuses": {
            "items": {
              "maximum": 599,
              "minimum": 400,
              "type": "integer"
            },
            "maxItems": 16,
            "title": "On Statuses",
            "type": "array"
          }
        },
        "title": "RetryPolicy",
        "type": "object"
      },
      "ReviewPolicyIn": {
        "additionalProperties": false,
        "description": "The body of `PUT /review-policy`; omitted fields take the defaults.",
        "properties": {
          "daily_cap": {
            "default": 50,
            "maximum": 500,
            "minimum": 1,
            "title": "Daily Cap",
            "type": "integer"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "environments": {
            "items": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[^\\x00]+$",
              "type": "string"
            },
            "maxItems": 20,
            "title": "Environments",
            "type": "array"
          },
          "include_cost_outliers": {
            "default": true,
            "title": "Include Cost Outliers",
            "type": "boolean"
          },
          "include_doctor_findings": {
            "default": true,
            "title": "Include Doctor Findings",
            "type": "boolean"
          },
          "include_errors": {
            "default": true,
            "title": "Include Errors",
            "type": "boolean"
          },
          "queue_id": {
            "format": "uuid",
            "title": "Queue Id",
            "type": "string"
          },
          "random_rate": {
            "anyOf": [
              {
                "maximum": 0.05,
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              }
            ],
            "default": "0.01",
            "title": "Random Rate"
          }
        },
        "required": [
          "queue_id"
        ],
        "title": "ReviewPolicyIn",
        "type": "object"
      },
      "ReviewPolicyOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "daily_cap": {
            "title": "Daily Cap",
            "type": "integer"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "environments": {
            "items": {
              "type": "string"
            },
            "title": "Environments",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "include_cost_outliers": {
            "title": "Include Cost Outliers",
            "type": "boolean"
          },
          "include_doctor_findings": {
            "title": "Include Doctor Findings",
            "type": "boolean"
          },
          "include_errors": {
            "title": "Include Errors",
            "type": "boolean"
          },
          "last_selection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SelectionOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "queue_id": {
            "format": "uuid",
            "title": "Queue Id",
            "type": "string"
          },
          "queue_name": {
            "title": "Queue Name",
            "type": "string"
          },
          "random_rate": {
            "title": "Random Rate",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "queue_id",
          "queue_name",
          "enabled",
          "random_rate",
          "include_errors",
          "include_cost_outliers",
          "include_doctor_findings",
          "daily_cap",
          "environments",
          "next_run_at",
          "last_selection",
          "created_at",
          "updated_at"
        ],
        "title": "ReviewPolicyOut",
        "type": "object"
      },
      "ReviewReason": {
        "description": "Why an item was queued: by hand, or by the review policy's nightly selection.",
        "enum": [
          "manual",
          "doctor_finding",
          "error",
          "cost_outlier",
          "random"
        ],
        "title": "ReviewReason",
        "type": "string"
      },
      "RouteConfig": {
        "additionalProperties": false,
        "description": "Which credentials serve the route's calls, in fallback order, and how failures are handled.\n\n`timeout_ms` is the whole budget for every attempt, wait and fallback of one call; for a\nstream it bounds the time to the first byte.",
        "properties": {
          "fallback": {
            "$ref": "#/components/schemas/FallbackPolicy"
          },
          "retry": {
            "$ref": "#/components/schemas/RetryPolicy"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/Target"
            },
            "maxItems": 8,
            "minItems": 1,
            "title": "Targets",
            "type": "array"
          },
          "timeout_ms": {
            "default": 60000,
            "maximum": 600000,
            "minimum": 1000,
            "title": "Timeout Ms",
            "type": "integer"
          }
        },
        "required": [
          "targets",
          "retry",
          "fallback"
        ],
        "title": "RouteConfig",
        "type": "object"
      },
      "RouteCreateIn": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "$ref": "#/components/schemas/RouteConfig"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "config"
        ],
        "title": "RouteCreateIn",
        "type": "object"
      },
      "RouteOut": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/RouteConfig"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "is_default",
          "config",
          "version",
          "updated_by",
          "updated_at"
        ],
        "title": "RouteOut",
        "type": "object"
      },
      "RouteRevertIn": {
        "additionalProperties": false,
        "properties": {
          "version": {
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version"
        ],
        "title": "RouteRevertIn",
        "type": "object"
      },
      "RouteUpdateIn": {
        "additionalProperties": false,
        "description": "A new config, and the version the client last read, which must still be the current one.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/RouteConfig"
          },
          "expected_version": {
            "minimum": 1,
            "title": "Expected Version",
            "type": "integer"
          }
        },
        "required": [
          "config",
          "expected_version"
        ],
        "title": "RouteUpdateIn",
        "type": "object"
      },
      "RouteVersionOut": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/RouteConfig"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "updated_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "config",
          "updated_by",
          "created_at"
        ],
        "title": "RouteVersionOut",
        "type": "object"
      },
      "RuleDefinition": {
        "additionalProperties": false,
        "description": "What a rule measures and when it breaches. The preview's body.",
        "properties": {
          "baseline_windows": {
            "anyOf": [
              {
                "maximum": 30,
                "minimum": 3,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Windows"
          },
          "comparator": {
            "$ref": "#/components/schemas/Comparator"
          },
          "cooldown_minutes": {
            "default": 15,
            "maximum": 1440,
            "minimum": 0,
            "title": "Cooldown Minutes",
            "type": "integer"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "filters": {
            "additionalProperties": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "propertyNames": {
              "enum": [
                "environment",
                "provider",
                "model",
                "error_class",
                "rate_limit_kind"
              ]
            },
            "title": "Filters",
            "type": "object"
          },
          "kind": {
            "enum": [
              "threshold",
              "anomaly"
            ],
            "title": "Kind",
            "type": "string"
          },
          "metric": {
            "$ref": "#/components/schemas/Metric"
          },
          "sensitivity": {
            "anyOf": [
              {
                "maximum": 5,
                "minimum": 0.5,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sensitivity"
          },
          "threshold": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,22}0*$)\\d{0,15}\\.\\d{0,6}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "window_minutes": {
            "maximum": 1440,
            "minimum": 5,
            "title": "Window Minutes",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "metric",
          "comparator",
          "window_minutes"
        ],
        "title": "RuleDefinition",
        "type": "object"
      },
      "RulePreviewOut": {
        "properties": {
          "approximate": {
            "title": "Approximate",
            "type": "boolean"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/RulePreviewPoint"
            },
            "title": "Points",
            "type": "array"
          }
        },
        "required": [
          "points",
          "approximate"
        ],
        "title": "RulePreviewOut",
        "type": "object"
      },
      "RulePreviewPoint": {
        "properties": {
          "threshold": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "window_end": {
            "format": "date-time",
            "title": "Window End",
            "type": "string"
          }
        },
        "required": [
          "window_end",
          "value",
          "threshold"
        ],
        "title": "RulePreviewPoint",
        "type": "object"
      },
      "RuleSpec": {
        "additionalProperties": false,
        "description": "A whole rule as a person writes it: the body of a create and of an edit.\n\nAn edit sends the whole rule again and replaces it; the rule's kind may change.",
        "properties": {
          "baseline_windows": {
            "anyOf": [
              {
                "maximum": 30,
                "minimum": 3,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Windows"
          },
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 10,
            "title": "Channel Ids",
            "type": "array"
          },
          "comparator": {
            "$ref": "#/components/schemas/Comparator"
          },
          "cooldown_minutes": {
            "default": 15,
            "maximum": 1440,
            "minimum": 0,
            "title": "Cooldown Minutes",
            "type": "integer"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "filters": {
            "additionalProperties": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "propertyNames": {
              "enum": [
                "environment",
                "provider",
                "model",
                "error_class",
                "rate_limit_kind"
              ]
            },
            "title": "Filters",
            "type": "object"
          },
          "kind": {
            "enum": [
              "threshold",
              "anomaly"
            ],
            "title": "Kind",
            "type": "string"
          },
          "metric": {
            "$ref": "#/components/schemas/Metric"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "sensitivity": {
            "anyOf": [
              {
                "maximum": 5,
                "minimum": 0.5,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sensitivity"
          },
          "threshold": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,22}0*$)\\d{0,15}\\.\\d{0,6}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "window_minutes": {
            "maximum": 1440,
            "minimum": 5,
            "title": "Window Minutes",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "metric",
          "comparator",
          "window_minutes",
          "name"
        ],
        "title": "RuleSpec",
        "type": "object"
      },
      "RuleStateName": {
        "enum": [
          "ok",
          "firing"
        ],
        "title": "RuleStateName",
        "type": "string"
      },
      "RunRequest": {
        "additionalProperties": false,
        "description": "The body of `POST /review-policy/runs`: the UTC day to select.",
        "properties": {
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          }
        },
        "required": [
          "day"
        ],
        "title": "RunRequest",
        "type": "object"
      },
      "RunRequestedOut": {
        "properties": {
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "job_id": {
            "title": "Job Id",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "job_id"
        ],
        "title": "RunRequestedOut",
        "type": "object"
      },
      "RunScoreOut": {
        "description": "A score a run wrote: `value` for numeric and boolean (1/0) scores, `string_value` for\ncategorical ones.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "string_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "value",
          "string_value"
        ],
        "title": "RunScoreOut",
        "type": "object"
      },
      "RunStart": {
        "additionalProperties": false,
        "description": "The optional body that starts a run.",
        "properties": {
          "target_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetOverride"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "RunStart",
        "type": "object"
      },
      "SamplesPage": {
        "properties": {
          "clamped": {
            "description": "The window was longer than 24 h and cut to its last 24 h.",
            "title": "Clamped",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ErrorSampleOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor",
          "clamped"
        ],
        "title": "SamplesPage",
        "type": "object"
      },
      "ScopeDeniedParams": {
        "additionalProperties": false,
        "description": "403 `insufficient_permissions`; takes no parameters.",
        "properties": {},
        "title": "ScopeDeniedParams",
        "type": "object"
      },
      "ScoreConfigOut": {
        "properties": {
          "categories": {
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data_type": {
            "$ref": "#/components/schemas/ScoreDataType"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "implicit": {
            "title": "Implicit",
            "type": "boolean"
          },
          "max_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Value"
          },
          "min_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Value"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "data_type",
          "min_value",
          "max_value",
          "categories",
          "description",
          "implicit",
          "created_at",
          "updated_at"
        ],
        "title": "ScoreConfigOut",
        "type": "object"
      },
      "ScoreConfigPatch": {
        "additionalProperties": false,
        "description": "A partial edit: the fields sent replace the config's. The name cannot change; the type\ncan only while no score uses the name.",
        "properties": {
          "categories": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "data_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoreDataType"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "max_value": {
            "anyOf": [
              {
                "maximum": 1000000000,
                "minimum": -1000000000,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Value"
          },
          "min_value": {
            "anyOf": [
              {
                "maximum": 1000000000,
                "minimum": -1000000000,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Value"
          }
        },
        "title": "ScoreConfigPatch",
        "type": "object"
      },
      "ScoreConfigSpec": {
        "additionalProperties": false,
        "description": "A whole score config: the body of a create.",
        "properties": {
          "categories": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 100,
            "title": "Categories",
            "type": "array"
          },
          "data_type": {
            "$ref": "#/components/schemas/ScoreDataType"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "max_value": {
            "anyOf": [
              {
                "maximum": 1000000000,
                "minimum": -1000000000,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Value"
          },
          "min_value": {
            "anyOf": [
              {
                "maximum": 1000000000,
                "minimum": -1000000000,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,4}0*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Value"
          },
          "name": {
            "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "data_type"
        ],
        "title": "ScoreConfigSpec",
        "type": "object"
      },
      "ScoreCreate": {
        "additionalProperties": false,
        "description": "A score a person adds to a trace on the dashboard. Send exactly one of `value` (a number,\nor `true`/`false`) and `string_value`. `id` makes a retry idempotent.",
        "properties": {
          "comment": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "span_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "string_value": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "value": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name"
        ],
        "title": "ScoreCreate",
        "type": "object"
      },
      "ScoreDataType": {
        "description": "What a score's value is: a number, one of a list of strings, or yes/no stored as 1/0.",
        "enum": [
          "numeric",
          "categorical",
          "boolean"
        ],
        "title": "ScoreDataType",
        "type": "string"
      },
      "ScoreDeltaOut": {
        "properties": {
          "ci_a": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntervalOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "ci_b": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntervalOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "delta": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta"
          },
          "improved": {
            "title": "Improved",
            "type": "integer"
          },
          "mean_a": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean A"
          },
          "mean_b": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean B"
          },
          "regressed": {
            "title": "Regressed",
            "type": "integer"
          },
          "test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PairedTestOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "unchanged": {
            "title": "Unchanged",
            "type": "integer"
          }
        },
        "required": [
          "mean_a",
          "mean_b",
          "delta",
          "improved",
          "regressed",
          "unchanged",
          "ci_a",
          "ci_b",
          "test"
        ],
        "title": "ScoreDeltaOut",
        "type": "object"
      },
      "ScoreIngestResponse": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/RejectedScoreOut"
            },
            "title": "Rejected",
            "type": "array"
          }
        },
        "required": [
          "accepted",
          "rejected"
        ],
        "title": "ScoreIngestResponse",
        "type": "object"
      },
      "ScoreOut": {
        "properties": {
          "author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Name"
          },
          "author_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data_type": {
            "$ref": "#/components/schemas/ScoreDataType"
          },
          "evaluator_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluator Run Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ScoreSource"
          },
          "span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Id"
          },
          "string_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "id",
          "trace_id",
          "span_id",
          "name",
          "data_type",
          "value",
          "string_value",
          "source",
          "comment",
          "author_user_id",
          "author_name",
          "evaluator_run_id",
          "created_at"
        ],
        "title": "ScoreOut",
        "type": "object"
      },
      "ScoreSource": {
        "description": "Who wrote a score: an API key, a person in the dashboard, or an evaluator.",
        "enum": [
          "api",
          "human",
          "eval"
        ],
        "title": "ScoreSource",
        "type": "string"
      },
      "ScoreStatOut": {
        "properties": {
          "categories": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "ci_high": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci High"
          },
          "ci_low": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Low"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "mean": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean"
          },
          "passed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passed"
          }
        },
        "required": [
          "mean",
          "count",
          "categories"
        ],
        "title": "ScoreStatOut",
        "type": "object"
      },
      "ScoreSummaryOut": {
        "description": "A trace's latest score of one name, as the trace list shows it.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "string_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "String Value"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "value",
          "string_value"
        ],
        "title": "ScoreSummaryOut",
        "type": "object"
      },
      "SelectionOut": {
        "properties": {
          "candidates": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Candidates",
            "type": "object"
          },
          "cap_hit": {
            "title": "Cap Hit",
            "type": "boolean"
          },
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "queue_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Id"
          },
          "queued": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Queued",
            "type": "object"
          },
          "ran_at": {
            "format": "date-time",
            "title": "Ran At",
            "type": "string"
          },
          "skipped_duplicates": {
            "title": "Skipped Duplicates",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "queue_id",
          "candidates",
          "queued",
          "skipped_duplicates",
          "cap_hit",
          "ran_at",
          "duration_ms"
        ],
        "title": "SelectionOut",
        "type": "object"
      },
      "SessionOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "current": {
            "title": "Current",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          }
        },
        "required": [
          "id",
          "created_at",
          "last_seen_at",
          "ip",
          "user_agent",
          "current"
        ],
        "title": "SessionOut",
        "type": "object"
      },
      "SessionSummaryOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "error_count": {
            "title": "Error Count",
            "type": "integer"
          },
          "first_at": {
            "format": "date-time",
            "title": "First At",
            "type": "string"
          },
          "has_unpriced": {
            "title": "Has Unpriced",
            "type": "boolean"
          },
          "last_at": {
            "format": "date-time",
            "title": "Last At",
            "type": "string"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "trace_count": {
            "title": "Trace Count",
            "type": "integer"
          }
        },
        "required": [
          "session_id",
          "trace_count",
          "first_at",
          "last_at",
          "cost_usd",
          "has_unpriced",
          "error_count"
        ],
        "title": "SessionSummaryOut",
        "type": "object"
      },
      "Severity": {
        "enum": [
          "info",
          "warning",
          "critical"
        ],
        "title": "Severity",
        "type": "string"
      },
      "SignupIn": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "password": {
            "maxLength": 256,
            "minLength": 10,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password",
          "name"
        ],
        "title": "SignupIn",
        "type": "object"
      },
      "SlackConfig": {
        "additionalProperties": false,
        "description": "Nothing to configure: the incoming-webhook URL is the channel's secret.",
        "properties": {},
        "title": "SlackConfig",
        "type": "object"
      },
      "SlowResponseParams": {
        "additionalProperties": false,
        "description": "The first byte of the response delayed by `delay_ms`.",
        "properties": {
          "delay_ms": {
            "default": 5000,
            "maximum": 60000,
            "minimum": 100,
            "title": "Delay Ms",
            "type": "integer"
          }
        },
        "title": "SlowResponseParams",
        "type": "object"
      },
      "SourceProjectOut": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug"
        ],
        "title": "SourceProjectOut",
        "type": "object"
      },
      "SpanKind": {
        "enum": [
          "llm",
          "tool",
          "retrieval",
          "chain",
          "agent",
          "http",
          "other"
        ],
        "title": "SpanKind",
        "type": "string"
      },
      "SpanOut": {
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "cache_write_1h_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Tokens"
          },
          "cache_write_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Tokens"
          },
          "cached_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Tokens"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "number"
          },
          "ended_at": {
            "format": "date-time",
            "title": "Ended At",
            "type": "string"
          },
          "error_class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorClass"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fee Usd"
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finish Reason"
          },
          "input": {
            "title": "Input"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "kind": {
            "$ref": "#/components/schemas/SpanKind"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output": {
            "title": "Output"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "parent_span_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Span Id"
          },
          "payload_omitted": {
            "default": false,
            "title": "Payload Omitted",
            "type": "boolean"
          },
          "pricing_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Version"
          },
          "prompt_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version Id"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "provider_error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Error Code"
          },
          "provider_error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Error Type"
          },
          "rate_limit_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RateLimitKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_tier": {
            "anyOf": [
              {
                "enum": [
                  "standard",
                  "batch",
                  "priority",
                  "flex"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SpanStatus"
          },
          "status_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Message"
          },
          "time_to_first_token_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time To First Token Ms"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          },
          "usage_rollup": {
            "title": "Usage Rollup",
            "type": "boolean"
          },
          "usage_state": {
            "$ref": "#/components/schemas/UsageState",
            "description": "Why the span has or lacks a cost, derived from the stored columns on every read.",
            "readOnly": true
          },
          "web_search_requests": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search Requests"
          }
        },
        "required": [
          "span_id",
          "parent_span_id",
          "kind",
          "name",
          "status",
          "status_message",
          "error_class",
          "provider_error_type",
          "provider_error_code",
          "rate_limit_kind",
          "started_at",
          "ended_at",
          "duration_ms",
          "provider",
          "model",
          "input_tokens",
          "output_tokens",
          "cached_tokens",
          "cache_write_tokens",
          "cache_write_1h_tokens",
          "service_tier",
          "web_search_requests",
          "cost_usd",
          "fee_usd",
          "pricing_version",
          "time_to_first_token_ms",
          "input",
          "output",
          "attributes",
          "truncated",
          "finish_reason",
          "prompt_version_id",
          "usage_rollup",
          "usage_state"
        ],
        "title": "SpanOut",
        "type": "object"
      },
      "SpanStatus": {
        "enum": [
          "ok",
          "error",
          "unset"
        ],
        "title": "SpanStatus",
        "type": "string"
      },
      "StatsWindow": {
        "description": "The window the figures cover: the requested one widened to whole UTC days.",
        "properties": {
          "end": {
            "format": "date-time",
            "title": "End",
            "type": "string"
          },
          "start": {
            "format": "date-time",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "StatsWindow",
        "type": "object"
      },
      "StatusSourceOut": {
        "properties": {
          "consecutive_failures": {
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "last_outcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Outcome"
          },
          "last_polled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Polled At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "last_success_at",
          "last_polled_at",
          "last_outcome",
          "consecutive_failures"
        ],
        "title": "StatusSourceOut",
        "type": "object"
      },
      "StepOut": {
        "description": "A span of trace A and its counterpart in trace B, paired by name and occurrence.",
        "properties": {
          "a": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepSpanOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "b": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepSpanOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "input_changed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Changed"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "occurrence": {
            "title": "Occurrence",
            "type": "integer"
          },
          "output_changed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Changed"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          }
        },
        "required": [
          "name",
          "occurrence",
          "a",
          "b",
          "duration_ms",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "input_changed",
          "output_changed"
        ],
        "title": "StepOut",
        "type": "object"
      },
      "StepSpanOut": {
        "description": "One side of a compared step: the span's stored values, nulls as stored.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "number"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "kind": {
            "$ref": "#/components/schemas/SpanKind"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SpanStatus"
          }
        },
        "required": [
          "span_id",
          "kind",
          "status",
          "model",
          "duration_ms",
          "input_tokens",
          "output_tokens",
          "cost_usd"
        ],
        "title": "StepSpanOut",
        "type": "object"
      },
      "Target": {
        "additionalProperties": false,
        "description": "One provider credential the route can send a call to.",
        "properties": {
          "credential_id": {
            "format": "uuid",
            "title": "Credential Id",
            "type": "string"
          },
          "model_aliases": {
            "maxProperties": 32,
            "patternProperties": {
              "^[A-Za-z0-9._:/-]{1,128}$": {
                "pattern": "^[A-Za-z0-9._:/-]{1,128}$",
                "type": "string"
              }
            },
            "title": "Model Aliases",
            "type": "object"
          },
          "weight": {
            "default": 1,
            "maximum": 100,
            "minimum": 1,
            "title": "Weight",
            "type": "integer"
          }
        },
        "required": [
          "credential_id"
        ],
        "title": "Target",
        "type": "object"
      },
      "TargetOverride": {
        "additionalProperties": false,
        "description": "Run a prompt-version experiment with another version of the same prompt; the credential\nand model stay the experiment's.",
        "properties": {
          "prompt_version_id": {
            "format": "uuid",
            "title": "Prompt Version Id",
            "type": "string"
          }
        },
        "required": [
          "prompt_version_id"
        ],
        "title": "TargetOverride",
        "type": "object"
      },
      "TextTemplateIn": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "text",
            "title": "Kind",
            "type": "string"
          },
          "text": {
            "maxLength": 65536,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "text"
        ],
        "title": "TextTemplateIn",
        "type": "object"
      },
      "TimeoutParams": {
        "additionalProperties": false,
        "description": "The call held for `hold_ms`, or what is left of the route's budget, then timed out.",
        "properties": {
          "hold_ms": {
            "default": 30000,
            "maximum": 120000,
            "minimum": 1000,
            "title": "Hold Ms",
            "type": "integer"
          }
        },
        "title": "TimeoutParams",
        "type": "object"
      },
      "TimeseriesPointOut": {
        "properties": {
          "approximate": {
            "title": "Approximate",
            "type": "boolean"
          },
          "bucket_start": {
            "format": "date-time",
            "title": "Bucket Start",
            "type": "string"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "tokens": {
            "title": "Tokens",
            "type": "integer"
          }
        },
        "required": [
          "bucket_start",
          "llm_calls",
          "errors",
          "p95_ms",
          "cost_usd",
          "tokens",
          "approximate"
        ],
        "title": "TimeseriesPointOut",
        "type": "object"
      },
      "TokenScope": {
        "enum": [
          "read",
          "write"
        ],
        "title": "TokenScope",
        "type": "string"
      },
      "TotalsOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "has_unpriced": {
            "title": "Has Unpriced",
            "type": "boolean"
          },
          "items": {
            "title": "Items",
            "type": "integer"
          },
          "latency_p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency P50 Ms"
          },
          "latency_p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency P95 Ms"
          },
          "scores": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ScoreStatOut"
            },
            "title": "Scores",
            "type": "object"
          }
        },
        "required": [
          "items",
          "errors",
          "cost_usd",
          "has_unpriced",
          "latency_p50_ms",
          "latency_p95_ms",
          "scores"
        ],
        "title": "TotalsOut",
        "type": "object"
      },
      "TotpCodeIn": {
        "properties": {
          "code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "title": "TotpCodeIn",
        "type": "object"
      },
      "TotpEnabledOut": {
        "description": "The recovery codes, in clear text this once: the server keeps only their hashes.",
        "properties": {
          "recovery_codes": {
            "items": {
              "type": "string"
            },
            "title": "Recovery Codes",
            "type": "array"
          }
        },
        "required": [
          "recovery_codes"
        ],
        "title": "TotpEnabledOut",
        "type": "object"
      },
      "TotpSetupIn": {
        "properties": {
          "password": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          }
        },
        "title": "TotpSetupIn",
        "type": "object"
      },
      "TotpSetupOut": {
        "description": "What to add to an authenticator app. Returned once; the secret is never shown again.",
        "properties": {
          "otpauth_url": {
            "title": "Otpauth Url",
            "type": "string"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "otpauth_url"
        ],
        "title": "TotpSetupOut",
        "type": "object"
      },
      "TotpStatusOut": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "enabled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled At"
          },
          "recovery_codes_remaining": {
            "title": "Recovery Codes Remaining",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "enabled_at",
          "recovery_codes_remaining"
        ],
        "title": "TotpStatusOut",
        "type": "object"
      },
      "TotpVerifyIn": {
        "properties": {
          "challenge": {
            "maxLength": 1024,
            "title": "Challenge",
            "type": "string"
          },
          "code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "challenge",
          "code"
        ],
        "title": "TotpVerifyIn",
        "type": "object"
      },
      "TraceAddedOut": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "also_in": {
            "items": {
              "$ref": "#/components/schemas/AlsoInOut"
            },
            "title": "Also In",
            "type": "array"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Item Ids",
            "type": "array"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/TraceRejectedOut"
            },
            "title": "Rejected",
            "type": "array"
          }
        },
        "required": [
          "accepted",
          "rejected",
          "item_ids",
          "also_in"
        ],
        "title": "TraceAddedOut",
        "type": "object"
      },
      "TraceCompareOut": {
        "properties": {
          "a": {
            "$ref": "#/components/schemas/TraceSummaryOut"
          },
          "b": {
            "$ref": "#/components/schemas/TraceSummaryOut"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/StepOut"
            },
            "title": "Steps",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/TraceTotalsDeltaOut"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "a",
          "b",
          "totals",
          "steps",
          "truncated"
        ],
        "title": "TraceCompareOut",
        "type": "object"
      },
      "TraceDetailOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "number"
          },
          "ended_at": {
            "format": "date-time",
            "title": "Ended At",
            "type": "string"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "error_class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorClass"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_count": {
            "title": "Error Count",
            "type": "integer"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "external_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External User Id"
          },
          "has_scores": {
            "title": "Has Scores",
            "type": "boolean"
          },
          "has_unpriced": {
            "title": "Has Unpriced",
            "type": "boolean"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Metadata",
            "type": "object"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "title": "Models",
            "type": "array"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "release": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release"
          },
          "retry_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Calls"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Cost Usd"
          },
          "scores": {
            "items": {
              "$ref": "#/components/schemas/ScoreSummaryOut"
            },
            "title": "Scores",
            "type": "array"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "span_count": {
            "title": "Span Count",
            "type": "integer"
          },
          "spans": {
            "items": {
              "$ref": "#/components/schemas/SpanOut"
            },
            "title": "Spans",
            "type": "array"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "name",
          "environment",
          "release",
          "external_user_id",
          "session_id",
          "tags",
          "metadata",
          "started_at",
          "ended_at",
          "duration_ms",
          "span_count",
          "error_count",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "has_unpriced",
          "models",
          "error_message",
          "error_class",
          "has_scores",
          "retry_calls",
          "retry_cost_usd",
          "scores",
          "spans"
        ],
        "title": "TraceDetailOut",
        "type": "object"
      },
      "TraceExportIn": {
        "additionalProperties": false,
        "description": "One row per trace matching `filters`, as CSV or JSONL.",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/ExportFilters"
          },
          "format": {
            "$ref": "#/components/schemas/ExportFormat"
          },
          "kind": {
            "const": "traces",
            "default": "traces",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "format",
          "filters"
        ],
        "title": "TraceExportIn",
        "type": "object"
      },
      "TraceRejectedOut": {
        "properties": {
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "reason"
        ],
        "title": "TraceRejectedOut",
        "type": "object"
      },
      "TraceSummaryOut": {
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "number"
          },
          "ended_at": {
            "format": "date-time",
            "title": "Ended At",
            "type": "string"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "error_class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorClass"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_count": {
            "title": "Error Count",
            "type": "integer"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "external_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External User Id"
          },
          "has_scores": {
            "title": "Has Scores",
            "type": "boolean"
          },
          "has_unpriced": {
            "title": "Has Unpriced",
            "type": "boolean"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Metadata",
            "type": "object"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "title": "Models",
            "type": "array"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "release": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release"
          },
          "retry_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Calls"
          },
          "retry_cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Cost Usd"
          },
          "scores": {
            "items": {
              "$ref": "#/components/schemas/ScoreSummaryOut"
            },
            "title": "Scores",
            "type": "array"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "span_count": {
            "title": "Span Count",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "name",
          "environment",
          "release",
          "external_user_id",
          "session_id",
          "tags",
          "metadata",
          "started_at",
          "ended_at",
          "duration_ms",
          "span_count",
          "error_count",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "has_unpriced",
          "models",
          "error_message",
          "error_class",
          "has_scores",
          "retry_calls",
          "retry_cost_usd",
          "scores"
        ],
        "title": "TraceSummaryOut",
        "type": "object"
      },
      "TraceTotalsDeltaOut": {
        "description": "Trace B minus trace A.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "number"
          },
          "error_count": {
            "title": "Error Count",
            "type": "integer"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "span_count": {
            "title": "Span Count",
            "type": "integer"
          }
        },
        "required": [
          "duration_ms",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "span_count",
          "error_count"
        ],
        "title": "TraceTotalsDeltaOut",
        "type": "object"
      },
      "TruncatedStreamParams": {
        "additionalProperties": false,
        "description": "A stream closed after `after_chunks` frames, without its end marker.",
        "properties": {
          "after_chunks": {
            "default": 3,
            "maximum": 100,
            "minimum": 1,
            "title": "After Chunks",
            "type": "integer"
          }
        },
        "title": "TruncatedStreamParams",
        "type": "object"
      },
      "UnpricedModelOut": {
        "properties": {
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          }
        },
        "required": [
          "provider",
          "model",
          "llm_calls",
          "input_tokens",
          "output_tokens"
        ],
        "title": "UnpricedModelOut",
        "type": "object"
      },
      "UnsupportedParameterParams": {
        "additionalProperties": false,
        "description": "400 naming `param` as unsupported by the model.",
        "properties": {
          "param": {
            "default": "temperature",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-z_][a-z0-9_.]*$",
            "title": "Param",
            "type": "string"
          }
        },
        "title": "UnsupportedParameterParams",
        "type": "object"
      },
      "UploadOut": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/UploadRejectedOut"
            },
            "title": "Rejected",
            "type": "array"
          }
        },
        "required": [
          "accepted",
          "rejected"
        ],
        "title": "UploadOut",
        "type": "object"
      },
      "UploadRejectedOut": {
        "properties": {
          "line": {
            "title": "Line",
            "type": "integer"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "line",
          "reason"
        ],
        "title": "UploadRejectedOut",
        "type": "object"
      },
      "UsageOut": {
        "properties": {
          "cache_write_1h_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Tokens"
          },
          "cache_write_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Tokens"
          },
          "cached_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Tokens"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "cached_tokens",
          "cache_write_tokens",
          "cache_write_1h_tokens"
        ],
        "title": "UsageOut",
        "type": "object"
      },
      "UsageState": {
        "enum": [
          "priced",
          "rollup",
          "usage_not_reported",
          "partial_usage",
          "model_unknown",
          "no_price",
          "not_applicable"
        ],
        "title": "UsageState",
        "type": "string"
      },
      "UserDetailOut": {
        "description": "`computed_at` is when the user's figures were last recomputed (the latest of the days\nsummed).",
        "properties": {
          "computed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Computed At"
          },
          "daily": {
            "items": {
              "$ref": "#/components/schemas/DayStats"
            },
            "title": "Daily",
            "type": "array"
          },
          "recent_sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionSummaryOut"
            },
            "title": "Recent Sessions",
            "type": "array"
          },
          "user": {
            "$ref": "#/components/schemas/UserStats"
          },
          "window": {
            "$ref": "#/components/schemas/StatsWindow"
          }
        },
        "required": [
          "user",
          "daily",
          "recent_sessions",
          "window",
          "computed_at"
        ],
        "title": "UserDetailOut",
        "type": "object"
      },
      "UserListOut": {
        "description": "`computed_at` is when the figures of the window were last recomputed (the latest of the\ndays summed), `None` when no day of the window has been computed yet.",
        "properties": {
          "computed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Computed At"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/UserStats"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "window": {
            "$ref": "#/components/schemas/StatsWindow"
          }
        },
        "required": [
          "items",
          "next_cursor",
          "window",
          "computed_at"
        ],
        "title": "UserListOut",
        "type": "object"
      },
      "UserOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "email_verified": {
            "title": "Email Verified",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "created_at",
          "email_verified"
        ],
        "title": "UserOut",
        "type": "object"
      },
      "UserStats": {
        "description": "One end user over the days of the window that have any activity.\n\n`cost_usd` is the sum of the priced calls: `None` when calls were made and none was priced,\nand a lower bound while `unpriced_calls` (the calls without a price) is above 0.\n`first_seen_day` and `last_seen_day` are the first and last of those days. `errors` counts\nfailed LLM calls; the `error_count` of a session counts failed spans of every kind.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "external_user_id": {
            "title": "External User Id",
            "type": "string"
          },
          "first_seen_day": {
            "format": "date",
            "title": "First Seen Day",
            "type": "string"
          },
          "last_seen_day": {
            "format": "date",
            "title": "Last Seen Day",
            "type": "string"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "tokens": {
            "title": "Tokens",
            "type": "integer"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          },
          "unpriced_calls": {
            "title": "Unpriced Calls",
            "type": "integer"
          }
        },
        "required": [
          "external_user_id",
          "traces",
          "llm_calls",
          "errors",
          "unpriced_calls",
          "cost_usd",
          "tokens",
          "first_seen_day",
          "last_seen_day"
        ],
        "title": "UserStats",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VersionCreate": {
        "additionalProperties": false,
        "description": "The body of `POST /prompts/{name}/versions`.",
        "properties": {
          "commit_message": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Message"
          },
          "model_config": {
            "$ref": "#/components/schemas/ModelAdvice"
          },
          "template": {
            "discriminator": {
              "mapping": {
                "chat": "#/components/schemas/ChatTemplateIn",
                "text": "#/components/schemas/TextTemplateIn"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/TextTemplateIn"
              },
              {
                "$ref": "#/components/schemas/ChatTemplateIn"
              }
            ],
            "title": "Template"
          }
        },
        "required": [
          "template"
        ],
        "title": "VersionCreate",
        "type": "object"
      },
      "VersionOut": {
        "properties": {
          "commit_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Message"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PromptKind"
          },
          "model_config": {
            "additionalProperties": true,
            "title": "Model Config",
            "type": "object"
          },
          "template": {
            "additionalProperties": true,
            "title": "Template",
            "type": "object"
          },
          "variables": {
            "items": {
              "type": "string"
            },
            "title": "Variables",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version",
          "kind",
          "template",
          "variables",
          "model_config",
          "commit_message",
          "created_by",
          "created_at"
        ],
        "title": "VersionOut",
        "type": "object"
      },
      "VersionUsageOut": {
        "description": "Over the last 7 days. `cost_usd` and `p95_ms` are null when unknown, never 0.\n\n`cost_usd` sums the calls that have a cost; when `has_unpriced` is true some LLM calls had\nnone (unknown model or missing usage), so it is a lower bound.",
        "properties": {
          "cost_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "has_unpriced": {
            "title": "Has Unpriced",
            "type": "boolean"
          },
          "llm_calls": {
            "title": "Llm Calls",
            "type": "integer"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "traces": {
            "title": "Traces",
            "type": "integer"
          }
        },
        "required": [
          "traces",
          "llm_calls",
          "cost_usd",
          "p95_ms",
          "has_unpriced"
        ],
        "title": "VersionUsageOut",
        "type": "object"
      },
      "WebhookConfig": {
        "additionalProperties": false,
        "description": "Where the signed POST goes. The URL rules that need settings or DNS are in `urls.py`.",
        "properties": {
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "WebhookConfig",
        "type": "object"
      },
      "WebhookEvaluatorConfig": {
        "additionalProperties": false,
        "properties": {
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "kind": {
            "const": "webhook",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "channel_id"
        ],
        "title": "WebhookEvaluatorConfig",
        "type": "object"
      },
      "WindowOut": {
        "properties": {
          "end": {
            "format": "date-time",
            "title": "End",
            "type": "string"
          },
          "start": {
            "format": "date-time",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "WindowOut",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "Spanlight API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/auth/email/verify/confirm": {
      "post": {
        "description": "Verify an address with the token from the emailed link.\n\nNo session is needed: the link is often opened in a browser that is not signed in, and the\ntoken alone proves the inbox. Unknown, used, expired and wrong-kind tokens all answer the\nsame 404.",
        "operationId": "confirm_email_verification_api_v1_auth_email_verify_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailVerifyConfirmIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm Email Verification",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/email/verify/request": {
      "post": {
        "description": "Send the signed-in user a fresh verification link, at most 3 per hour.",
        "operationId": "request_email_verification_api_v1_auth_email_verify_request_post",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Request Email Verification",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "description": "Check the password. A user with two-factor authentication gets a challenge, not a session.\n\nThe challenge is issued only after everything a session needs has held (throttle, password,\na password that is still current), so it means exactly \"the first step passed\".",
        "operationId": "login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "discriminator": {
                    "mapping": {
                      "signed_in": "#/components/schemas/LoginSignedInOut",
                      "totp_required": "#/components/schemas/LoginTotpRequiredOut"
                    },
                    "propertyName": "status"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LoginSignedInOut"
                    },
                    {
                      "$ref": "#/components/schemas/LoginTotpRequiredOut"
                    }
                  ],
                  "title": "Response Login Api V1 Auth Login Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Login",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout_api_v1_auth_logout_post",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "summary": "Logout",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "description": "The caller's account and memberships: for a browser session, and for a personal access token.\n\nThis is the one `/auth` route a token may call, so a tool can check that its token works and\nwhose it is.",
        "operationId": "me_api_v1_auth_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Me",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oauth/identities": {
      "get": {
        "operationId": "list_identities_api_v1_auth_oauth_identities_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OAuthIdentityOut"
                  },
                  "title": "Response List Identities Api V1 Auth Oauth Identities Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Identities",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oauth/providers": {
      "get": {
        "description": "The providers that can be used to sign in, so the login page shows only working buttons.",
        "operationId": "list_providers_api_v1_auth_oauth_providers_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OAuthProviderOut"
                  },
                  "title": "Response List Providers Api V1 Auth Oauth Providers Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Providers",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oauth/{provider}": {
      "delete": {
        "description": "Unlink a provider account. The provider need not still be configured.",
        "operationId": "unlink_api_v1_auth_oauth__provider__delete",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unlink",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oauth/{provider}/callback": {
      "get": {
        "description": "Finish a sign-in or link, then redirect: to `next` on success, to an error page if not.\n\nEvery query parameter is optional so a callback that is wrong in any way still gets the\nredirect the user can read, not a JSON validation error.",
        "operationId": "callback_api_v1_auth_oauth__provider__callback_get",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to `next` (with session cookies for a sign-in), or to `/login?error=<CODE>` (to `next` with `error=<CODE>` for a link). Clears `spl_oauth`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Callback",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oauth/{provider}/start": {
      "get": {
        "description": "Send the browser to the provider. `intent=link` links it to the signed-in user instead.",
        "operationId": "start_api_v1_auth_oauth__provider__start_get",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "intent",
            "required": false,
            "schema": {
              "default": "sign_in",
              "enum": [
                "sign_in",
                "link"
              ],
              "title": "Intent",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the provider's sign-in page; sets `spl_oauth`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/password/forgot": {
      "post": {
        "description": "Email a reset link if the address has an account. The answer never says whether it does.\n\nA known and an unknown address take the same path and get the same response: both are\ncounted by the limits first, and neither is turned away early. The only difference is that\na known address also gets a token and a queued email. The demo account counts as unknown.",
        "operationId": "forgot_password_api_v1_auth_password_forgot_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordForgotIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forgot Password",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/password/reset": {
      "post": {
        "description": "Set a new password with the token from the emailed link.\n\nNo session is needed (the person forgot their password) and none is created: they sign in\nafterwards with the new password. Every session of the account is ended. Unknown, used,\nexpired and wrong-kind tokens all answer the same 404.",
        "operationId": "reset_password_api_v1_auth_password_reset_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reset Password",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/sessions": {
      "delete": {
        "description": "Sign out everywhere else: end every session of the user except the one making the call.",
        "operationId": "delete_other_sessions_api_v1_auth_sessions_delete",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "summary": "Delete Other Sessions",
        "tags": [
          "auth"
        ]
      },
      "get": {
        "operationId": "list_sessions_api_v1_auth_sessions_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SessionOut"
                  },
                  "title": "Response List Sessions Api V1 Auth Sessions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Sessions",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/sessions/{session_id}": {
      "delete": {
        "operationId": "delete_session_api_v1_auth_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Session",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/signup": {
      "post": {
        "operationId": "signup_api_v1_auth_signup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Signup",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/tokens": {
      "get": {
        "description": "The caller's tokens that can still be used. Never includes a secret.",
        "operationId": "list_tokens_api_v1_auth_tokens_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PersonalAccessTokenOut"
                  },
                  "title": "Response List Tokens Api V1 Auth Tokens Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Tokens",
        "tags": [
          "auth"
        ]
      },
      "post": {
        "description": "Create a token. The 201 is the only time its secret is shown.",
        "operationId": "create_token_api_v1_auth_tokens_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonalAccessTokenCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalAccessTokenCreatedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Token",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/tokens/{token_id}": {
      "delete": {
        "description": "Revoke a token. Repeating it is fine; a token that is not the caller's is a 404.",
        "operationId": "revoke_api_v1_auth_tokens__token_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Token Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/totp": {
      "get": {
        "operationId": "totp_status_api_v1_auth_totp_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotpStatusOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Totp Status",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/totp/disable": {
      "post": {
        "description": "Turn it off. Needs a valid code (TOTP or recovery), which is spent.",
        "operationId": "totp_disable_api_v1_auth_totp_disable_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpCodeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Totp Disable",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/totp/enable": {
      "post": {
        "description": "Turn it on with a code from the app. Returns the recovery codes, this once.",
        "operationId": "totp_enable_api_v1_auth_totp_enable_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpCodeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotpEnabledOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Totp Enable",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/totp/setup": {
      "post": {
        "description": "Make a secret for an authenticator app. Replaces one from an earlier, unconfirmed setup.\n\nNeeds the current password, or a sign-in in the last 10 minutes for an account without one.",
        "operationId": "totp_setup_api_v1_auth_totp_setup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TotpSetupIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotpSetupOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Totp Setup",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/totp/verify": {
      "post": {
        "description": "The second step of signing in: a challenge and a code make a session.\n\nThe user row is locked before the failure count is read, so concurrent attempts for one\naccount run one after another: the limit is exact, and a code cannot be spent twice. Wrong\ncodes are recorded as failed sign-ins, so they share the password's limit. A challenge issued\nbefore the password changed is refused: it passed the first step against a password that no\nlonger exists.",
        "operationId": "totp_verify_api_v1_auth_totp_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpVerifyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginSignedInOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Totp Verify",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/demo/session": {
      "post": {
        "operationId": "start_demo_session_api_v1_demo_session_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Start Demo Session",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/v1/invites/accept": {
      "post": {
        "operationId": "accept_invite_api_v1_invites_accept_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteAcceptIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept Invite",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/invites/preview": {
      "get": {
        "description": "Show the org and role an invite grants, without accepting it.\n\nRequires a signed-in user (the invitee), like accepting does. Unknown, used and expired\ntokens all get the same 404, so the endpoint does not reveal which invites exist.",
        "operationId": "preview_invite_api_v1_invites_preview_get",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePreviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Invite",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs": {
      "post": {
        "operationId": "create_org_api_v1_orgs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Org",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}": {
      "delete": {
        "description": "Delete the organization with its projects, traces, keys, members, invites and audit log.\n\nOnly an owner may, and only by typing the organization's slug as `confirm`. Everything goes\nin one transaction: it is all deleted or none of it is. This is synchronous, which is fine for\nthe size of organization this runs; a very large one needs a background job.",
        "operationId": "delete_org_api_v1_orgs__org_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgDeleteIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Org",
        "tags": [
          "orgs"
        ]
      },
      "get": {
        "operationId": "get_org_api_v1_orgs__org_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgWithRoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Org",
        "tags": [
          "orgs"
        ]
      },
      "patch": {
        "description": "Rename the organization, or require (or stop requiring) two-factor authentication.\n\n`name` needs `org:update` (admins and owners) and `require_2fa` needs `org:security` (owners);\na request with both needs both, and is refused whole. Only values that change are applied and\naudited, in one `org.update` event, so repeating a request is a no-op.",
        "operationId": "update_org_api_v1_orgs__org_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Org",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/alert-channels": {
      "get": {
        "description": "By name. Never includes a secret.",
        "operationId": "list_channels_api_v1_orgs__org_id__alert_channels_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertChannelOut"
                  },
                  "title": "Response List Channels Api V1 Orgs  Org Id  Alert Channels Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List alert channels",
        "tags": [
          "alerts"
        ]
      },
      "post": {
        "description": "Store a channel. A webhook channel's response carries its signing `secret`, once.\n\n`409 NOT_CONFIGURED` for Slack, webhook and PagerDuty without CREDENTIALS_KEYS;\n`409 CHANNEL_NAME_TAKEN`; `422 LIMIT_EXCEEDED` past 20 channels; `422 RECIPIENT_NOT_MEMBER`;\n`422 UNSAFE_URL` for a webhook URL that is not `https://` or resolves to a private address.",
        "operationId": "create_channel_api_v1_orgs__org_id__alert_channels_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertChannelSecretOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add an alert channel",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/alert-channels/{channel_id}": {
      "delete": {
        "description": "Rules that name the channel keep its id and skip it until they are edited.",
        "operationId": "delete_channel_api_v1_orgs__org_id__alert_channels__channel_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an alert channel",
        "tags": [
          "alerts"
        ]
      },
      "get": {
        "operationId": "get_channel_api_v1_orgs__org_id__alert_channels__channel_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertChannelOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get an alert channel",
        "tags": [
          "alerts"
        ]
      },
      "patch": {
        "description": "Change the name, config or secret. The kind never changes.\n\n`rotate_secret` (webhooks only) generates a new signing secret, returned once. A new config\nor secret clears `verified_at`. Errors as for the create.",
        "operationId": "update_channel_api_v1_orgs__org_id__alert_channels__channel_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertChannelSecretOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit an alert channel",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/alert-channels/{channel_id}/deliveries": {
      "get": {
        "description": "Newest first. `status` keeps `pending`, `sent` or `failed` deliveries.",
        "operationId": "list_deliveries_api_v1_orgs__org_id__alert_channels__channel_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NotificationStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_DeliveryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a channel's deliveries",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/alert-channels/{channel_id}/deliveries/{delivery_id}/retry": {
      "post": {
        "description": "Queue a failed delivery again, with the same id, so receivers still deduplicate on it.\n\nIts attempts start over and the worker picks it up at once; the last error stays until the\nnext attempt. `409 NOT_RETRYABLE` unless the delivery is `failed`.",
        "operationId": "retry_delivery_api_v1_orgs__org_id__alert_channels__channel_id__deliveries__delivery_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Delivery Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry a failed delivery",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/alert-channels/{channel_id}/test": {
      "post": {
        "description": "Deliver a test now. A failing channel is a `200` with `status: \"failed\"` and the error.\n\n`pending` when a failure a retry might fix left it to the worker. `sent` records the channel\nas verified. At most 10 tests per channel an hour (`429 RATE_LIMITED`). An email channel\nwhile no email provider is configured is `409 NOT_CONFIGURED`.",
        "operationId": "send_channel_test_api_v1_orgs__org_id__alert_channels__channel_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "description": "Makes a retry of this request safe: it runs once, then is replayed.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[\\x21-\\x7e]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retry of this request safe: it runs once, then is replayed.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelTestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send a test notification",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit": {
      "get": {
        "operationId": "list_audit_events_api_v1_orgs__org_id__audit_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "success",
                    "failure"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Outcome"
            }
          },
          {
            "in": "query",
            "name": "actor_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "token",
                    "system",
                    "cli"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AuditEventOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Audit Events",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/export.csv": {
      "get": {
        "description": "The audit log, filtered like `GET /orgs/{org_id}/audit`, streamed as CSV (newest first).\n\nA log with more than 50 000 matching events is refused before anything is sent.",
        "operationId": "export_audit_csv_api_v1_orgs__org_id__audit_export_csv_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "success",
                    "failure"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Outcome"
            }
          },
          {
            "in": "query",
            "name": "actor_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "token",
                    "system",
                    "cli"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {}
            },
            "description": "The audit log as CSV."
          },
          "422": {
            "description": "More than 50 000 events match (`EXPORT_TOO_LARGE`)."
          }
        },
        "summary": "Download the audit log as CSV",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/export.jsonl": {
      "get": {
        "description": "The audit log, filtered like `GET /orgs/{org_id}/audit`, one event object per line\n(newest first), for log tools. A log with more than 50 000 matching events is refused.",
        "operationId": "export_audit_jsonl_api_v1_orgs__org_id__audit_export_jsonl_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "success",
                    "failure"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Outcome"
            }
          },
          {
            "in": "query",
            "name": "actor_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "token",
                    "system",
                    "cli"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {}
            },
            "description": "The audit log as JSON Lines: one `AuditEventOut` per line."
          },
          "422": {
            "description": "More than 50 000 events match (`EXPORT_TOO_LARGE`)."
          }
        },
        "summary": "Download the audit log as JSON Lines",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/integrity": {
      "get": {
        "description": "Recompute the org's audit hash chain from the stored events and say where it breaks.",
        "operationId": "audit_integrity_api_v1_orgs__org_id__audit_integrity_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditIntegrityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Audit Integrity",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/stream": {
      "delete": {
        "description": "Stop streaming and forget the endpoint and its secret.",
        "operationId": "delete_audit_stream_api_v1_orgs__org_id__audit_stream_delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Audit Stream",
        "tags": [
          "orgs"
        ]
      },
      "get": {
        "description": "The org's audit stream, or `null` when none is set up. Never the signing secret.",
        "operationId": "get_audit_stream_api_v1_orgs__org_id__audit_stream_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuditStreamOut"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Audit Stream Api V1 Orgs  Org Id  Audit Stream Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Audit Stream",
        "tags": [
          "orgs"
        ]
      },
      "put": {
        "description": "Create the stream (its `secret` is returned this once) or change its URL or switch.\n\nA new stream sends the events written after it is created. `422 VALIDATION_ERROR` for a URL\nthe webhook rules refuse (`422 UNSAFE_URL`), `409 NOT_CONFIGURED` without CREDENTIALS_KEYS.",
        "operationId": "put_audit_stream_api_v1_orgs__org_id__audit_stream_put",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditStreamIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditStreamSavedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Audit Stream",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/stream/rotate-secret": {
      "post": {
        "description": "Replace the signing secret; the new one is returned this once. The old one stops at once.",
        "operationId": "rotate_audit_stream_secret_api_v1_orgs__org_id__audit_stream_rotate_secret_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditStreamSavedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Audit Stream Secret",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/audit/stream/test": {
      "post": {
        "description": "POST one signed `audit.test` event to the endpoint now and report how it answered.\n\nAt most 10 an hour per organization (`429`), like a channel's test.",
        "operationId": "test_audit_stream_api_v1_orgs__org_id__audit_stream_test_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditStreamTestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Test Audit Stream",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources": {
      "get": {
        "description": "Lists the organization's billing sources, ordered by name.\n\nThe list is not paginated, because an organization has only a few sources. No response\nincludes an admin key; `key_set` says whether one is stored.",
        "operationId": "list_sources_api_v1_orgs__org_id__billing_sources_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BillingSourceOut"
                  },
                  "title": "Response List Sources Api V1 Orgs  Org Id  Billing Sources Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List billing sources",
        "tags": [
          "billing-sources"
        ]
      },
      "post": {
        "description": "Adds a billing source and answers `201` with it.\n\nFor a source that fetches from a provider, the admin key is encrypted with `CREDENTIALS_KEYS`\nand checked once with the provider (one request, 10 seconds at most). The source is stored\nwhatever the outcome of the check, which sets `status` and `last_error`. The key is never\nreturned, logged or audited.\n\nErrors: `409 NOT_CONFIGURED` when the kind fetches from a provider and `CREDENTIALS_KEYS` is\nnot set. `422 VALIDATION_ERROR` on `admin_key` when the key is not an Admin API key of the\nkind's provider, on `provider` when it contradicts the kind, and on `project_ids` when a\nproject belongs to another organization. `409 BILLING_SOURCE_NAME_TAKEN` when another source\nof the organization has the name. `409 BILLING_SOURCE_PROJECT_TAKEN` when another source of\nthe same provider already covers one of the projects. `429 RATE_LIMITED` with `Retry-After`\npast five key checks in the organization, then one a minute (creates and rotations count\ntogether; a request refused before the check, a CSV source among them, spends nothing).",
        "operationId": "create_source_api_v1_orgs__org_id__billing_sources_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingSourceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a billing source",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}": {
      "delete": {
        "description": "Deletes the source with its project mappings, fetch runs and provider cost lines.\n\nThis cannot be undone, and the source's reconciliation report stops working.",
        "operationId": "delete_source_api_v1_orgs__org_id__billing_sources__source_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a billing source",
        "tags": [
          "billing-sources"
        ]
      },
      "get": {
        "description": "Returns one billing source. The admin key is never included.",
        "operationId": "get_source_api_v1_orgs__org_id__billing_sources__source_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a billing source",
        "tags": [
          "billing-sources"
        ]
      },
      "patch": {
        "description": "Changes the fields sent: `name`, `provider_scope`, `enabled` and `project_ids`.\n\n`project_ids` replaces the whole mapping, and `provider_scope: null` clears the scope. A\nsource that is turned off is not fetched and cannot be refreshed, and its report stays\nreadable. The name and project errors of `POST` apply here too.",
        "operationId": "update_source_api_v1_orgs__org_id__billing_sources__source_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingSourceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a billing source",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/reconciliation": {
      "get": {
        "description": "Compares the provider's bill with Spanlight's figures, per UTC day and model group.\n\nSpanlight's side covers the projects mapped to the source. `from` and `to` are widened to\nwhole UTC days; the window is at most 31 days and ends today at the latest, and without them\nthe report covers the last 14 whole days. Each day and group shows the provider's amount,\nSpanlight's amount, the explained lines and the signed residual (provider minus Spanlight\nminus explained). Credits and charges Spanlight cannot see are listed apart and never enter\nthe residual. A day is provisional until 48 hours after it ends and until a successful fetch\nor upload that covers it finishes after that point.\n\nErrors: `422 VALIDATION_ERROR` on `to` when the window is longer than 31 days or ends after\ntoday (UTC), including a `from` later than the start of today with no `to`, and on `from`\nwhen `from` is not earlier than `to`.",
        "operationId": "get_reconciliation_api_v1_orgs__org_id__billing_sources__source_id__reconciliation_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "description": "The window is invalid (`VALIDATION_ERROR`)."
          }
        },
        "summary": "Reconcile a billing source with Spanlight's figures",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/reconciliation.csv": {
      "get": {
        "description": "Returns the same report as `GET …/reconciliation` as a CSV file.\n\nThe file has one row per day and model group. The window rules and errors are those of the\nJSON report.",
        "operationId": "get_reconciliation_csv_api_v1_orgs__org_id__billing_sources__source_id__reconciliation_csv_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {}
            },
            "description": "The report, one row per group."
          },
          "422": {
            "description": "The window is invalid (`VALIDATION_ERROR`)."
          }
        },
        "summary": "Download a billing source's reconciliation as CSV",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/refresh": {
      "post": {
        "description": "Queues a fetch of the provider's cost report and answers `202` with the new run's id.\n\nThe fetch covers the last seven whole UTC days, or the last 31 while the source has never\nbeen fetched successfully. Follow the run with `GET …/runs`.\n\nErrors: `422 VALIDATION_ERROR` on `kind` for a CSV source. `409 BILLING_SOURCE_DISABLED` when\nthe source is turned off. `409 NOT_CONFIGURED` when `BILLING_SOURCES_ENABLED` is off or\n`CREDENTIALS_KEYS` is not set. `429 RATE_LIMITED` with `Retry-After` past the limit of one\nrefresh per source every 5 minutes, with a burst of 2. `409 BILLING_FETCH_IN_PROGRESS`\nwhile another run of the source is in progress; this refusal still counts towards the limit.",
        "operationId": "refresh_source_api_v1_orgs__org_id__billing_sources__source_id__refresh_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshAccepted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Fetch a billing source now",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/rotate": {
      "post": {
        "description": "Replaces the admin key of a source that fetches from a provider.\n\nThe new key is encrypted and checked once, as on create, and the check sets `status` and\n`last_error`. Errors: `422 VALIDATION_ERROR` on `kind` for a CSV source, which holds no key,\nand on `admin_key` when the key is not an Admin API key of the source's provider; `409\nNOT_CONFIGURED` when `CREDENTIALS_KEYS` is not set. `429 RATE_LIMITED` with `Retry-After`\nunder the key-check limit of `POST`, which rotations share; a refused request spends nothing.",
        "operationId": "rotate_source_api_v1_orgs__org_id__billing_sources__source_id__rotate_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingSourceRotateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace a source's admin key",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/runs": {
      "get": {
        "description": "Lists the source's fetches and uploads, newest first by start time.\n\nKeyset pagination: `limit` from 1 to 100 (default 20), and `cursor` from the previous page's\n`next_cursor`. A failed run's `error` is an HTTP status line or a short fixed phrase, never a\nprovider's response body.",
        "operationId": "list_runs_api_v1_orgs__org_id__billing_sources__source_id__runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_BillingRunOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a source's runs",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/billing-sources/{source_id}/upload": {
      "post": {
        "description": "Stores the lines of a cost CSV as one run of a CSV source.\n\nSend the file as multipart/form-data in a field named `file`: UTF-8, at most 5 MB and 100,000\ndata rows, with a header that lists every column of the CSV format. The whole file is checked\nbefore anything is stored. The run covers every day from the file's first day to its last,\nand for those days the report reads only this file's lines, so a file must hold every line of\neach day it covers. A line already stored for its day takes the new figure. Every day must lie\nin the 400 days up to today (UTC), today included. A source that is turned off still accepts\nuploads.\n\nErrors: `422 VALIDATION_ERROR` on `kind` for a source that fetches from a provider. `415\nUNSUPPORTED_MEDIA_TYPE` when the body is not multipart/form-data. `413 PAYLOAD_TOO_LARGE` over\n5 MB. `429 RATE_LIMITED` with `Retry-After` past six uploads of the source in an hour; a\nrefused file counts. `409 BILLING_FETCH_IN_PROGRESS` while another run of the source is in\nprogress. `422 VALIDATION_ERROR` with up to 20 `errors[]` of `{field: \"file\", row, column,\nmessage}` when the file is refused, in which case nothing is stored.",
        "operationId": "upload_csv_api_v1_orgs__org_id__billing_sources__source_id__upload_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "description": "The cost CSV, UTF-8, at most 5 MB.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvUploadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload a billing source's cost CSV",
        "tags": [
          "billing-sources"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/credentials": {
      "get": {
        "description": "Newest first. Never includes a key.",
        "operationId": "list_credentials_api_v1_orgs__org_id__credentials_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CredentialOut"
                  },
                  "title": "Response List Credentials Api V1 Orgs  Org Id  Credentials Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List provider credentials",
        "tags": [
          "gateway"
        ]
      },
      "post": {
        "description": "Seal and store the key. `base_url` is required for `openai_compatible`, refused otherwise.\n\n`409 NOT_CONFIGURED` without CREDENTIALS_KEYS; `422` on `base_url` for a URL that is not\n`https://`, has userinfo, a query or a fragment, or resolves to a private address.",
        "operationId": "create_credential_api_v1_orgs__org_id__credentials_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a provider credential",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/credentials/{credential_id}": {
      "delete": {
        "description": "`409 CREDENTIAL_IN_USE` while a gateway route sends calls through it.",
        "operationId": "delete_credential_api_v1_orgs__org_id__credentials__credential_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credential_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Credential Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a provider credential",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/credentials/{credential_id}/check": {
      "post": {
        "description": "List the provider's models with the key and record the outcome as the last check.\n\nA failing key is a `200` with `status: \"error\"` and a short reason such as `401 Unauthorized`.",
        "operationId": "check_credential_api_v1_orgs__org_id__credentials__credential_id__check_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credential_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Credential Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialCheckOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Check a credential",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/credentials/{credential_id}/rotate": {
      "post": {
        "description": "Seal a new key in place of the old one. Clears the last check, which was of the old key.",
        "operationId": "rotate_credential_api_v1_orgs__org_id__credentials__credential_id__rotate_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credential_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Credential Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialRotateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace a credential's key",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/invites": {
      "get": {
        "operationId": "list_invites_api_v1_orgs__org_id__invites_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/InviteOut"
                  },
                  "title": "Response List Invites Api V1 Orgs  Org Id  Invites Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Invites",
        "tags": [
          "orgs"
        ]
      },
      "post": {
        "description": "Create an invite and return its link; with an `email` and a sender, also mail it.\n\nThe invite, its audit event and the queued email commit in one transaction. Mailing only\nchanges how the link reaches someone: the invite is still accepted by any signed-in holder\nof the link, whatever address it was mailed to.",
        "operationId": "create_invite_api_v1_orgs__org_id__invites_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteCreatedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Invite",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/invites/{invite_id}": {
      "delete": {
        "operationId": "revoke_invite_api_v1_orgs__org_id__invites__invite_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invite Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Invite",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/members": {
      "get": {
        "operationId": "list_members_api_v1_orgs__org_id__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MemberOut"
                  },
                  "title": "Response List Members Api V1 Orgs  Org Id  Members Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Members",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/members/{user_id}": {
      "delete": {
        "operationId": "remove_member_api_v1_orgs__org_id__members__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Member",
        "tags": [
          "orgs"
        ]
      },
      "patch": {
        "operationId": "update_member_api_v1_orgs__org_id__members__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Member",
        "tags": [
          "orgs"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/price-overrides": {
      "get": {
        "description": "Ordered by provider, pattern, start time and tier.",
        "operationId": "list_price_overrides_api_v1_orgs__org_id__price_overrides_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PriceOverrideOut"
                  },
                  "title": "Response List Price Overrides Api V1 Orgs  Org Id  Price Overrides Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List price overrides",
        "tags": [
          "prices"
        ]
      },
      "post": {
        "description": "Rates are USD per million tokens. `effective_from` defaults to now.\n\nThe pattern matches a model exactly or with a snapshot suffix, like the seed prices. The\noptional cache-write rates fall back to the input rate; `min_prompt_tokens` (default 0) makes\nthe override one tier of the model, applied to prompts of at least that many tokens.\n`409 PRICE_OVERRIDE_EXISTS` when the organization already has one for the same provider,\npattern, start time and tier.",
        "operationId": "create_price_override_api_v1_orgs__org_id__price_overrides_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceOverrideCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceOverrideOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a price override",
        "tags": [
          "prices"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/price-overrides/{override_id}": {
      "delete": {
        "description": "Spans ingested from now on fall back to the next price; stored costs are not rewritten.",
        "operationId": "delete_price_override_api_v1_orgs__org_id__price_overrides__override_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "override_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Override Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a price override",
        "tags": [
          "prices"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/projects": {
      "get": {
        "operationId": "list_projects_api_v1_orgs__org_id__projects_get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectOut"
                  },
                  "title": "Response List Projects Api V1 Orgs  Org Id  Projects Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Projects",
        "tags": [
          "projects"
        ]
      },
      "post": {
        "operationId": "create_project_api_v1_orgs__org_id__projects_post",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Project",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/prices": {
      "get": {
        "description": "The price table the server computes costs from. Any signed-in user, session or token.",
        "operationId": "get_prices_api_v1_prices_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PriceOut"
                  },
                  "title": "Response Get Prices Api V1 Prices Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Prices",
        "tags": [
          "prices"
        ]
      }
    },
    "/api/v1/projects/{project_id}": {
      "delete": {
        "description": "Delete the project with its traces, spans and API keys.\n\nAdmins and owners may, by typing the project's slug as `confirm`. The org's audit log keeps a\n`project.delete` event with the name and slug, written in the same transaction.",
        "operationId": "delete_project_api_v1_projects__project_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectDeleteIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Project",
        "tags": [
          "projects"
        ]
      },
      "get": {
        "operationId": "get_project_api_v1_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Project",
        "tags": [
          "projects"
        ]
      },
      "patch": {
        "operationId": "update_project_api_v1_projects__project_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Project",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-events": {
      "get": {
        "description": "Newest first. `state=firing` keeps open events, `state=resolved` resolved ones.",
        "operationId": "list_events_api_v1_projects__project_id__alert_events_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rule_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rule Id"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "firing",
                    "resolved"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AlertEventOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List alert events",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-events/{event_id}/acknowledge": {
      "post": {
        "description": "Record that you have seen the event. `409 ALREADY_ACKNOWLEDGED` the second time.",
        "operationId": "acknowledge_event_api_v1_projects__project_id__alert_events__event_id__acknowledge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Event Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertEventOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Acknowledge an alert event",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-rules": {
      "get": {
        "description": "Firing rules first, then by name. Unpaginated: a project has at most 100 rules.",
        "operationId": "list_rules_api_v1_projects__project_id__alert_rules_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertRuleOut"
                  },
                  "title": "Response List Rules Api V1 Projects  Project Id  Alert Rules Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List alert rules",
        "tags": [
          "alerts"
        ]
      },
      "post": {
        "description": "Store a rule. `422 UNKNOWN_CHANNEL` for a channel outside the organization; `422\nLIMIT_EXCEEDED` past 100 rules (budgets' rules do not count).",
        "operationId": "create_rule_api_v1_projects__project_id__alert_rules_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add an alert rule",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-rules/preview": {
      "post": {
        "description": "What the rule would have measured over the last 7 days, one point per window (at least\nan hour apart, at most 168 points), with its line at each point.\n\nReads only; at most 30 previews per person a minute (`429 RATE_LIMITED`).",
        "operationId": "preview_api_v1_projects__project_id__alert_rules_preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleDefinition"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulePreviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview an alert rule",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-rules/{rule_id}": {
      "delete": {
        "description": "Delete the rule with its state and events. A firing alert is resolved first and sends\n`alert.resolved`. Notifications already queued still go out.",
        "operationId": "delete_rule_api_v1_projects__project_id__alert_rules__rule_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an alert rule",
        "tags": [
          "alerts"
        ]
      },
      "get": {
        "operationId": "get_rule_api_v1_projects__project_id__alert_rules__rule_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get an alert rule",
        "tags": [
          "alerts"
        ]
      },
      "patch": {
        "description": "Replace the rule with the whole rule sent; its kind may change. Errors as for the create.\n\nChanging what a firing rule measures or judges, or disabling it, resolves its alert first\nand sends `alert.resolved`; renaming it or changing its channels or cooldown does not.",
        "operationId": "update_rule_api_v1_projects__project_id__alert_rules__rule_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit an alert rule",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/alert-rules/{rule_id}/mute": {
      "post": {
        "description": "Stop the rule's notifications until `until` (at most 30 days ahead); `null` unmutes.\n\nA muted rule still fires, resolves and records its events.",
        "operationId": "mute_rule_api_v1_projects__project_id__alert_rules__rule_id__mute_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mute an alert rule",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues": {
      "get": {
        "description": "Newest first, each with its progress.",
        "operationId": "list_queues_api_v1_projects__project_id__annotation_queues_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_QueueOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List annotation queues",
        "tags": [
          "annotations"
        ]
      },
      "post": {
        "description": "Store an empty queue. `409 NAME_TAKEN`, `422 UNKNOWN_SCORE_CONFIG`.",
        "operationId": "create_queue_api_v1_projects__project_id__annotation_queues_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a queue",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}": {
      "delete": {
        "description": "Delete the queue with its items; the scores already given stay. `409 QUEUE_IN_USE`\nwhile a review policy fills it.",
        "operationId": "delete_queue_api_v1_projects__project_id__annotation_queues__queue_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a queue",
        "tags": [
          "annotations"
        ]
      },
      "get": {
        "operationId": "get_queue_api_v1_projects__project_id__annotation_queues__queue_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a queue",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}/claim": {
      "post": {
        "description": "The lowest-id pending item that is free, already yours, or claimed over 30 minutes ago;\n`204` when there is none.",
        "operationId": "claim_api_v1_projects__project_id__annotation_queues__queue_id__claim_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "204": {
            "description": "No item is waiting"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Claim the next item",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}/items": {
      "get": {
        "description": "By id, oldest first; `status` keeps one status, `reason` one reason.",
        "operationId": "list_items_api_v1_projects__project_id__annotation_queues__queue_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/QueueItemStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "reason",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ReviewReason"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reason"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_QueueItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a queue's items",
        "tags": [
          "annotations"
        ]
      },
      "post": {
        "description": "Queue up to 200 traces, or the given span of each. A trace already queued is skipped.",
        "operationId": "add_items_api_v1_projects__project_id__annotation_queues__queue_id__items_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemsAddedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Queue traces",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/complete": {
      "post": {
        "description": "Score the item's trace: one score for each of the queue's configs, no others.\n`409 ITEM_NOT_ASSIGNED_TO_YOU`, `422 SCORE_NOT_IN_QUEUE`, `422 SCORE_REQUIRED`.",
        "operationId": "complete_item_api_v1_projects__project_id__annotation_queues__queue_id__items__item_id__complete_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Completion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Complete an item",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/release": {
      "post": {
        "description": "Give your claimed item back to the queue. `409 ITEM_NOT_ASSIGNED_TO_YOU`.",
        "operationId": "release_item_api_v1_projects__project_id__annotation_queues__queue_id__items__item_id__release_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Release an item",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/skip": {
      "post": {
        "description": "Mark your claimed item skipped. `409 ITEM_NOT_ASSIGNED_TO_YOU`.",
        "operationId": "skip_item_api_v1_projects__project_id__annotation_queues__queue_id__items__item_id__skip_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queue_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Queue Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Skip an item",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/attribution": {
      "get": {
        "operationId": "read_attribution_api_v1_projects__project_id__attribution_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "required": true,
            "schema": {
              "enum": [
                "metadata",
                "trace_name",
                "user",
                "release"
              ],
              "title": "Group By",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^[a-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Key"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "cost",
              "enum": [
                "cost",
                "calls",
                "errors",
                "retry_cost"
              ],
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read Attribution",
        "tags": [
          "attribution"
        ]
      }
    },
    "/api/v1/projects/{project_id}/budgets": {
      "get": {
        "description": "By name. Unpaginated: a project has at most 50 budgets.",
        "operationId": "list_budgets_api_v1_projects__project_id__budgets_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BudgetOut"
                  },
                  "title": "Response List Budgets Api V1 Projects  Project Id  Budgets Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List budgets",
        "tags": [
          "budgets"
        ]
      },
      "post": {
        "description": "Store a budget. `409 BUDGET_NAME_TAKEN`; `422 UNKNOWN_SCOPE` for a gateway key outside\nthe project, a `metadata` scope that is not `key=value` with a valid key, or a blank trace\nname; `422 UNKNOWN_CHANNEL`; `422 LIMIT_EXCEEDED` past 50 budgets.",
        "operationId": "create_budget_api_v1_projects__project_id__budgets_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a budget",
        "tags": [
          "budgets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/budgets/{budget_id}": {
      "delete": {
        "description": "Delete the budget with its alert history. A firing budget is resolved first and sends\n`alert.resolved`; a blocking one stops blocking at once.",
        "operationId": "delete_budget_api_v1_projects__project_id__budgets__budget_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Budget Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a budget",
        "tags": [
          "budgets"
        ]
      },
      "get": {
        "operationId": "get_budget_api_v1_projects__project_id__budgets__budget_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Budget Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a budget",
        "tags": [
          "budgets"
        ]
      },
      "patch": {
        "description": "Change the fields sent; send `scope_id` together with `scope`. Errors as for the create.\n\nChanging the amount, scope or period of a firing budget, or disabling it, resolves its alert\nfirst and sends `alert.resolved`. A new scope or period clears the spend shown until the next\nevaluation, about a minute later.",
        "operationId": "update_budget_api_v1_projects__project_id__budgets__budget_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Budget Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a budget",
        "tags": [
          "budgets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets": {
      "get": {
        "description": "Newest first. `name` returns the dataset of that exact name, if any.",
        "operationId": "list_datasets_api_v1_projects__project_id__datasets_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Exact name",
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exact name",
              "title": "Name"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_DatasetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List datasets",
        "tags": [
          "datasets"
        ]
      },
      "post": {
        "description": "Store an empty dataset. `409 NAME_TAKEN`.",
        "operationId": "create_dataset_api_v1_projects__project_id__datasets_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a dataset",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}": {
      "delete": {
        "description": "Delete the dataset with its items. `409 DATASET_IN_USE` while an experiment uses it.",
        "operationId": "delete_dataset_api_v1_projects__project_id__datasets__dataset_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a dataset",
        "tags": [
          "datasets"
        ]
      },
      "get": {
        "operationId": "get_dataset_api_v1_projects__project_id__datasets__dataset_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a dataset",
        "tags": [
          "datasets"
        ]
      },
      "patch": {
        "description": "Change the description; `null` clears it.",
        "operationId": "update_dataset_api_v1_projects__project_id__datasets__dataset_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a dataset",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/items": {
      "get": {
        "description": "By id, oldest first.",
        "operationId": "list_items_api_v1_projects__project_id__datasets__dataset_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a dataset's items",
        "tags": [
          "datasets"
        ]
      },
      "post": {
        "description": "Add up to 1 000 items. `422 DATASET_FULL` past 10 000 items; nothing is stored then.",
        "operationId": "add_items_api_v1_projects__project_id__datasets__dataset_id__items_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemAddIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemAddedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add items",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/items/from-traces": {
      "post": {
        "description": "Copy one item from each of up to 200 traces: the span `span_id`, else the trace's first\n`llm` span. A trace that gives no item is listed in `rejected` with the reason (`trace not\nfound`, `no llm span`, `span not found`, `no payload stored`, `already in this dataset` when\nthis dataset already holds that trace and span). An added trace that already has an item in\nanother dataset of the project is listed in `also_in`. The recorded output is only a starting\npoint for the expected output.",
        "operationId": "add_items_from_traces_api_v1_projects__project_id__datasets__dataset_id__items_from_traces_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemFromTracesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceAddedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add items from traces",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/items/upload": {
      "post": {
        "description": "Add the items of a `.jsonl` or `.csv` file of UTF-8 text, at most 5 MB. A bad line is\nlisted in `rejected` with its line number and the rest is accepted. `415 UNSUPPORTED_FILE`\nfor another extension or encoding, `413 PAYLOAD_TOO_LARGE` past 5 MB.",
        "operationId": "upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload items",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/items/{item_id}": {
      "delete": {
        "operationId": "delete_item_api_v1_projects__project_id__datasets__dataset_id__items__item_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an item",
        "tags": [
          "datasets"
        ]
      },
      "patch": {
        "description": "Change `expected_output` (`null` clears it) and `metadata` (replaced as a whole).",
        "operationId": "update_item_api_v1_projects__project_id__datasets__dataset_id__items__item_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit an item",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/lock": {
      "post": {
        "description": "Refuse item writes and the delete with `409 DATASET_LOCKED` until the dataset is unlocked.\nReads, description edits and experiment runs still work. Locking a locked dataset keeps its\n`locked_at`.",
        "operationId": "lock_dataset_api_v1_projects__project_id__datasets__dataset_id__lock_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lock a dataset",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/datasets/{dataset_id}/unlock": {
      "post": {
        "description": "Allow item writes and the delete again. Unlocking an unlocked dataset changes nothing.",
        "operationId": "unlock_dataset_api_v1_projects__project_id__datasets__dataset_id__unlock_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unlock a dataset",
        "tags": [
          "datasets"
        ]
      }
    },
    "/api/v1/projects/{project_id}/detector-runs": {
      "get": {
        "description": "Newest first: what ran, over which window, how many findings, and what failed.",
        "operationId": "list_detector_runs_api_v1_projects__project_id__detector_runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DetectorRunOut"
                  },
                  "title": "Response List Detector Runs Api V1 Projects  Project Id  Detector Runs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List recent detector runs",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/evaluators": {
      "get": {
        "description": "Newest first. A judge's `budget` carries its month so far.",
        "operationId": "list_evaluators_api_v1_projects__project_id__evaluators_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_EvaluatorOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List evaluators",
        "tags": [
          "evaluators"
        ]
      },
      "post": {
        "description": "Check and store an evaluator. `409 NAME_TAKEN`; `404` for a prompt version or credential\nthe project or organization lacks; `422 BUDGET_REQUIRED`, `RULE_NEEDS_EXPECTED_OUTPUT`,\n`CHANNEL_KIND`, `JUDGE_TEMPLATE_VARIABLES` or `EVALUATOR_MODEL_UNPRICED`. A judge names either\n`prompt_version_id` or a built-in `judge_template` (relevance, faithfulness, toxicity,\nformat_compliance), which becomes the project's prompt `judges/<name>`.",
        "operationId": "create_evaluator_api_v1_projects__project_id__evaluators_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluatorSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add an evaluator",
        "tags": [
          "evaluators"
        ]
      }
    },
    "/api/v1/projects/{project_id}/evaluators/{evaluator_id}": {
      "delete": {
        "description": "Delete the evaluator and its runs. The scores it wrote stay.",
        "operationId": "delete_evaluator_api_v1_projects__project_id__evaluators__evaluator_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an evaluator",
        "tags": [
          "evaluators"
        ]
      },
      "get": {
        "operationId": "get_evaluator_api_v1_projects__project_id__evaluators__evaluator_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get an evaluator",
        "tags": [
          "evaluators"
        ]
      },
      "patch": {
        "description": "Change the members sent; `config` takes only the fields to change and keeps its `kind`.\nThe result is checked as a create is.",
        "operationId": "update_evaluator_api_v1_projects__project_id__evaluators__evaluator_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluatorPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit an evaluator",
        "tags": [
          "evaluators"
        ]
      }
    },
    "/api/v1/projects/{project_id}/evaluators/{evaluator_id}/budget": {
      "get": {
        "description": "The UTC calendar month so far: settled spend, the reservations of running calls and what\nis left. `monthly_budget_usd` and `remaining_usd` are `null` for an evaluator without one.",
        "operationId": "get_budget_api_v1_projects__project_id__evaluators__evaluator_id__budget_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorBudgetStatusOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get an evaluator's budget",
        "tags": [
          "evaluators"
        ]
      }
    },
    "/api/v1/projects/{project_id}/evaluators/{evaluator_id}/runs": {
      "get": {
        "description": "Newest first; `status` filters. Each run carries the scores it wrote.",
        "operationId": "list_runs_api_v1_projects__project_id__evaluators__evaluator_id__runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "queued",
                    "running",
                    "done",
                    "failed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_EvaluatorRunOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List evaluator runs",
        "tags": [
          "evaluators"
        ]
      }
    },
    "/api/v1/projects/{project_id}/evaluators/{evaluator_id}/test": {
      "post": {
        "description": "Evaluate the trace's last LLM span now and return the scores; no score is stored. A\njudge's call is real spend and counts against the evaluator's budget like a sampled run.",
        "operationId": "test_evaluator_api_v1_projects__project_id__evaluators__evaluator_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluator_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluator Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluatorTestIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalResultOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Test an evaluator on a trace",
        "tags": [
          "evaluators"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments": {
      "get": {
        "description": "Newest first, each with its run count and latest run (one query for the page).",
        "operationId": "list_experiments_api_v1_projects__project_id__experiments_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ExperimentOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List experiments",
        "tags": [
          "experiments"
        ]
      },
      "post": {
        "description": "Check and store an experiment. `409 NAME_TAKEN`; `404` for a dataset, evaluator or prompt\nversion the project lacks or a credential the organization lacks; `422\nEXPERIMENT_MODEL_UNPRICED`, or `VALIDATION_ERROR` for `max_items` over the server's limit.",
        "operationId": "create_experiment_api_v1_projects__project_id__experiments_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExperimentSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add an experiment",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments/{experiment_id}": {
      "get": {
        "operationId": "get_experiment_api_v1_projects__project_id__experiments__experiment_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get an experiment",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments/{experiment_id}/runs": {
      "get": {
        "description": "Newest first, with the totals stored when each run ended (null while unfinished; read\nthe run for live totals).",
        "operationId": "list_runs_api_v1_projects__project_id__experiments__experiment_id__runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ExperimentRunOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List runs",
        "tags": [
          "experiments"
        ]
      },
      "post": {
        "description": "Queue a run; the worker executes it. Send an `Idempotency-Key` to make a retry safe (the\nbody is part of what a retry must repeat). `target_override` runs a prompt-version experiment\nwith another version of the same prompt, same credential and model (`422\nTARGET_OVERRIDE_INVALID` otherwise). `409 RUN_IN_PROGRESS` while another run of the\nexperiment is queued or running.",
        "operationId": "start_run_api_v1_projects__project_id__experiments__experiment_id__runs_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          },
          {
            "description": "Makes a retry of this request safe: it runs once, then is replayed.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[\\x21-\\x7e]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retry of this request safe: it runs once, then is replayed.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RunStart"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run an experiment",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments/{experiment_id}/runs/{run_a}/compare/{run_b}": {
      "get": {
        "description": "Deltas are `b - a`. `404` when either run is not a run of this experiment; `409\nRUN_IN_PROGRESS` while either is queued or running.",
        "operationId": "compare_runs_api_v1_projects__project_id__experiments__experiment_id__runs__run_a__compare__run_b__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_a",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run A",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_b",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run B",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComparisonOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Compare two runs",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments/{experiment_id}/runs/{run_id}": {
      "get": {
        "description": "The run with its totals: stored when it ended, computed from its items while it runs.",
        "operationId": "get_run_api_v1_projects__project_id__experiments__experiment_id__runs__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a run",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/experiments/{experiment_id}/runs/{run_id}/items": {
      "get": {
        "description": "In dataset item order.",
        "operationId": "list_run_items_api_v1_projects__project_id__experiments__experiment_id__runs__run_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "experiment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Experiment Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ExperimentItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a run's items",
        "tags": [
          "experiments"
        ]
      }
    },
    "/api/v1/projects/{project_id}/exports": {
      "get": {
        "description": "Newest first. A finished export's `download_url` is a signed link, so nothing caches this.",
        "operationId": "list_trace_exports_api_v1_projects__project_id__exports_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ExportOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a project's exports",
        "tags": [
          "exports"
        ]
      },
      "post": {
        "description": "Queue an export of the traces matching `filters` (`kind: traces`, the default) or of the\nattribution table of a window (`kind: attribution`, CSV only); `from` and `to` are required.\n\nAn attribution export over more than 24 hours reads the daily rollups, so a metadata key must\nbe promoted in the project settings (`422 KEY_NOT_PROMOTED` otherwise).\n\nAnswers `409 NOT_CONFIGURED` when object storage is not set up. Poll `GET .../exports/{id}`\nuntil `status` is `done`, then download from `download_url`.",
        "operationId": "create_trace_export_api_v1_projects__project_id__exports_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Makes a retry of this request safe: it runs once, then is replayed.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[\\x21-\\x7e]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retry of this request safe: it runs once, then is replayed.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TraceExportIn"
                  },
                  {
                    "$ref": "#/components/schemas/AttributionExportIn"
                  }
                ],
                "title": "Body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Request an export",
        "tags": [
          "exports"
        ]
      }
    },
    "/api/v1/projects/{project_id}/exports/{export_id}": {
      "get": {
        "description": "The export's progress. `download_url` is a link valid for one hour, present once `done`.\n\nAnyone holding that link can download the file until it expires, so nothing caches this.",
        "operationId": "get_trace_export_api_v1_projects__project_id__exports__export_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get one export",
        "tags": [
          "exports"
        ]
      }
    },
    "/api/v1/projects/{project_id}/filters": {
      "get": {
        "operationId": "list_filter_values_api_v1_projects__project_id__filters_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FiltersOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Filter Values",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/cache/purge": {
      "post": {
        "description": "Delete every cached response of the project, whatever key stored it.\n\nIdempotent: purging an empty cache succeeds. The audit event records how many entries went.",
        "operationId": "purge_cache_api_v1_projects__project_id__gateway_cache_purge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Purge the gateway response cache",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/fault-profiles": {
      "get": {
        "description": "By name. `active` says whether a profile can fire now: enabled and not expired.",
        "operationId": "list_profiles_api_v1_projects__project_id__gateway_fault_profiles_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FaultProfileOut"
                  },
                  "title": "Response List Profiles Api V1 Projects  Project Id  Gateway Fault Profiles Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List fault profiles",
        "tags": [
          "gateway"
        ]
      },
      "post": {
        "description": "Omitted `params` are the scenario's defaults; a param that does not belong to the scenario\nis `422` on `params.<name>`. `409 FAULT_PROFILE_NAME_TAKEN` for a name already used in the\nproject, and `422` on `expires_at` for a time that is not in the future.",
        "operationId": "create_profile_api_v1_projects__project_id__gateway_fault_profiles_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaultProfileCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaultProfileOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a fault profile",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/fault-profiles/{profile_id}": {
      "delete": {
        "description": "Delete the profile. Keys that ran it are detached and run no fault.",
        "operationId": "delete_profile_api_v1_projects__project_id__gateway_fault_profiles__profile_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a fault profile",
        "tags": [
          "gateway"
        ]
      },
      "patch": {
        "description": "Change the fields sent; send `null` for `expires_at` to remove the expiry.\n\n`params` must be sent with `scenario`; a `scenario` sent alone resets the params to that\nscenario's defaults.",
        "operationId": "update_profile_api_v1_projects__project_id__gateway_fault_profiles__profile_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaultProfileUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaultProfileOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a fault profile",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/keys": {
      "get": {
        "description": "Newest first, revoked keys included. Unpaginated: a project keeps a handful of keys.",
        "operationId": "list_keys_api_v1_projects__project_id__gateway_keys_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GatewayKeyOut"
                  },
                  "title": "Response List Keys Api V1 Projects  Project Id  Gateway Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List gateway keys",
        "tags": [
          "gateway"
        ]
      },
      "post": {
        "description": "Create the key and return it with its `secret`, which is never shown again.\n\nWithout `route_id` the key uses the project's default route: `422 NO_DEFAULT_ROUTE` when the\nproject has none, and `422` on `route_id` for a route that is not the project's.",
        "operationId": "create_key_api_v1_projects__project_id__gateway_keys_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayKeyCreatedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a gateway key",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/keys/{key_id}": {
      "delete": {
        "description": "Revoke the key. Apps using it get `401` from the next call. Revoking twice is a no-op.",
        "operationId": "revoke_key_api_v1_projects__project_id__gateway_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke a gateway key",
        "tags": [
          "gateway"
        ]
      },
      "patch": {
        "description": "Change the fields sent; send `null` to clear a limit or the cache TTL.\n\n`404` for a revoked key: it can no longer be edited.",
        "operationId": "update_key_api_v1_projects__project_id__gateway_keys__key_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayKeyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayKeyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a gateway key",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/overview": {
      "get": {
        "description": "Requests, errors, cache, fallbacks, latency and usage per target and key.\n\nCounts every call that came through a gateway key, Lab faults included (`faults` says how\nmany). At most 7 days; longer is `422`.",
        "operationId": "overview_api_v1_projects__project_id__gateway_overview_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayOverviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Gateway traffic overview",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/routes": {
      "get": {
        "description": "By name. Unpaginated: a project keeps a handful of routes.",
        "operationId": "list_routes_api_v1_projects__project_id__gateway_routes_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RouteOut"
                  },
                  "title": "Response List Routes Api V1 Projects  Project Id  Gateway Routes Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List gateway routes",
        "tags": [
          "gateway"
        ]
      },
      "post": {
        "description": "Save the route as version 1. The project's first route becomes its default.\n\n`422` on `config.targets.<i>.credential_id` for a credential that is not the organization's;\n`409 ROUTE_NAME_TAKEN` for a name already used in the project.",
        "operationId": "create_route_api_v1_projects__project_id__gateway_routes_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a route",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/routes/{route_id}": {
      "delete": {
        "description": "Delete the route and its history. `409 ROUTE_IN_USE` while a gateway key uses it.",
        "operationId": "delete_route_api_v1_projects__project_id__gateway_routes__route_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a route",
        "tags": [
          "gateway"
        ]
      },
      "get": {
        "operationId": "get_route_api_v1_projects__project_id__gateway_routes__route_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a route",
        "tags": [
          "gateway"
        ]
      },
      "put": {
        "description": "Replace the config, if the route is still at `expected_version`; bumps `version`.\n\n`409 ROUTE_VERSION_CONFLICT` when another save came first: reload and apply the change again.",
        "operationId": "update_route_api_v1_projects__project_id__gateway_routes__route_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save a new version of a route",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/routes/{route_id}/default": {
      "post": {
        "description": "Gateway keys created without a route use the default one. Not a new version.",
        "operationId": "set_default_route_api_v1_projects__project_id__gateway_routes__route_id__default_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Make a route the default",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/routes/{route_id}/revert": {
      "post": {
        "description": "Save the config of `version` again as a new version; the history is never rewritten.\n\n`404` for a version the route never had; `422` when that config names a credential deleted\nsince.",
        "operationId": "revert_route_api_v1_projects__project_id__gateway_routes__route_id__revert_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRevertIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revert a route",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gateway/routes/{route_id}/versions": {
      "get": {
        "description": "Every saved config, newest first. `404` for an unknown route.",
        "operationId": "list_route_versions_api_v1_projects__project_id__gateway_routes__route_id__versions_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "route_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Route Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RouteVersionOut"
                  },
                  "title": "Response List Route Versions Api V1 Projects  Project Id  Gateway Routes  Route Id  Versions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a route's versions",
        "tags": [
          "gateway"
        ]
      }
    },
    "/api/v1/projects/{project_id}/health": {
      "get": {
        "description": "0 to 100 over the window (default the last 24 h); `value` is `null` without LLM calls.",
        "operationId": "get_health_api_v1_projects__project_id__health_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Score the project's health",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights": {
      "get": {
        "description": "Most recently seen first. `status` may repeat; `trace_id` keeps insights citing the trace.",
        "operationId": "list_insights_api_v1_projects__project_id__insights_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/InsightStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "severity",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Severity"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Severity"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "minLength": 1,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "query",
            "name": "trace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "minLength": 1,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trace Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_InsightOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List insights",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/precision": {
      "get": {
        "description": "Right and wrong votes per detector kind, with every kind the project has an insight of.\n\n`precision` is right / n and `wilson_low`/`wilson_high` its Wilson 95 % interval, decimal\nstrings to four places, `null` when the kind has no votes. `meets_target` is precision\n>= 0.8 with `wilson_low` >= 0.6 on n >= 20. `from`/`to` filter on when a vote was last cast\n(default: all time).",
        "operationId": "get_precision_api_v1_projects__project_id__insights_precision_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrecisionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Doctor precision per detector",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/summary": {
      "get": {
        "description": "Open and acknowledged insights by severity, for the navigation badge.",
        "operationId": "insights_summary_api_v1_projects__project_id__insights_summary_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightSummaryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Count the insights to act on",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}": {
      "get": {
        "description": "The insight, its completed explanations, newest first (at most 20), and the feedback:\nthe caller's own vote (`mine`, `null` when they have not voted) and every member's counts.",
        "operationId": "get_insight_api_v1_projects__project_id__insights__insight_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read one insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/acknowledge": {
      "post": {
        "description": "Record that you have seen it. `409 INVALID_TRANSITION` unless it is open.",
        "operationId": "acknowledge_insight_api_v1_projects__project_id__insights__insight_id__acknowledge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Acknowledge an insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/explain": {
      "post": {
        "description": "Claude explains the insight from its evidence; the answer is advisory plain text.\n\nSent with the organization's oldest Anthropic credential and counted against its monthly\nexplain budget. `409 NOT_CONFIGURED` without a credential, `CREDENTIALS_KEYS` or a budget;\n`409 EXPLAIN_MODEL_UNPRICED`; `402 EXPLAIN_BUDGET_EXCEEDED`; `502 EXPLAIN_FAILED`.",
        "operationId": "explain_insight_api_v1_projects__project_id__insights__insight_id__explain_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplanationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ask Claude to explain an insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/feedback": {
      "delete": {
        "description": "`404` when you have no vote on the insight.",
        "operationId": "delete_feedback_api_v1_projects__project_id__insights__insight_id__feedback_delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Withdraw your verdict on an insight",
        "tags": [
          "insights"
        ]
      },
      "put": {
        "description": "Record your verdict (`right` or `wrong`) with an optional note of at most 500 characters,\nreplacing your earlier vote. Allowed on a resolved or muted insight. `404` when the insight\nis not in the project.",
        "operationId": "put_feedback_api_v1_projects__project_id__insights__insight_id__feedback_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Say whether an insight was right",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/mute": {
      "post": {
        "description": "Silence it until `until` (at most 90 days ahead); `422 INVALID_MUTE` otherwise.",
        "operationId": "mute_insight_api_v1_projects__project_id__insights__insight_id__mute_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MuteIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mute an insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/resolve": {
      "post": {
        "description": "Mark it fixed. Detecting the problem again reopens it.",
        "operationId": "resolve_insight_api_v1_projects__project_id__insights__insight_id__resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resolve an insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/unmute": {
      "post": {
        "description": "End a mute early. `409 INVALID_TRANSITION` unless it is muted.",
        "operationId": "unmute_insight_api_v1_projects__project_id__insights__insight_id__unmute_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unmute an insight",
        "tags": [
          "insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/keys": {
      "get": {
        "operationId": "list_keys_api_v1_projects__project_id__keys_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyOut"
                  },
                  "title": "Response List Keys Api V1 Projects  Project Id  Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Keys",
        "tags": [
          "keys"
        ]
      },
      "post": {
        "operationId": "create_key_api_v1_projects__project_id__keys_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/api/v1/projects/{project_id}/keys/{key_id}": {
      "delete": {
        "operationId": "revoke_key_api_v1_projects__project_id__keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/api/v1/projects/{project_id}/metrics/models": {
      "get": {
        "operationId": "models_api_v1_projects__project_id__metrics_models_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ModelMetricsOut"
                  },
                  "title": "Response Models Api V1 Projects  Project Id  Metrics Models Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Models",
        "tags": [
          "metrics"
        ]
      }
    },
    "/api/v1/projects/{project_id}/metrics/overview": {
      "get": {
        "operationId": "overview_api_v1_projects__project_id__metrics_overview_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Overview",
        "tags": [
          "metrics"
        ]
      }
    },
    "/api/v1/projects/{project_id}/metrics/timeseries": {
      "get": {
        "operationId": "timeseries_api_v1_projects__project_id__metrics_timeseries_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "bucket",
            "required": false,
            "schema": {
              "default": "hour",
              "enum": [
                "hour",
                "day"
              ],
              "title": "Bucket",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TimeseriesPointOut"
                  },
                  "title": "Response Timeseries Api V1 Projects  Project Id  Metrics Timeseries Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Timeseries",
        "tags": [
          "metrics"
        ]
      }
    },
    "/api/v1/projects/{project_id}/onboarding": {
      "get": {
        "operationId": "onboarding_status_api_v1_projects__project_id__onboarding_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Onboarding Status",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/playground/replays": {
      "get": {
        "description": "The project's replays, newest first; `trace_id` and `span_id` narrow to one source.",
        "operationId": "list_project_replays_api_v1_projects__project_id__playground_replays_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "trace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trace Id"
            }
          },
          {
            "in": "query",
            "name": "span_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Span Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ReplaySummaryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List replays",
        "tags": [
          "playground"
        ]
      },
      "post": {
        "description": "Send the span's stored request once more with one of the organization's credentials of\nthe same provider, never streamed, `n = 1`, at most 4096 output tokens.\n\n`404` for a span outside the project or a credential outside the organization; `409\nNOT_CONFIGURED` without the gateway runtime, `CREDENTIALS_KEYS` or a replay budget; `422\nREPLAY_*` when the span cannot be replayed as it was; `409 REPLAY_BUDGET_EXCEEDED` (with\n`spent_usd`, `reserved_usd`, `budget_usd` and `month_start`) when the month's budget cannot\ntake the call; `429 RATE_LIMITED` after 30 playground runs a minute per user. A provider\nfailure or a project budget block is the result's `error`, not an HTTP error.",
        "operationId": "run_replay_api_v1_projects__project_id__playground_replays_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Makes a retry of this request safe: it runs once, then is replayed.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[\\x21-\\x7e]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retry of this request safe: it runs once, then is replayed.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replay a stored request",
        "tags": [
          "playground"
        ]
      }
    },
    "/api/v1/projects/{project_id}/playground/replays/budget": {
      "get": {
        "description": "The project's replay budget for the current UTC month: `REPLAY_MONTHLY_BUDGET_USD`, what\nsettled replays cost, what running ones hold, and what is left.",
        "operationId": "read_replay_budget_api_v1_projects__project_id__playground_replays_budget_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayBudgetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read the replay budget",
        "tags": [
          "playground"
        ]
      }
    },
    "/api/v1/projects/{project_id}/playground/runs": {
      "post": {
        "description": "Run 1 to 3 configurations at once and answer with one result each, in order.\n\nA configuration that fails (a provider error, a missing variable) has its `error` and does\nnot affect the others; a project budget that blocks a call is `error = \"BUDGET_EXCEEDED\"`.\nResponses are not streamed, so `ttft_ms` is null. `404` for a credential outside the\norganization or a prompt version outside the project; `409 NOT_CONFIGURED` without the\ngateway runtime or `CREDENTIALS_KEYS`; `429 RATE_LIMITED` after 30 runs a minute per user.",
        "operationId": "run_playground_api_v1_projects__project_id__playground_runs_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Makes a retry of this request safe: it runs once, then is replayed.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[\\x21-\\x7e]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retry of this request safe: it runs once, then is replayed.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaygroundRunIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaygroundRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run prompts in the playground",
        "tags": [
          "playground"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompt-versions/{version_id}": {
      "get": {
        "description": "The version with its prompt's name; `model_config` is the version's model advice.",
        "operationId": "get_prompt_version_api_v1_projects__project_id__prompt_versions__version_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Version Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptVersionByIdOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a prompt version by id",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts": {
      "get": {
        "description": "Most recently changed first, with each prompt's latest version number and labels.",
        "operationId": "list_prompts_api_v1_projects__project_id__prompts_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Name prefix",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Name prefix",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PromptListItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List prompts",
        "tags": [
          "prompts"
        ]
      },
      "post": {
        "description": "Store the prompt with its version 1. `409 NAME_TAKEN`; `422 VALIDATION_ERROR` for a\nmalformed template.",
        "operationId": "create_prompt_api_v1_projects__project_id__prompts_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a prompt",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts/{name}": {
      "delete": {
        "description": "Delete the prompt with all its versions and labels.",
        "operationId": "delete_prompt_api_v1_projects__project_id__prompts__name__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a prompt",
        "tags": [
          "prompts"
        ]
      },
      "get": {
        "description": "The prompt with its latest version and labels.",
        "operationId": "get_prompt_api_v1_projects__project_id__prompts__name__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a prompt",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts/{name}/labels/{label}": {
      "delete": {
        "operationId": "delete_label_api_v1_projects__project_id__prompts__name__labels__label__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "label",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Label",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove a label",
        "tags": [
          "prompts"
        ]
      },
      "put": {
        "description": "Create the label or move it. `422 LABEL_RESERVED` for `latest`; `404` for a version the\nprompt does not have.",
        "operationId": "set_label_api_v1_projects__project_id__prompts__name__labels__label__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "label",
            "required": true,
            "schema": {
              "maxLength": 32,
              "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$",
              "title": "Label",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelSetIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Point a label at a version",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts/{name}/versions": {
      "get": {
        "description": "Newest first.",
        "operationId": "list_versions_api_v1_projects__project_id__prompts__name__versions_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_VersionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List prompt versions",
        "tags": [
          "prompts"
        ]
      },
      "post": {
        "description": "Add the next version. `409 KIND_MISMATCH` when the kind differs from the prompt's;\n`409 NO_CHANGES` when nothing differs from the latest version; `429 RATE_LIMITED` after 100\nversions of the prompt in a UTC day (`Retry-After` is the time to midnight).",
        "operationId": "create_version_api_v1_projects__project_id__prompts__name__versions_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a prompt version",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts/{name}/versions/{version}": {
      "get": {
        "operationId": "get_version_api_v1_projects__project_id__prompts__name__versions__version__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "title": "Version",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a prompt version",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prompts/{name}/versions/{version}/usage": {
      "get": {
        "description": "Traces, LLM calls, cost and p95 latency of the calls that used the version, last 7 days.",
        "operationId": "get_version_usage_api_v1_projects__project_id__prompts__name__versions__version__usage_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 129,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "title": "Version",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionUsageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a prompt version's usage",
        "tags": [
          "prompts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/provider-incidents": {
      "get": {
        "description": "Incidents that overlap the window, newest first by `(started_at, id)`.\n\nAn incident overlaps `[from, to)` when it started before `to` and had not been resolved by\n`from` (an open one has not ended). `api_only` (default true) keeps the incidents that touch\nthe providers' APIs. `sources` is every feed's poll state, and `polling` says whether this\nserver polls the feeds at all (`PROVIDER_STATUS_POLLING_ENABLED`).",
        "operationId": "list_provider_incidents_api_v1_projects__project_id__provider_incidents_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "anthropic",
                    "openai",
                    "google"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "in": "query",
            "name": "api_only",
            "required": false,
            "schema": {
              "default": true,
              "title": "Api Only",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentListOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Provider incidents",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/projects/{project_id}/providers/errors/samples": {
      "get": {
        "description": "The newest failed llm calls, with their provider error fields, newest first.\n\nA window longer than 24 hours is cut to its last 24 hours and the answer says\n`clamped: true`. `422 VALIDATION_ERROR` for an unknown error class or rate-limit kind.",
        "operationId": "get_error_samples_api_v1_projects__project_id__providers_errors_samples_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "in": "query",
            "name": "error_class",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ErrorClass"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Class"
            }
          },
          {
            "in": "query",
            "name": "rate_limit_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RateLimitKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rate Limit Kind"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SamplesPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sample failed calls",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/projects/{project_id}/providers/errors/timeseries": {
      "get": {
        "description": "Failed llm calls per UTC bucket and error class, one bucket per hour or day from the one\nholding `from` up to `to`; classes with no failures are absent.\n\nPart of the provider health page, so it does not count a use of its own.",
        "operationId": "get_error_timeseries_api_v1_projects__project_id__providers_errors_timeseries_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bucket",
            "required": false,
            "schema": {
              "default": "hour",
              "enum": [
                "hour",
                "day"
              ],
              "title": "Bucket",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ErrorBucketOut"
                  },
                  "title": "Response Get Error Timeseries Api V1 Projects  Project Id  Providers Errors Timeseries Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Errors by class over time",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/projects/{project_id}/providers/health": {
      "get": {
        "description": "llm calls, failures by error class, 429 kinds, retries and status page incidents per\nprovider seen in the window, busiest first.\n\n`error_rate` is a decimal string, null without calls. `retry_cost_usd` is null when any trace\nof the provider has an unknown retry cost (`retry_cost_unknown`); `retry_cost_note` says how\nretries are attributed. `approximate` is true when whole hours were read from the hourly\nrollups.",
        "operationId": "get_health_api_v1_projects__project_id__providers_health_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthReportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Provider health",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/projects/{project_id}/releases": {
      "get": {
        "operationId": "list_releases_api_v1_projects__project_id__releases_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReleaseStats"
                  },
                  "title": "Response List Releases Api V1 Projects  Project Id  Releases Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Releases",
        "tags": [
          "releases"
        ]
      }
    },
    "/api/v1/projects/{project_id}/releases/compare": {
      "get": {
        "operationId": "compare_releases_api_v1_projects__project_id__releases_compare_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "a",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\x00]*$",
              "title": "A",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "b",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\x00]*$",
              "title": "B",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comparison"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Compare Releases",
        "tags": [
          "releases"
        ]
      }
    },
    "/api/v1/projects/{project_id}/releases/failure-categories": {
      "get": {
        "description": "The rate of each failure category per release, with Wilson 95 % bounds, over the traces a\nperson reviewed. `404 NOT_FOUND` until the project has a `failure_category` score config.",
        "operationId": "failure_category_rates_api_v1_projects__project_id__releases_failure_categories_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "pattern": "^[^\\x00]*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureCategoriesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Failure Category Rates",
        "tags": [
          "releases"
        ]
      }
    },
    "/api/v1/projects/{project_id}/review-policy": {
      "delete": {
        "description": "Delete the policy; the selection history stays.",
        "operationId": "delete_policy_api_v1_projects__project_id__review_policy_delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete the review policy",
        "tags": [
          "review"
        ]
      },
      "get": {
        "description": "The project's policy with its next run and last selection. `404` when it has none.",
        "operationId": "get_policy_api_v1_projects__project_id__review_policy_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewPolicyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the review policy",
        "tags": [
          "review"
        ]
      },
      "put": {
        "description": "Create or replace the policy; omitted fields take their defaults. `404` when the queue\nis not this project's, `422 QUEUE_LACKS_FAILURE_CATEGORY`, `422 NOTHING_SELECTED`.",
        "operationId": "put_policy_api_v1_projects__project_id__review_policy_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewPolicyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewPolicyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set the review policy",
        "tags": [
          "review"
        ]
      }
    },
    "/api/v1/projects/{project_id}/review-policy/runs": {
      "post": {
        "description": "Queue the selection of a completed UTC day, yesterday to 7 days back.\n`422 DAY_NOT_COMPLETE`, `422 DAY_TOO_OLD`, `409 ALREADY_SELECTED`.",
        "operationId": "request_run_api_v1_projects__project_id__review_policy_runs_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunRequestedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Select a day now",
        "tags": [
          "review"
        ]
      }
    },
    "/api/v1/projects/{project_id}/review-policy/selections": {
      "get": {
        "description": "Newest day first; the history outlives the policy and its queue (`queue_id` is null\nonce the queue is gone).",
        "operationId": "list_selections_api_v1_projects__project_id__review_policy_selections_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 30,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_SelectionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List selections",
        "tags": [
          "review"
        ]
      }
    },
    "/api/v1/projects/{project_id}/score-configs": {
      "get": {
        "description": "By name. Unpaginated: a project holds at most 500 score configs.",
        "operationId": "list_score_configs_api_v1_projects__project_id__score_configs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ScoreConfigOut"
                  },
                  "title": "Response List Score Configs Api V1 Projects  Project Id  Score Configs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List score configs",
        "tags": [
          "scores"
        ]
      },
      "post": {
        "description": "Define a score name. `409 NAME_TAKEN` when the name has a config, including one the\nfirst score created: edit that one instead.",
        "operationId": "create_score_config_api_v1_projects__project_id__score_configs_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreConfigSpec"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreConfigOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add a score config",
        "tags": [
          "scores"
        ]
      }
    },
    "/api/v1/projects/{project_id}/score-configs/failure-category": {
      "post": {
        "description": "Create the categorical `failure_category` config with the categories sent, in that\norder (2 to 30, distinct, `none` included). `409 NAME_TAKEN` when the project has one:\nedit its list with `PATCH /score-configs/{config_id}`.",
        "operationId": "create_failure_category_api_v1_projects__project_id__score_configs_failure_category_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FailureCategoriesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreConfigOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add the failure-category config",
        "tags": [
          "scores"
        ]
      }
    },
    "/api/v1/projects/{project_id}/score-configs/{config_id}": {
      "delete": {
        "description": "`409 SCORE_CONFIG_IN_USE` while scores carry the name or a review queue asks for it.",
        "operationId": "delete_score_config_api_v1_projects__project_id__score_configs__config_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a score config",
        "tags": [
          "scores"
        ]
      },
      "patch": {
        "description": "Change the description, range or categories; the config becomes explicit. A new\n`data_type` is `409 SCORE_CONFIG_IN_USE` once scores use the name. New bounds apply to new\nscores only.",
        "operationId": "update_score_config_api_v1_projects__project_id__score_configs__config_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreConfigPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreConfigOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a score config",
        "tags": [
          "scores"
        ]
      }
    },
    "/api/v1/projects/{project_id}/scores/{score_id}": {
      "delete": {
        "description": "Your own human score, or any score as an admin; `403 FORBIDDEN` otherwise.",
        "operationId": "delete_trace_score_api_v1_projects__project_id__scores__score_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a score",
        "tags": [
          "scores"
        ]
      }
    },
    "/api/v1/projects/{project_id}/sessions": {
      "get": {
        "operationId": "list_sessions_api_v1_projects__project_id__sessions_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_SessionSummaryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sessions",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/telemetry-completeness": {
      "get": {
        "description": "Spans stored in the window against the spans counted as lost: by the gateway, rejected at\ningest, and dropped or failed in the SDK.\n\n`completeness` is `stored / (stored + every loss)` as a decimal string to four places,\nrounded down; null when nothing was stored and nothing lost. Losses are counted per hour, so\nan hour that only partly overlaps the window counts whole. `lower_bound` is true when both\nSDK `failed` and ingest rejections were counted, since a span the server rejected may be in\nboth. Counts above 2^53 - 1 are sent as 2^53 - 1.",
        "operationId": "get_telemetry_completeness_api_v1_projects__project_id__telemetry_completeness_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletenessOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Telemetry completeness",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces": {
      "get": {
        "operationId": "list_traces_api_v1_projects__project_id__traces_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment"
            }
          },
          {
            "in": "query",
            "name": "release",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Release"
            }
          },
          {
            "in": "query",
            "name": "model",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "ok",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "error_class",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ErrorClass"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Class"
            }
          },
          {
            "in": "query",
            "name": "prompt_version_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Prompt Version Id"
            }
          },
          {
            "in": "query",
            "name": "score_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Score Name"
            }
          },
          {
            "in": "query",
            "name": "score_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Score Min"
            }
          },
          {
            "in": "query",
            "name": "score_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Score Max"
            }
          },
          {
            "in": "query",
            "name": "score_value",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Score Value"
            }
          },
          {
            "in": "query",
            "name": "has_scores",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Has Scores"
            }
          },
          {
            "in": "query",
            "name": "has_retries",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Has Retries"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "in": "query",
            "name": "metadata_key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^[a-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metadata Key"
            }
          },
          {
            "in": "query",
            "name": "metadata_value",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metadata Value"
            }
          },
          {
            "description": "Matches the trace name (substring, ignoring case), an exact trace id, or, with 3+ characters, a preview of the input and output of a span started in the window.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Matches the trace name (substring, ignoring case), an exact trace id, or, with 3+ characters, a preview of the input and output of a span started in the window.",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "started_at",
              "enum": [
                "started_at",
                "retry_cost_usd"
              ],
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TraceSummaryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "description": "A parameter is invalid (`VALIDATION_ERROR`), or a `q` search matched too much to finish (`SEARCH_TOO_BROAD`)."
          }
        },
        "summary": "List Traces",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/compare": {
      "get": {
        "description": "Two traces of this project, step by step: B's change against A.\n\nRegistered before `/traces/{trace_id}`, which would otherwise take `compare` as an id. A\nmissing trace is a 404 that does not say which one, as trace detail's.",
        "operationId": "compare_traces_api_v1_projects__project_id__traces_compare_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "a",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "A",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "b",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "B",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceCompareOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Compare Traces",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/{trace_id}": {
      "get": {
        "operationId": "get_trace_api_v1_projects__project_id__traces__trace_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Trace",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/{trace_id}/scores": {
      "get": {
        "description": "Every score of the trace, latest first (at most 1000). A score may name a trace that has\nnot arrived yet, so an unknown trace lists its scores too.",
        "operationId": "list_trace_scores_api_v1_projects__project_id__traces__trace_id__scores_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ScoreOut"
                  },
                  "title": "Response List Trace Scores Api V1 Projects  Project Id  Traces  Trace Id  Scores Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a trace's scores",
        "tags": [
          "scores"
        ]
      },
      "post": {
        "description": "Add a `human` score by the caller. `404` when the trace is not in the project; `422\nVALIDATION_ERROR` when the score does not fit its name's config. A first score with a new\nname creates its config.\n\n`id` makes a retry idempotent: when a score with that id already exists in the project,\nnothing is written and the stored score is returned as it is, even if it belongs to another\ntrace or author.",
        "operationId": "create_trace_score_api_v1_projects__project_id__traces__trace_id__scores_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Score a trace",
        "tags": [
          "scores"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/{trace_id}/spans/{span_id}": {
      "get": {
        "description": "One span with its payloads: what trace detail leaves out past its payload budget.",
        "operationId": "get_span_api_v1_projects__project_id__traces__trace_id__spans__span_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "span_id",
            "required": true,
            "schema": {
              "title": "Span Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Span",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/{trace_id}/spans/{span_id}/cost-explanation": {
      "get": {
        "description": "Explains a span's stored cost, one line per token class and fee.\n\nEach line has its quantity, rate, tier factor and amount, and the recomputed total is shown\nbeside the stored one with a status that compares them. The figure is rebuilt from the price\nrow the span was priced with, never from today's prices. `404 NOT_FOUND` when the span is not\nvisible in the project.",
        "operationId": "get_cost_explanation_api_v1_projects__project_id__traces__trace_id__spans__span_id__cost_explanation_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "span_id",
            "required": true,
            "schema": {
              "title": "Span Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostExplanationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Explain a span's cost",
        "tags": [
          "traces"
        ]
      }
    },
    "/api/v1/projects/{project_id}/traces/{trace_id}/spans/{span_id}/replay-source": {
      "get": {
        "description": "Classify the span without calling a provider: its fidelity, surface, the credential\nfamily it needs and the stored request, or the refusal and its reason; plus its last ten\nreplays. `404` when the span is not in the project.",
        "operationId": "read_replay_source_api_v1_projects__project_id__traces__trace_id__spans__span_id__replay_source_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "title": "Trace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "span_id",
            "required": true,
            "schema": {
              "title": "Span Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplaySourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read what a replay of a span would send",
        "tags": [
          "playground"
        ]
      }
    },
    "/api/v1/projects/{project_id}/unpriced-models": {
      "get": {
        "description": "Models with LLM usage in the window whose calls got no cost for want of a price.",
        "operationId": "get_unpriced_models_api_v1_projects__project_id__unpriced_models_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UnpricedModelOut"
                  },
                  "title": "Response Get Unpriced Models Api V1 Projects  Project Id  Unpriced Models Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Unpriced Models",
        "tags": [
          "prices"
        ]
      }
    },
    "/api/v1/projects/{project_id}/users": {
      "get": {
        "operationId": "list_users_api_v1_projects__project_id__users_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "cost",
              "enum": [
                "cost",
                "errors",
                "traces"
              ],
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Users",
        "tags": [
          "users"
        ]
      }
    },
    "/api/v1/projects/{project_id}/users/{external_user_id}": {
      "get": {
        "operationId": "user_detail_api_v1_projects__project_id__users__external_user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "external_user_id",
            "required": true,
            "schema": {
              "maxLength": 257,
              "minLength": 1,
              "pattern": "^[^\\x00]*$",
              "title": "External User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "User Detail",
        "tags": [
          "users"
        ]
      }
    },
    "/gw/v1/chat/completions": {
      "post": {
        "description": "OpenAI Chat Completions through the key's route; streams when `stream` is true.",
        "operationId": "chat_completions_gw_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "model"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Chat Completions",
        "tags": [
          "gateway"
        ]
      }
    },
    "/gw/v1/messages": {
      "post": {
        "description": "Anthropic Messages through the key's route; streams when `stream` is true.",
        "operationId": "messages_gw_v1_messages_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "model"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Messages",
        "tags": [
          "gateway"
        ]
      }
    },
    "/gw/v1/models": {
      "get": {
        "description": "The models the key can ask for, in the OpenAI shape or, with `anthropic-version`, the\nAnthropic one. Records no span and counts no tokens.",
        "operationId": "models_gw_v1_models_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Models",
        "tags": [
          "gateway"
        ]
      }
    },
    "/gw/v1/responses": {
      "post": {
        "description": "OpenAI Responses through the key's route; streams when `stream` is true.",
        "operationId": "responses_gw_v1_responses_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "model"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Responses",
        "tags": [
          "gateway"
        ]
      }
    },
    "/health/live": {
      "get": {
        "operationId": "live_health_live_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Live Health Live Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Live",
        "tags": [
          "health"
        ]
      }
    },
    "/health/ready": {
      "get": {
        "operationId": "ready_health_ready_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ready",
        "tags": [
          "health"
        ]
      }
    },
    "/v1/otlp/traces": {
      "post": {
        "operationId": "ingest_otlp_v1_otlp_traces_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ingest Otlp",
        "tags": [
          "ingest"
        ]
      }
    },
    "/v1/prompts/{name}": {
      "get": {
        "operationId": "read_prompt_v1_prompts__name__get",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "in": "header",
            "name": "if-none-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptReadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "304": {
            "description": "The cached version is still the one served."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read a prompt version",
        "tags": [
          "prompts"
        ]
      }
    },
    "/v1/scores": {
      "post": {
        "description": "Store a batch of 1 to 1000 scores. The body is read after the key is checked, bounded\nlike span ingestion and may be gzip or deflate encoded.",
        "operationId": "ingest_scores_v1_scores_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "scores": {
                    "items": {},
                    "maxItems": 1000,
                    "minItems": 1,
                    "title": "Scores",
                    "type": "array"
                  }
                },
                "required": [
                  "scores"
                ],
                "title": "ScoreBatchIn",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreIngestResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ingest Scores",
        "tags": [
          "scores"
        ]
      }
    },
    "/v1/traces": {
      "post": {
        "operationId": "ingest_native_v1_traces_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ingest Native",
        "tags": [
          "ingest"
        ]
      }
    }
  }
}
