{
  "components": {
    "schemas": {
      "AdminUserDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "deactivated": {
            "type": "boolean"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isAdmin": {
            "type": "boolean"
          },
          "issuer": {
            "description": "The issuer URL of the sign-in provider the account belongs to",
            "type": "string"
          },
          "lastLoginAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "picture": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "description": "The name of the sign-in provider the account belongs to, or the issuer's host when no configured provider has its issuer",
            "type": "string"
          },
          "workspaceCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "picture",
          "issuer",
          "provider",
          "isAdmin",
          "deactivated",
          "workspaceCount",
          "createdAt",
          "lastLoginAt"
        ],
        "type": "object"
      },
      "AdminWorkspaceDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "memberCount": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "ownerEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownerName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "memberCount",
          "ownerId",
          "ownerName",
          "ownerEmail"
        ],
        "type": "object"
      },
      "ApiTokenDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "createdBy": {
            "description": "Name or email address of the user whose role the token acts with",
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "lastUsedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "lastUsedAt",
          "expiresAt",
          "createdBy"
        ],
        "type": "object"
      },
      "AppliedOp": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "flags": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "op": {
            "enum": [
              "add_learning",
              "update_learning",
              "retire_learning",
              "upsert_script",
              "delete_script",
              "set_setup",
              "set_dockerfile",
              "propose_main",
              "update_main",
              "set_verify"
            ],
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "enum": [
              "applied",
              "held",
              "rejected"
            ],
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "test": {
            "$ref": "#/components/schemas/OpTest"
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "when": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "op",
          "rationale",
          "id",
          "kind",
          "text",
          "when",
          "name",
          "content"
        ],
        "type": "object"
      },
      "ArtifactDto": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "size"
        ],
        "type": "object"
      },
      "AuthDto": {
        "additionalProperties": false,
        "properties": {
          "callbackUrl": {
            "description": "Where the authorization server sends the browser back to, which an OAuth client configured by hand must allow",
            "type": "string"
          },
          "expiresAt": {
            "description": "When the current access token expires",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "loggedInAt": {
            "description": "When the OAuth login was made, also set once it expired",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "refreshable": {
            "description": "The login has a refresh token, so it outlives its access token",
            "type": "boolean"
          },
          "status": {
            "description": "unsupported: no login needed or possible, unknown: OAuth detection hasn't succeeded yet, bearer_token: an Authorization header is configured, not_logged_in: the server advertises OAuth but has no usable login, oauth: logged in",
            "enum": [
              "unsupported",
              "unknown",
              "bearer_token",
              "not_logged_in",
              "oauth"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "loggedInAt",
          "expiresAt",
          "refreshable"
        ],
        "type": "object"
      },
      "Body": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "Capabilities": {
        "additionalProperties": false,
        "properties": {
          "limits": {
            "$ref": "#/components/schemas/LimitSet"
          },
          "networks": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "separateUsers": {
            "type": "boolean"
          }
        },
        "required": [
          "networks",
          "separateUsers",
          "limits"
        ],
        "type": "object"
      },
      "Caps": {
        "additionalProperties": false,
        "properties": {
          "context": {
            "format": "int64",
            "type": "integer"
          },
          "jsonSchema": {
            "type": "boolean"
          },
          "parallelTools": {
            "type": "boolean"
          },
          "promptCache": {
            "type": "boolean"
          },
          "reasoning": {
            "type": "boolean"
          },
          "tools": {
            "type": "boolean"
          },
          "vision": {
            "type": "boolean"
          }
        },
        "required": [
          "tools",
          "parallelTools",
          "reasoning",
          "jsonSchema",
          "promptCache",
          "vision",
          "context"
        ],
        "type": "object"
      },
      "CatalogEntryDto": {
        "additionalProperties": false,
        "properties": {
          "caps": {
            "$ref": "#/components/schemas/Caps"
          },
          "label": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          }
        },
        "required": [
          "model",
          "label",
          "price",
          "caps"
        ],
        "type": "object"
      },
      "CheaperJob": {
        "additionalProperties": false,
        "properties": {
          "dropPct": {
            "format": "double",
            "type": "number"
          },
          "firstCost": {
            "format": "int64",
            "type": "integer"
          },
          "jobId": {
            "type": "string"
          },
          "jobName": {
            "type": "string"
          },
          "recentCost": {
            "format": "int64",
            "type": "integer"
          },
          "runs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "jobId",
          "jobName",
          "firstCost",
          "recentCost",
          "dropPct",
          "runs"
        ],
        "type": "object"
      },
      "CompileInputBody": {
        "additionalProperties": false,
        "properties": {
          "instruction": {
            "maxLength": 20000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "instruction"
        ],
        "type": "object"
      },
      "Content": {
        "additionalProperties": false,
        "properties": {
          "dockerfile": {
            "type": [
              "string",
              "null"
            ]
          },
          "learnings": {
            "items": {
              "$ref": "#/components/schemas/Learning"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "main": {
            "type": [
              "string",
              "null"
            ]
          },
          "setup": {
            "type": [
              "string",
              "null"
            ]
          },
          "toolkit": {
            "items": {
              "$ref": "#/components/schemas/Script"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "verify": {}
        },
        "required": [
          "learnings",
          "toolkit",
          "dockerfile",
          "setup",
          "main"
        ],
        "type": "object"
      },
      "Cookie": {
        "additionalProperties": false,
        "properties": {
          "Domain": {
            "type": "string"
          },
          "Expires": {
            "format": "date-time",
            "type": "string"
          },
          "HttpOnly": {
            "type": "boolean"
          },
          "MaxAge": {
            "format": "int64",
            "type": "integer"
          },
          "Name": {
            "type": "string"
          },
          "Partitioned": {
            "type": "boolean"
          },
          "Path": {
            "type": "string"
          },
          "Quoted": {
            "type": "boolean"
          },
          "Raw": {
            "type": "string"
          },
          "RawExpires": {
            "type": "string"
          },
          "SameSite": {
            "format": "int64",
            "type": "integer"
          },
          "Secure": {
            "type": "boolean"
          },
          "Unparsed": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "Value": {
            "type": "string"
          }
        },
        "required": [
          "Name",
          "Value",
          "Quoted",
          "Path",
          "Domain",
          "Expires",
          "RawExpires",
          "MaxAge",
          "Secure",
          "HttpOnly",
          "SameSite",
          "Partitioned",
          "Raw",
          "Unparsed"
        ],
        "type": "object"
      },
      "CreateInputBody": {
        "additionalProperties": false,
        "properties": {
          "expiresAt": {
            "description": "Unix milliseconds; omit for a token that never expires",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateInputBody1": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "maxLength": 65536,
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "CreateInviteInputBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Invites this address, whose owner joins at once when they have signed in before; omit it for an invite link",
            "maxLength": 320,
            "type": "string"
          },
          "expiresInDays": {
            "default": 7,
            "format": "int64",
            "maximum": 30,
            "minimum": 1,
            "type": "integer"
          },
          "role": {
            "enum": [
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "role",
          "expiresInDays"
        ],
        "type": "object"
      },
      "CreateInviteOutputBody": {
        "additionalProperties": false,
        "properties": {
          "memberAdded": {
            "description": "Whether the address belonged to a user, who joined right away",
            "type": "boolean"
          },
          "url": {
            "description": "The invite link, shown once",
            "type": "string"
          }
        },
        "required": [
          "memberAdded"
        ],
        "type": "object"
      },
      "CreateModelInputBody": {
        "additionalProperties": false,
        "properties": {
          "caps": {
            "$ref": "#/components/schemas/Caps"
          },
          "label": {
            "maxLength": 100,
            "type": "string"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "providerId": {
            "type": "string"
          }
        },
        "required": [
          "providerId",
          "model",
          "price",
          "caps"
        ],
        "type": "object"
      },
      "CreateOutputBody": {
        "additionalProperties": false,
        "properties": {
          "apiToken": {
            "$ref": "#/components/schemas/ApiTokenDto"
          },
          "token": {
            "description": "Shown once, store it now",
            "type": "string"
          }
        },
        "required": [
          "token",
          "apiToken"
        ],
        "type": "object"
      },
      "CreateProviderInputBody": {
        "additionalProperties": false,
        "properties": {
          "apiKey": {
            "maxLength": 1000,
            "type": "string"
          },
          "baseUrl": {
            "maxLength": 500,
            "type": "string"
          },
          "kind": {
            "enum": [
              "anthropic",
              "openai",
              "fake"
            ],
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "type": "object"
      },
      "CreateProviderOutputBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "sync": {
            "$ref": "#/components/schemas/SyncResult"
          }
        },
        "required": [
          "id",
          "sync"
        ],
        "type": "object"
      },
      "DayBucket": {
        "additionalProperties": false,
        "properties": {
          "cancelled": {
            "format": "int64",
            "type": "integer"
          },
          "cost": {
            "format": "int64",
            "type": "integer"
          },
          "day": {
            "description": "Start of the bucket in unix milliseconds, a UTC day or, for the 24h range, an hour",
            "format": "int64",
            "type": "integer"
          },
          "failed": {
            "format": "int64",
            "type": "integer"
          },
          "other": {
            "format": "int64",
            "type": "integer"
          },
          "skipped": {
            "format": "int64",
            "type": "integer"
          },
          "succeeded": {
            "format": "int64",
            "type": "integer"
          },
          "timedOut": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "succeeded",
          "failed",
          "cancelled",
          "timedOut",
          "skipped",
          "other",
          "cost"
        ],
        "type": "object"
      },
      "DeltaDto": {
        "additionalProperties": false,
        "properties": {
          "callId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "EndDto": {
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "EventDto": {
        "additionalProperties": false,
        "properties": {
          "ms": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "parentSpanId": {
            "type": [
              "string",
              "null"
            ]
          },
          "payload": {},
          "seq": {
            "format": "int64",
            "type": "integer"
          },
          "spanId": {
            "type": [
              "string",
              "null"
            ]
          },
          "ts": {
            "format": "int64",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "seq",
          "ts",
          "type",
          "spanId",
          "parentSpanId",
          "ms",
          "payload"
        ],
        "type": "object"
      },
      "FieldError": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "code",
          "message"
        ],
        "type": "object"
      },
      "GetOutputBody": {
        "additionalProperties": false,
        "properties": {
          "baseDigest": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "digest": {
            "type": [
              "string",
              "null"
            ]
          },
          "dockerfile": {
            "type": "string"
          },
          "dockerfileHash": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "log": {
            "type": "string"
          },
          "ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "startedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "dockerfile",
          "log",
          "id",
          "dockerfileHash",
          "status",
          "ref",
          "digest",
          "baseDigest",
          "sizeBytes",
          "error",
          "createdAt",
          "startedAt",
          "finishedAt"
        ],
        "type": "object"
      },
      "IOField": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "IdOutputBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "ImageDto": {
        "additionalProperties": false,
        "properties": {
          "baseDigest": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "digest": {
            "type": [
              "string",
              "null"
            ]
          },
          "dockerfileHash": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "startedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "dockerfileHash",
          "status",
          "ref",
          "digest",
          "baseDigest",
          "sizeBytes",
          "error",
          "createdAt",
          "startedAt",
          "finishedAt"
        ],
        "type": "object"
      },
      "ImageIDOutputBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "InfoOutputBody": {
        "additionalProperties": false,
        "properties": {
          "allowPrivateNetworkTargets": {
            "type": "boolean"
          },
          "database": {
            "type": "string"
          },
          "sandbox": {
            "$ref": "#/components/schemas/SandboxInfo"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "database",
          "allowPrivateNetworkTargets"
        ],
        "type": "object"
      },
      "InviteDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "email": {
            "description": "The address an email invite waits for, empty for an invite link",
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "invitedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "enum": [
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "invitedBy",
          "createdAt",
          "expiresAt"
        ],
        "type": "object"
      },
      "InvitePreviewOutputBody": {
        "additionalProperties": false,
        "properties": {
          "alreadyMember": {
            "type": "boolean"
          },
          "expired": {
            "type": "boolean"
          },
          "expiresAt": {
            "format": "int64",
            "type": "integer"
          },
          "invitedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "enum": [
              "admin",
              "member"
            ],
            "type": "string"
          },
          "workspaceName": {
            "type": "string"
          }
        },
        "required": [
          "workspaceName",
          "role",
          "invitedBy",
          "expiresAt",
          "expired",
          "alreadyMember"
        ],
        "type": "object"
      },
      "JobCost": {
        "additionalProperties": false,
        "properties": {
          "cost": {
            "format": "int64",
            "type": "integer"
          },
          "day": {
            "description": "Start of the bucket in unix milliseconds, like DayBucket.day",
            "format": "int64",
            "type": "integer"
          },
          "jobId": {
            "type": "string"
          },
          "jobName": {
            "type": "string"
          }
        },
        "required": [
          "day",
          "jobId",
          "jobName",
          "cost"
        ],
        "type": "object"
      },
      "JobDto": {
        "additionalProperties": false,
        "properties": {
          "allowPrivateNetwork": {
            "type": "boolean"
          },
          "allowedDomains": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "concurrency": {
            "type": "string"
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "cron": {
            "type": [
              "string",
              "null"
            ]
          },
          "demoted": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "graduatedVersion": {
            "description": "The playbook version the job last graduated to Scripted mode at",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "hasWebhookToken": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "instruction": {
            "type": "string"
          },
          "lastRun": {
            "$ref": "#/components/schemas/LastRun"
          },
          "limits": {
            "$ref": "#/components/schemas/LimitOverrides"
          },
          "modePin": {
            "type": [
              "string",
              "null"
            ]
          },
          "modelId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "network": {
            "enum": [
              "none",
              "internet",
              "allowlist"
            ],
            "type": "string"
          },
          "nextMode": {
            "enum": [
              "explore",
              "assisted",
              "scripted"
            ],
            "type": "string"
          },
          "nextRunAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "playbookVersion": {
            "format": "int64",
            "type": "integer"
          },
          "runAsRoot": {
            "type": "boolean"
          },
          "selfImprove": {
            "type": "boolean"
          },
          "spec": {
            "$ref": "#/components/schemas/Spec"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "instruction",
          "spec",
          "modelId",
          "image",
          "network",
          "allowedDomains",
          "allowPrivateNetwork",
          "runAsRoot",
          "limits",
          "selfImprove",
          "modePin",
          "concurrency",
          "cron",
          "timezone",
          "nextRunAt",
          "enabled",
          "playbookVersion",
          "hasWebhookToken",
          "createdAt",
          "updatedAt",
          "lastRun",
          "demoted",
          "graduatedVersion"
        ],
        "type": "object"
      },
      "JobFields": {
        "additionalProperties": false,
        "properties": {
          "allowPrivateNetwork": {
            "type": "boolean"
          },
          "allowedDomains": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": [
              "array",
              "null"
            ]
          },
          "concurrency": {
            "enum": [
              "skip",
              "queue",
              "parallel"
            ],
            "type": "string"
          },
          "cron": {
            "maxLength": 100,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "image": {
            "maxLength": 500,
            "type": "string"
          },
          "instruction": {
            "maxLength": 20000,
            "minLength": 1,
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/LimitOverrides"
          },
          "modePin": {
            "enum": [
              "explore",
              "assisted",
              "scripted"
            ],
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "network": {
            "enum": [
              "none",
              "internet",
              "allowlist"
            ],
            "type": "string"
          },
          "runAsRoot": {
            "type": "boolean"
          },
          "selfImprove": {
            "type": "boolean"
          },
          "spec": {
            "$ref": "#/components/schemas/Spec"
          },
          "timezone": {
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "name",
          "instruction"
        ],
        "type": "object"
      },
      "JobListDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "cron": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "inputs": {
            "description": "The run inputs the job declares, the same as spec.inputs of the job",
            "items": {
              "$ref": "#/components/schemas/IOField"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "lastMode": {
            "description": "The mode the latest run used, which can differ from nextMode once the playbook changed",
            "type": [
              "string",
              "null"
            ]
          },
          "lastRun": {
            "$ref": "#/components/schemas/LastRun",
            "description": "The latest run, the same as the first of recentRuns"
          },
          "modePin": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "nextMode": {
            "description": "The mode the next run starts in, which the mode pin can force",
            "enum": [
              "explore",
              "assisted",
              "scripted"
            ],
            "type": "string"
          },
          "nextRunAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "recentRuns": {
            "description": "The job's latest runs, at most 10, newest first",
            "items": {
              "$ref": "#/components/schemas/LastRun"
            },
            "maxItems": 10,
            "type": [
              "array",
              "null"
            ]
          },
          "runCount": {
            "format": "int64",
            "type": "integer"
          },
          "scheduleHuman": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "cron",
          "timezone",
          "scheduleHuman",
          "nextRunAt",
          "enabled",
          "modePin",
          "createdAt",
          "updatedAt",
          "lastRun",
          "lastMode",
          "runCount",
          "recentRuns",
          "nextMode",
          "inputs"
        ],
        "type": "object"
      },
      "JobPatch": {
        "additionalProperties": false,
        "properties": {
          "allowPrivateNetwork": {
            "type": "boolean"
          },
          "allowedDomains": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "concurrency": {
            "enum": [
              "skip",
              "queue",
              "parallel"
            ],
            "type": "string"
          },
          "cron": {
            "maxLength": 100,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "image": {
            "maxLength": 500,
            "type": "string"
          },
          "instruction": {
            "maxLength": 20000,
            "minLength": 1,
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/LimitOverrides"
          },
          "modePin": {
            "enum": [
              "explore",
              "assisted",
              "scripted",
              ""
            ],
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "network": {
            "enum": [
              "none",
              "internet",
              "allowlist"
            ],
            "type": "string"
          },
          "runAsRoot": {
            "type": "boolean"
          },
          "selfImprove": {
            "type": "boolean"
          },
          "spec": {
            "$ref": "#/components/schemas/Spec"
          },
          "timezone": {
            "maxLength": 100,
            "type": "string"
          }
        },
        "type": "object"
      },
      "JobRunPoint": {
        "additionalProperties": false,
        "properties": {
          "cost": {
            "format": "int64",
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "msTotal": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "playbookVersion": {
            "format": "int64",
            "type": "integer"
          },
          "queuedAt": {
            "format": "int64",
            "type": "integer"
          },
          "runId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "turns": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "runId",
          "number",
          "queuedAt",
          "status",
          "mode",
          "cost",
          "msTotal",
          "turns",
          "playbookVersion"
        ],
        "type": "object"
      },
      "JobSecret": {
        "additionalProperties": false,
        "properties": {
          "envName": {
            "maxLength": 100,
            "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
            "type": "string"
          },
          "secretId": {
            "type": "string"
          },
          "secretName": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "secretId",
          "envName"
        ],
        "type": "object"
      },
      "JobServer": {
        "additionalProperties": false,
        "properties": {
          "allowedTools": {
            "description": "null exposes all tools",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "serverId": {
            "type": "string"
          },
          "serverName": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "serverId",
          "allowedTools"
        ],
        "type": "object"
      },
      "JobStatsOutputBody": {
        "additionalProperties": false,
        "properties": {
          "avgCost": {
            "format": "int64",
            "type": "integer"
          },
          "p50Ms": {
            "format": "int64",
            "type": "integer"
          },
          "runs": {
            "items": {
              "$ref": "#/components/schemas/JobRunPoint"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "successRate": {
            "format": "double",
            "type": "number"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/VersionMarker"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "runs",
          "versions",
          "successRate",
          "avgCost",
          "p50Ms"
        ],
        "type": "object"
      },
      "LastRun": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "queuedAt": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "queuedAt"
        ],
        "type": "object"
      },
      "LearnOutputBody": {
        "additionalProperties": false,
        "properties": {
          "reflection": {
            "type": "string"
          }
        },
        "required": [
          "reflection"
        ],
        "type": "object"
      },
      "Learning": {
        "additionalProperties": false,
        "properties": {
          "hits": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "enum": [
              "active",
              "retired"
            ],
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "when": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "text",
          "hits",
          "status"
        ],
        "type": "object"
      },
      "LimitOverrides": {
        "additionalProperties": false,
        "properties": {
          "cpus": {
            "format": "double",
            "maximum": 64,
            "minimum": 0.1,
            "type": "number"
          },
          "maxCostUsd": {
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "maxTurns": {
            "format": "int64",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "memoryMb": {
            "format": "int64",
            "maximum": 262144,
            "minimum": 64,
            "type": "integer"
          },
          "pidsLimit": {
            "format": "int64",
            "maximum": 65536,
            "minimum": 16,
            "type": "integer"
          },
          "timeoutSeconds": {
            "format": "int64",
            "maximum": 86400,
            "minimum": 30,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LimitSet": {
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "type": "boolean"
          },
          "memory": {
            "type": "boolean"
          },
          "pids": {
            "type": "boolean"
          }
        },
        "required": [
          "cpu",
          "memory",
          "pids"
        ],
        "type": "object"
      },
      "Limits": {
        "additionalProperties": false,
        "properties": {
          "cpus": {
            "format": "double",
            "maximum": 64,
            "minimum": 0.1,
            "type": "number"
          },
          "maxCostUsd": {
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "maxTurns": {
            "format": "int64",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "memoryMb": {
            "format": "int64",
            "maximum": 262144,
            "minimum": 64,
            "type": "integer"
          },
          "pidsLimit": {
            "format": "int64",
            "maximum": 65536,
            "minimum": 16,
            "type": "integer"
          },
          "timeoutSeconds": {
            "format": "int64",
            "maximum": 86400,
            "minimum": 30,
            "type": "integer"
          }
        },
        "required": [
          "timeoutSeconds",
          "maxTurns",
          "maxCostUsd",
          "cpus",
          "memoryMb",
          "pidsLimit"
        ],
        "type": "object"
      },
      "LoginOutputBody": {
        "additionalProperties": false,
        "properties": {
          "authorizationUrl": {
            "description": "Where to send the browser to log in",
            "type": "string"
          }
        },
        "required": [
          "authorizationUrl"
        ],
        "type": "object"
      },
      "LoginProviderDto": {
        "additionalProperties": false,
        "properties": {
          "icon": {
            "description": "Image URL for the sign-in button, an http(s) URL or a data:image URI",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "primary": {
            "description": "Whether the provider gets the large sign-in button",
            "type": "boolean"
          },
          "type": {
            "description": "How the provider signs in, which picks the default icon",
            "enum": [
              "oidc",
              "github"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "name",
          "primary"
        ],
        "type": "object"
      },
      "MCPNeed": {
        "additionalProperties": false,
        "properties": {
          "server": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        },
        "required": [
          "server",
          "why"
        ],
        "type": "object"
      },
      "MemberDto": {
        "additionalProperties": false,
        "properties": {
          "deactivated": {
            "description": "Whether an instance admin deactivated the user",
            "type": "boolean"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "joinedAt": {
            "format": "int64",
            "type": "integer"
          },
          "lastLoginAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "picture": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "picture",
          "role",
          "joinedAt",
          "lastLoginAt",
          "deactivated"
        ],
        "type": "object"
      },
      "ModelDto": {
        "additionalProperties": false,
        "properties": {
          "caps": {
            "$ref": "#/components/schemas/Caps"
          },
          "contextWindow": {
            "format": "int64",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "followCatalog": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Price",
            "description": "Micro-USD per 1M tokens"
          },
          "providerId": {
            "type": "string"
          },
          "providerKind": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "unlistedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "providerId",
          "providerName",
          "providerKind",
          "model",
          "label",
          "price",
          "contextWindow",
          "caps",
          "enabled",
          "synced",
          "followCatalog",
          "unlistedAt"
        ],
        "type": "object"
      },
      "NameBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "OauthConfig": {
        "additionalProperties": false,
        "properties": {
          "clientId": {
            "description": "A client registered with the authorization server beforehand, for servers without dynamic client registration",
            "maxLength": 500,
            "type": "string"
          },
          "clientSecret": {
            "description": "The client's secret, may reference a secret as {{secret:NAME}}",
            "maxLength": 2000,
            "type": "string"
          },
          "scopes": {
            "description": "Scopes to request instead of the ones the server advertises",
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "OpTest": {
        "additionalProperties": false,
        "properties": {
          "detail": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "status": {
            "enum": [
              "passed",
              "failed",
              "skipped"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "detail"
        ],
        "type": "object"
      },
      "OverviewOutputBody": {
        "additionalProperties": false,
        "properties": {
          "bucket": {
            "description": "Width of the perDay and costByJob buckets: an hour for the 24h range and a UTC day for the others",
            "enum": [
              "hour",
              "day"
            ],
            "type": "string"
          },
          "bucketMs": {
            "description": "Width of one bucket in milliseconds",
            "format": "int64",
            "type": "integer"
          },
          "costByJob": {
            "items": {
              "$ref": "#/components/schemas/JobCost"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "current": {
            "$ref": "#/components/schemas/Totals"
          },
          "from": {
            "description": "Start of the period that current, perDay and costByJob cover, the start of its first bucket, in unix milliseconds",
            "format": "int64",
            "type": "integer"
          },
          "gettingCheaper": {
            "items": {
              "$ref": "#/components/schemas/CheaperJob"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "perDay": {
            "description": "One bucket for every hour or day of the period, oldest first, whose runs other than skipped ones add up to current.runs",
            "items": {
              "$ref": "#/components/schemas/DayBucket"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "previous": {
            "$ref": "#/components/schemas/Totals",
            "description": "The period before, cut off at the point in time the current period has reached"
          },
          "range": {
            "type": "string"
          },
          "recentFailures": {
            "items": {
              "$ref": "#/components/schemas/RunRef"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "running": {
            "items": {
              "$ref": "#/components/schemas/RunRef"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "to": {
            "description": "End of the period, exclusive: the end of the bucket that holds the present, in unix milliseconds",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "range",
          "bucket",
          "bucketMs",
          "from",
          "to",
          "current",
          "previous",
          "perDay",
          "costByJob",
          "running",
          "recentFailures",
          "gettingCheaper"
        ],
        "type": "object"
      },
      "PaginatedAdminUserDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminUserDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedAdminWorkspaceDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminWorkspaceDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedApiTokenDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ApiTokenDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedImageDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ImageDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedJobListDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/JobListDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedMemberDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemberDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedModelDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedProviderDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProviderDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedRunDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedSecretDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SecretDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedServerDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ServerDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedStateEntryDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/StateEntryDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "PaginatedVersionListDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VersionListDto"
            },
            "type": "array"
          },
          "page": {
            "format": "int64",
            "type": "integer"
          },
          "pageSize": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "Price": {
        "additionalProperties": false,
        "properties": {
          "cacheRead": {
            "format": "int64",
            "type": "integer"
          },
          "cacheWrite": {
            "format": "int64",
            "type": "integer"
          },
          "in": {
            "format": "int64",
            "type": "integer"
          },
          "out": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "in",
          "out",
          "cacheRead",
          "cacheWrite"
        ],
        "type": "object"
      },
      "ProviderDto": {
        "additionalProperties": false,
        "properties": {
          "baseUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "enabledModelCount": {
            "format": "int64",
            "type": "integer"
          },
          "hasApiKey": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "modelCount": {
            "format": "int64",
            "type": "integer"
          },
          "modelSource": {
            "description": "catalog: the models.dev catalog of the kind, server: the server's model list, manual: models are added by hand",
            "enum": [
              "catalog",
              "server",
              "manual"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "syncError": {
            "description": "Why the last sync could not read the model list",
            "type": [
              "string",
              "null"
            ]
          },
          "syncedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "baseUrl",
          "hasApiKey",
          "modelCount",
          "enabledModelCount",
          "modelSource",
          "syncedAt",
          "syncError",
          "createdAt"
        ],
        "type": "object"
      },
      "ProviderIDOutputBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "PutStateInputBody": {
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "RollbackInputBody": {
        "additionalProperties": false,
        "properties": {
          "version": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "RunDetailDto": {
        "additionalProperties": false,
        "properties": {
          "cancelRequested": {
            "type": "boolean"
          },
          "cost": {
            "description": "Micro-USD",
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "fellBack": {
            "type": "boolean"
          },
          "finishedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "imageRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "input": {},
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "jobId": {
            "type": "string"
          },
          "jobName": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "modelLabel": {
            "description": "The model's display name: its label, or its ID when it has none",
            "type": [
              "string",
              "null"
            ]
          },
          "modelName": {
            "description": "The model's ID at its provider, such as claude-sonnet-4-5",
            "type": [
              "string",
              "null"
            ]
          },
          "msLlm": {
            "format": "int64",
            "type": "integer"
          },
          "msProvision": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "msQueue": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "msTools": {
            "format": "int64",
            "type": "integer"
          },
          "msTotal": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "outputs": {},
          "playbookVersion": {
            "format": "int64",
            "type": "integer"
          },
          "queuedAt": {
            "format": "int64",
            "type": "integer"
          },
          "reflection": {
            "enum": [
              "skipped",
              "pending",
              "done",
              "failed"
            ],
            "type": "string"
          },
          "reflectionCost": {
            "description": "Micro-USD",
            "format": "int64",
            "type": "integer"
          },
          "reflectionError": {
            "type": [
              "string",
              "null"
            ]
          },
          "reflectionOps": {
            "items": {
              "$ref": "#/components/schemas/AppliedOp"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "reflectionSummary": {
            "type": [
              "string",
              "null"
            ]
          },
          "reflectionVersion": {
            "description": "The playbook version reflection on this run created",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "sandboxAdapter": {
            "type": [
              "string",
              "null"
            ]
          },
          "sandboxIsolation": {
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "tokCacheRead": {
            "format": "int64",
            "type": "integer"
          },
          "tokCacheWrite": {
            "format": "int64",
            "type": "integer"
          },
          "tokIn": {
            "format": "int64",
            "type": "integer"
          },
          "tokOut": {
            "format": "int64",
            "type": "integer"
          },
          "trigger": {
            "type": "string"
          },
          "triggeredBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "triggeredByName": {
            "description": "Name or email of the user who started the run",
            "type": [
              "string",
              "null"
            ]
          },
          "turns": {
            "format": "int64",
            "type": "integer"
          },
          "verifyCost": {
            "description": "What the utility model's verification of a scripted run cost, in micro-USD",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "input",
          "instructions",
          "outputs",
          "playbookVersion",
          "imageRef",
          "sandboxAdapter",
          "triggeredBy",
          "triggeredByName",
          "fellBack",
          "cancelRequested",
          "reflection",
          "reflectionError",
          "reflectionSummary",
          "reflectionOps",
          "reflectionVersion",
          "reflectionCost",
          "verifyCost",
          "id",
          "jobId",
          "jobName",
          "number",
          "status",
          "mode",
          "trigger",
          "queuedAt",
          "startedAt",
          "finishedAt",
          "msQueue",
          "msProvision",
          "msLlm",
          "msTools",
          "msTotal",
          "turns",
          "tokIn",
          "tokOut",
          "tokCacheRead",
          "tokCacheWrite",
          "cost",
          "modelName",
          "modelLabel",
          "summary",
          "error",
          "sandboxIsolation"
        ],
        "type": "object"
      },
      "RunDto": {
        "additionalProperties": false,
        "properties": {
          "cost": {
            "description": "Micro-USD",
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "jobId": {
            "type": "string"
          },
          "jobName": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "modelLabel": {
            "description": "The model's display name: its label, or its ID when it has none",
            "type": [
              "string",
              "null"
            ]
          },
          "modelName": {
            "description": "The model's ID at its provider, such as claude-sonnet-4-5",
            "type": [
              "string",
              "null"
            ]
          },
          "msLlm": {
            "format": "int64",
            "type": "integer"
          },
          "msProvision": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "msQueue": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "msTools": {
            "format": "int64",
            "type": "integer"
          },
          "msTotal": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "queuedAt": {
            "format": "int64",
            "type": "integer"
          },
          "sandboxIsolation": {
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "tokCacheRead": {
            "format": "int64",
            "type": "integer"
          },
          "tokCacheWrite": {
            "format": "int64",
            "type": "integer"
          },
          "tokIn": {
            "format": "int64",
            "type": "integer"
          },
          "tokOut": {
            "format": "int64",
            "type": "integer"
          },
          "trigger": {
            "type": "string"
          },
          "turns": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "jobId",
          "jobName",
          "number",
          "status",
          "mode",
          "trigger",
          "queuedAt",
          "startedAt",
          "finishedAt",
          "msQueue",
          "msProvision",
          "msLlm",
          "msTools",
          "msTotal",
          "turns",
          "tokIn",
          "tokOut",
          "tokCacheRead",
          "tokCacheWrite",
          "cost",
          "modelName",
          "modelLabel",
          "summary",
          "error",
          "sandboxIsolation"
        ],
        "type": "object"
      },
      "RunNowInputBody": {
        "additionalProperties": false,
        "properties": {
          "input": {
            "description": "Run input, available as /ump/input.json"
          },
          "instructions": {
            "description": "Additional instructions for this run only",
            "maxLength": 10000,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunRef": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "jobId": {
            "type": "string"
          },
          "jobName": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "queuedAt": {
            "format": "int64",
            "type": "integer"
          },
          "startedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "jobId",
          "jobName",
          "number",
          "status",
          "mode",
          "queuedAt",
          "startedAt",
          "error",
          "summary"
        ],
        "type": "object"
      },
      "SandboxInfo": {
        "additionalProperties": false,
        "properties": {
          "adapter": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "egressFilter": {
            "enum": [
              "active",
              "unavailable",
              "off"
            ],
            "type": "string"
          },
          "egressFilterError": {
            "type": "string"
          },
          "imageBuilds": {
            "type": "boolean"
          },
          "isolation": {
            "enum": [
              "container",
              "gvisor",
              "microvm"
            ],
            "type": "string"
          },
          "runtimeError": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "adapter",
          "version",
          "arch",
          "isolation",
          "capabilities",
          "imageBuilds",
          "egressFilter"
        ],
        "type": "object"
      },
      "Schedule": {
        "additionalProperties": false,
        "properties": {
          "cron": {
            "type": "string"
          },
          "human": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "cron",
          "timezone",
          "human"
        ],
        "type": "object"
      },
      "Script": {
        "additionalProperties": false,
        "properties": {
          "args": {},
          "content": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sideEffects": {
            "type": "boolean"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "stats": {
            "$ref": "#/components/schemas/ScriptStats"
          }
        },
        "required": [
          "name",
          "lang",
          "description",
          "sideEffects",
          "content",
          "stats"
        ],
        "type": "object"
      },
      "ScriptStats": {
        "additionalProperties": false,
        "properties": {
          "calls": {
            "format": "int64",
            "type": "integer"
          },
          "failures": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "calls",
          "failures"
        ],
        "type": "object"
      },
      "SecretDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ServerBody": {
        "additionalProperties": false,
        "properties": {
          "args": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "command": {
            "maxLength": 500,
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_-]+$",
            "type": "string"
          },
          "oauth": {
            "$ref": "#/components/schemas/OauthConfig",
            "description": "OAuth client settings of HTTP servers, only needed when the server's authorization server can't register clients itself"
          },
          "transport": {
            "enum": [
              "stdio",
              "http"
            ],
            "type": "string"
          },
          "url": {
            "maxLength": 2000,
            "type": "string"
          }
        },
        "required": [
          "name",
          "transport"
        ],
        "type": "object"
      },
      "ServerDto": {
        "additionalProperties": false,
        "properties": {
          "args": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "auth": {
            "$ref": "#/components/schemas/AuthDto"
          },
          "command": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Values may reference secrets as {{secret:NAME}}",
            "type": "object"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Values may reference secrets as {{secret:NAME}}",
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "oauth": {
            "$ref": "#/components/schemas/OauthConfig"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolInfo"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "toolsCachedAt": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "transport": {
            "type": "string"
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "transport",
          "command",
          "args",
          "env",
          "url",
          "headers",
          "oauth",
          "auth",
          "enabled",
          "tools",
          "toolsCachedAt",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "SessionWorkspaceDto": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "description": "The caller's role in the workspace, which is their creator's for an API token",
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role"
        ],
        "type": "object"
      },
      "SetEnabledInputBody": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "SetEnabledOutputBody": {
        "additionalProperties": false,
        "properties": {
          "changed": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "changed"
        ],
        "type": "object"
      },
      "Spec": {
        "additionalProperties": false,
        "properties": {
          "dockerfile": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal": {
            "type": "string"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/IOField"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "mcp": {
            "items": {
              "$ref": "#/components/schemas/MCPNeed"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "network": {
            "enum": [
              "none",
              "internet"
            ],
            "type": "string"
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/IOField"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "schedule": {
            "$ref": "#/components/schemas/Schedule"
          },
          "sideEffects": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "successCriteria": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "goal",
          "successCriteria",
          "inputs",
          "outputs",
          "mcp",
          "network",
          "dockerfile",
          "sideEffects",
          "warnings"
        ],
        "type": "object"
      },
      "StateEntryDto": {
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string"
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "value",
          "updatedAt"
        ],
        "type": "object"
      },
      "StatusDto": {
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "SyncResult": {
        "additionalProperties": false,
        "properties": {
          "added": {
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "unlisted": {
            "format": "int64",
            "type": "integer"
          },
          "updated": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "added",
          "updated",
          "unlisted"
        ],
        "type": "object"
      },
      "TestOutputBody": {
        "additionalProperties": false,
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/AuthDto",
            "description": "The server's authentication status after the test"
          },
          "error": {
            "type": "string"
          },
          "latencyMs": {
            "format": "int64",
            "type": "integer"
          },
          "ok": {
            "type": "boolean"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolInfo"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "ok",
          "tools",
          "latencyMs",
          "auth"
        ],
        "type": "object"
      },
      "TestOutputBody1": {
        "additionalProperties": false,
        "properties": {
          "delivered": {
            "type": "boolean"
          }
        },
        "required": [
          "delivered"
        ],
        "type": "object"
      },
      "TestProviderInputBody": {
        "additionalProperties": false,
        "properties": {
          "modelId": {
            "description": "Model to test with",
            "type": "string"
          }
        },
        "required": [
          "modelId"
        ],
        "type": "object"
      },
      "TestProviderOutputBody": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "latencyMs": {
            "format": "int64",
            "type": "integer"
          },
          "ok": {
            "type": "boolean"
          },
          "reply": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "latencyMs"
        ],
        "type": "object"
      },
      "TokenInputBody": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "ToolInfo": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "destructive": {
            "type": "boolean"
          },
          "inputSchema": {},
          "name": {
            "type": "string"
          },
          "readOnly": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "description",
          "inputSchema",
          "readOnly",
          "destructive"
        ],
        "type": "object"
      },
      "Totals": {
        "additionalProperties": false,
        "properties": {
          "failed": {
            "format": "int64",
            "type": "integer"
          },
          "learningCost": {
            "description": "Micro-USD",
            "format": "int64",
            "type": "integer"
          },
          "p50Ms": {
            "format": "int64",
            "type": "integer"
          },
          "p95Ms": {
            "format": "int64",
            "type": "integer"
          },
          "runCost": {
            "description": "Micro-USD",
            "format": "int64",
            "type": "integer"
          },
          "runs": {
            "format": "int64",
            "type": "integer"
          },
          "succeeded": {
            "format": "int64",
            "type": "integer"
          },
          "successRate": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "runs",
          "succeeded",
          "failed",
          "successRate",
          "p50Ms",
          "p95Ms",
          "runCost",
          "learningCost"
        ],
        "type": "object"
      },
      "TransferInputBody": {
        "additionalProperties": false,
        "properties": {
          "userId": {
            "description": "The member who becomes the owner",
            "type": "string"
          }
        },
        "required": [
          "userId"
        ],
        "type": "object"
      },
      "TriggerResult": {
        "additionalProperties": false,
        "properties": {
          "runId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "runId",
          "status"
        ],
        "type": "object"
      },
      "UpdateInputBody": {
        "additionalProperties": false,
        "properties": {
          "agentModelId": {
            "type": "string"
          },
          "dailySpendLimitUsd": {
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "defaultImage": {
            "description": "An empty value resets to the server default",
            "maxLength": 500,
            "type": "string"
          },
          "defaultLimits": {
            "$ref": "#/components/schemas/Limits"
          },
          "notifyOn": {
            "items": {
              "enum": [
                "run.failed",
                "run.fell_back",
                "job.demoted"
              ],
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ],
            "uniqueItems": true
          },
          "notifySecret": {
            "description": "An empty value sends deliveries unsigned",
            "maxLength": 100,
            "type": "string"
          },
          "notifyWebhookUrl": {
            "description": "An empty value turns notifications off",
            "maxLength": 2000,
            "type": "string"
          },
          "reflectionModelId": {
            "type": "string"
          },
          "retentionDays": {
            "format": "int64",
            "maximum": 3650,
            "minimum": 1,
            "type": "integer"
          },
          "utilityModelId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateInputBody1": {
        "additionalProperties": false,
        "properties": {
          "baseVersion": {
            "description": "The version the edit started from; a newer current version makes the save fail with 409",
            "format": "int64",
            "type": "integer"
          },
          "content": {
            "$ref": "#/components/schemas/Content"
          },
          "summary": {
            "maxLength": 500,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "UpdateInputBody2": {
        "additionalProperties": false,
        "properties": {
          "value": {
            "maxLength": 65536,
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "UpdateMemberInputBody": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "description": "The owner changes by handing over ownership instead",
            "enum": [
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "UpdateModelInputBody": {
        "additionalProperties": false,
        "properties": {
          "caps": {
            "$ref": "#/components/schemas/Caps"
          },
          "enabled": {
            "type": "boolean"
          },
          "followCatalog": {
            "type": "boolean"
          },
          "label": {
            "maxLength": 100,
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          }
        },
        "type": "object"
      },
      "UpdateProviderInputBody": {
        "additionalProperties": false,
        "properties": {
          "apiKey": {
            "maxLength": 1000,
            "type": "string"
          },
          "baseUrl": {
            "maxLength": 500,
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateUserInputBody": {
        "additionalProperties": false,
        "properties": {
          "deactivated": {
            "description": "A deactivated user can't sign in, and their sessions and API tokens stop working",
            "type": "boolean"
          }
        },
        "required": [
          "deactivated"
        ],
        "type": "object"
      },
      "UserDto": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isAdmin": {
            "description": "Whether the user is an instance admin, who manages every user and workspace",
            "type": "boolean"
          },
          "loginProvider": {
            "description": "ID of the sign-in provider the session signed in with",
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "picture": {
            "description": "Profile picture URL from the sign-in provider",
            "type": [
              "string",
              "null"
            ]
          },
          "viaToken": {
            "type": "boolean"
          },
          "workspace": {
            "$ref": "#/components/schemas/SessionWorkspaceDto"
          },
          "workspaceId": {
            "type": "string"
          },
          "workspacesEnabled": {
            "description": "Whether people can have several workspaces on this instance",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "workspaceId",
          "viaToken",
          "isAdmin",
          "workspacesEnabled",
          "workspace"
        ],
        "type": "object"
      },
      "VersionDto": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/Content"
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "ops": {
            "items": {
              "$ref": "#/components/schemas/AppliedOp"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "previous": {
            "$ref": "#/components/schemas/Content"
          },
          "sourceRunId": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "author",
          "summary",
          "sourceRunId",
          "createdAt",
          "content"
        ],
        "type": "object"
      },
      "VersionListDto": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "type": "string"
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "sourceRunId": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "author",
          "summary",
          "sourceRunId",
          "createdAt"
        ],
        "type": "object"
      },
      "VersionMarker": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "type": "string"
          },
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "author",
          "createdAt"
        ],
        "type": "object"
      },
      "WebhookTokenOutputBody": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "description": "Shown once",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "url"
        ],
        "type": "object"
      },
      "WorkspaceDto": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "description": "The caller's role in the workspace",
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role"
        ],
        "type": "object"
      },
      "WorkspaceEventDto": {
        "additionalProperties": false,
        "properties": {
          "jobId": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "run",
              "reflection"
            ],
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "WorkspaceSettings": {
        "additionalProperties": false,
        "properties": {
          "agentModelId": {
            "type": [
              "string",
              "null"
            ]
          },
          "dailySpendLimitUsd": {
            "description": "0 means no limit",
            "format": "double",
            "type": "number"
          },
          "defaultImage": {
            "type": "string"
          },
          "defaultLimits": {
            "$ref": "#/components/schemas/Limits"
          },
          "notifyOn": {
            "items": {
              "enum": [
                "run.failed",
                "run.fell_back",
                "job.demoted"
              ],
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "notifySecret": {
            "description": "Name of a workspace secret whose value signs every delivery",
            "type": [
              "string",
              "null"
            ]
          },
          "notifyWebhookUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "reflectionModelId": {
            "type": [
              "string",
              "null"
            ]
          },
          "retentionDays": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "utilityModelId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "agentModelId",
          "utilityModelId",
          "reflectionModelId",
          "defaultImage",
          "defaultLimits",
          "dailySpendLimitUsd",
          "retentionDays",
          "notifyWebhookUrl",
          "notifyOn",
          "notifySecret"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      },
      "session": {
        "in": "cookie",
        "name": "umpteenth_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "title": "Umpteenth API",
    "version": "dev"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/admin/users": {
      "get": {
        "description": "Requires an instance admin and a signed-in session instead of an API token.",
        "operationId": "list-users",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAdminUserDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Admin"
        ],
        "summary": "List users"
      }
    },
    "/api/admin/users/{id}": {
      "patch": {
        "description": "Requires an instance admin and a signed-in session instead of an API token.",
        "operationId": "update-user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Admin"
        ],
        "summary": "Update user"
      }
    },
    "/api/admin/workspaces": {
      "get": {
        "description": "Requires an instance admin and a signed-in session instead of an API token.",
        "operationId": "list-all-workspaces",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAdminWorkspaceDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Admin"
        ],
        "summary": "List all workspaces"
      }
    },
    "/api/admin/workspaces/{id}": {
      "delete": {
        "description": "Requires an instance admin and a signed-in session instead of an API token.",
        "operationId": "delete-any-workspace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Admin"
        ],
        "summary": "Delete any workspace"
      }
    },
    "/api/auth/callback/{provider}": {
      "get": {
        "operationId": "login-callback",
        "parameters": [
          {
            "description": "ID of the sign-in provider the login started with",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "description": "ID of the sign-in provider the login started with",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "error",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "umpteenth_login",
            "schema": {
              "$ref": "#/components/schemas/Cookie"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Auth"
        ],
        "summary": "Login callback"
      }
    },
    "/api/auth/login/{provider}": {
      "get": {
        "operationId": "login",
        "parameters": [
          {
            "description": "ID of the sign-in provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "description": "ID of the sign-in provider",
              "type": "string"
            }
          },
          {
            "description": "Relative path to return to after login",
            "explode": false,
            "in": "query",
            "name": "redirect",
            "schema": {
              "description": "Relative path to return to after login",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Auth"
        ],
        "summary": "Login"
      }
    },
    "/api/auth/logout": {
      "post": {
        "operationId": "logout",
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Auth"
        ],
        "summary": "Logout"
      }
    },
    "/api/auth/providers": {
      "get": {
        "operationId": "list-login-providers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LoginProviderDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Auth"
        ],
        "summary": "List login providers"
      }
    },
    "/api/catalog/models": {
      "get": {
        "operationId": "get-model-catalog",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "kind",
            "schema": {
              "enum": [
                "anthropic",
                "openai"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CatalogEntryDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Get model catalog"
      }
    },
    "/api/events": {
      "get": {
        "operationId": "stream-workspace-events",
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.",
                  "items": {
                    "oneOf": [
                      {
                        "properties": {
                          "data": {
                            "$ref": "#/components/schemas/WorkspaceEventDto"
                          },
                          "event": {
                            "const": "run",
                            "description": "The event name.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The event ID.",
                            "type": "integer"
                          },
                          "retry": {
                            "description": "The retry time in milliseconds.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "data",
                          "event"
                        ],
                        "title": "Event run",
                        "type": "object"
                      }
                    ]
                  },
                  "title": "Server Sent Events",
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Stream workspace events"
      }
    },
    "/api/invites/accept": {
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "accept-invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Accept invite"
      }
    },
    "/api/invites/lookup": {
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "lookup-invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePreviewOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Lookup invite"
      }
    },
    "/api/jobs": {
      "get": {
        "operationId": "list-jobs",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Comma-separated enabled states, true and/or false",
            "explode": false,
            "in": "query",
            "name": "enabled",
            "schema": {
              "description": "Comma-separated enabled states, true and/or false",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedJobListDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "List jobs"
      },
      "post": {
        "operationId": "create-job",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobFields"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Create job"
      }
    },
    "/api/jobs/compile": {
      "post": {
        "operationId": "compile-job",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompileInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Spec"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Compile job"
      }
    },
    "/api/jobs/{id}": {
      "delete": {
        "operationId": "delete-job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Delete job"
      },
      "get": {
        "operationId": "get-job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Get job"
      },
      "patch": {
        "operationId": "update-job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Update job"
      }
    },
    "/api/jobs/{id}/images": {
      "get": {
        "operationId": "list-job-images",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedImageDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Images"
        ],
        "summary": "List job images"
      }
    },
    "/api/jobs/{id}/images/rebuild": {
      "post": {
        "operationId": "rebuild-job-image",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageIDOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Images"
        ],
        "summary": "Rebuild job image"
      }
    },
    "/api/jobs/{id}/images/{imageId}": {
      "get": {
        "operationId": "get-image",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "imageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Images"
        ],
        "summary": "Get image"
      }
    },
    "/api/jobs/{id}/mcp-servers": {
      "get": {
        "operationId": "get-job-mcp-servers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JobServer"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Get job mcp servers"
      },
      "put": {
        "operationId": "set-job-mcp-servers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/JobServer"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JobServer"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Set job mcp servers"
      }
    },
    "/api/jobs/{id}/playbook": {
      "get": {
        "operationId": "get-playbook",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Playbook"
        ],
        "summary": "Get playbook"
      },
      "put": {
        "operationId": "update-playbook",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInputBody1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Playbook"
        ],
        "summary": "Update playbook"
      }
    },
    "/api/jobs/{id}/playbook/rollback": {
      "post": {
        "operationId": "rollback-playbook",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Playbook"
        ],
        "summary": "Rollback playbook"
      }
    },
    "/api/jobs/{id}/playbook/versions": {
      "get": {
        "operationId": "list-playbook-versions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedVersionListDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Playbook"
        ],
        "summary": "List playbook versions"
      }
    },
    "/api/jobs/{id}/playbook/versions/{version}": {
      "get": {
        "operationId": "get-playbook-version",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Playbook"
        ],
        "summary": "Get playbook version"
      }
    },
    "/api/jobs/{id}/runs": {
      "post": {
        "operationId": "run-job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunNowInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Run job"
      }
    },
    "/api/jobs/{id}/secrets": {
      "get": {
        "operationId": "get-job-secrets",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JobSecret"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "Get job secrets"
      },
      "put": {
        "operationId": "set-job-secrets",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/JobSecret"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JobSecret"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "Set job secrets"
      }
    },
    "/api/jobs/{id}/state": {
      "get": {
        "operationId": "list-job-state",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStateEntryDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Job state"
        ],
        "summary": "List job state"
      }
    },
    "/api/jobs/{id}/state/{key}": {
      "delete": {
        "operationId": "delete-job-state",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Job state"
        ],
        "summary": "Delete job state"
      },
      "get": {
        "operationId": "get-job-state",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateEntryDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Job state"
        ],
        "summary": "Get job state"
      },
      "put": {
        "operationId": "put-job-state",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutStateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Job state"
        ],
        "summary": "Put job state"
      }
    },
    "/api/jobs/{id}/stats": {
      "get": {
        "operationId": "get-job-stats",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "range",
            "schema": {
              "default": "30d",
              "enum": [
                "7d",
                "30d",
                "90d"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatsOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Stats"
        ],
        "summary": "Get job stats"
      }
    },
    "/api/jobs/{id}/webhook-token": {
      "post": {
        "operationId": "rotate-webhook-token",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTokenOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Jobs"
        ],
        "summary": "Rotate webhook token"
      }
    },
    "/api/mcp-servers": {
      "get": {
        "operationId": "list-mcp-servers",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "transport",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedServerDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "List mcp servers"
      },
      "post": {
        "operationId": "create-mcp-server",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Create mcp server"
      }
    },
    "/api/mcp-servers/{id}": {
      "delete": {
        "operationId": "delete-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Delete mcp server"
      },
      "get": {
        "operationId": "get-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Get mcp server"
      },
      "put": {
        "operationId": "update-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Update mcp server"
      }
    },
    "/api/mcp-servers/{id}/oauth": {
      "delete": {
        "operationId": "logout-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Logout mcp server"
      }
    },
    "/api/mcp-servers/{id}/oauth/callback": {
      "get": {
        "operationId": "mcp-server-oauth-callback",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "iss",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "error",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "error_description",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Mcp server oauth callback"
      }
    },
    "/api/mcp-servers/{id}/oauth/login": {
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "login-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Login mcp server"
      }
    },
    "/api/mcp-servers/{id}/test": {
      "post": {
        "operationId": "test-mcp-server",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "MCP"
        ],
        "summary": "Test mcp server"
      }
    },
    "/api/models": {
      "get": {
        "operationId": "list-models",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Comma-separated provider IDs",
            "explode": false,
            "in": "query",
            "name": "provider",
            "schema": {
              "description": "Comma-separated provider IDs",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated statuses: enabled (can be picked), disabled, unlisted",
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "description": "Comma-separated statuses: enabled (can be picked), disabled, unlisted",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedModelDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "List models"
      },
      "post": {
        "description": "Requires the admin role or above.",
        "operationId": "create-model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderIDOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Create model"
      }
    },
    "/api/models/{id}": {
      "delete": {
        "description": "Requires the admin role or above.",
        "operationId": "delete-model",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Delete model"
      },
      "patch": {
        "description": "Requires the admin role or above.",
        "operationId": "update-model",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Update model"
      }
    },
    "/api/providers": {
      "get": {
        "operationId": "list-providers",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedProviderDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "List providers"
      },
      "post": {
        "description": "Requires the admin role or above.",
        "operationId": "create-provider",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProviderOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Create provider"
      }
    },
    "/api/providers/{id}": {
      "delete": {
        "description": "Requires the admin role or above.",
        "operationId": "delete-provider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Delete provider"
      },
      "patch": {
        "description": "Requires the admin role or above.",
        "operationId": "update-provider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Update provider"
      }
    },
    "/api/providers/{id}/models/enabled": {
      "put": {
        "description": "Requires the admin role or above.",
        "operationId": "set-provider-models-enabled",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetEnabledInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetEnabledOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Set provider models enabled"
      }
    },
    "/api/providers/{id}/sync": {
      "post": {
        "description": "Requires the admin role or above.",
        "operationId": "sync-provider-models",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Sync provider models"
      }
    },
    "/api/providers/{id}/test": {
      "post": {
        "description": "Requires the admin role or above.",
        "operationId": "test-provider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestProviderInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestProviderOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Providers"
        ],
        "summary": "Test provider"
      }
    },
    "/api/runs": {
      "get": {
        "operationId": "list-runs",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Comma-separated statuses",
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "description": "Comma-separated statuses",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated job IDs",
            "explode": false,
            "in": "query",
            "name": "job",
            "schema": {
              "description": "Comma-separated job IDs",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated modes",
            "explode": false,
            "in": "query",
            "name": "mode",
            "schema": {
              "description": "Comma-separated modes",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated triggers",
            "explode": false,
            "in": "query",
            "name": "trigger",
            "schema": {
              "description": "Comma-separated triggers",
              "type": "string"
            }
          },
          {
            "description": "Queued at or after, unix ms",
            "explode": false,
            "in": "query",
            "name": "from",
            "schema": {
              "description": "Queued at or after, unix ms",
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Queued before, unix ms",
            "explode": false,
            "in": "query",
            "name": "to",
            "schema": {
              "description": "Queued before, unix ms",
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRunDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "List runs"
      }
    },
    "/api/runs/{id}": {
      "get": {
        "operationId": "get-run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetailDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Get run"
      }
    },
    "/api/runs/{id}/artifact": {
      "get": {
        "operationId": "get-run-artifact",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Get run artifact"
      }
    },
    "/api/runs/{id}/artifacts": {
      "get": {
        "operationId": "list-run-artifacts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ArtifactDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "List run artifacts"
      }
    },
    "/api/runs/{id}/cancel": {
      "post": {
        "operationId": "cancel-run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Cancel run"
      }
    },
    "/api/runs/{id}/events": {
      "get": {
        "operationId": "list-run-events",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Return events with a sequence number greater than this",
            "explode": false,
            "in": "query",
            "name": "after",
            "schema": {
              "description": "Return events with a sequence number greater than this",
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 500,
              "format": "int64",
              "maximum": 2000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EventDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "List run events"
      }
    },
    "/api/runs/{id}/learn": {
      "post": {
        "operationId": "learn-from-run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Learn from run"
      }
    },
    "/api/runs/{id}/retry": {
      "post": {
        "operationId": "retry-run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Retry run"
      }
    },
    "/api/runs/{id}/stream": {
      "get": {
        "operationId": "stream-run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Last-Event-ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event sequence, for clients that cannot send Last-Event-ID",
            "explode": false,
            "in": "query",
            "name": "after",
            "schema": {
              "description": "Resume after this event sequence, for clients that cannot send Last-Event-ID",
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.",
                  "items": {
                    "oneOf": [
                      {
                        "properties": {
                          "data": {
                            "$ref": "#/components/schemas/DeltaDto"
                          },
                          "event": {
                            "const": "delta",
                            "description": "The event name.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The event ID.",
                            "type": "integer"
                          },
                          "retry": {
                            "description": "The retry time in milliseconds.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "data",
                          "event"
                        ],
                        "title": "Event delta",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "data": {
                            "$ref": "#/components/schemas/EndDto"
                          },
                          "event": {
                            "const": "end",
                            "description": "The event name.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The event ID.",
                            "type": "integer"
                          },
                          "retry": {
                            "description": "The retry time in milliseconds.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "data",
                          "event"
                        ],
                        "title": "Event end",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "data": {
                            "$ref": "#/components/schemas/EventDto"
                          },
                          "event": {
                            "const": "event",
                            "description": "The event name.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The event ID.",
                            "type": "integer"
                          },
                          "retry": {
                            "description": "The retry time in milliseconds.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "data",
                          "event"
                        ],
                        "title": "Event event",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "data": {
                            "$ref": "#/components/schemas/StatusDto"
                          },
                          "event": {
                            "const": "status",
                            "description": "The event name.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The event ID.",
                            "type": "integer"
                          },
                          "retry": {
                            "description": "The retry time in milliseconds.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "data",
                          "event"
                        ],
                        "title": "Event status",
                        "type": "object"
                      }
                    ]
                  },
                  "title": "Server Sent Events",
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "tags": [
          "Runs"
        ],
        "summary": "Stream run"
      }
    },
    "/api/secrets": {
      "get": {
        "operationId": "list-secrets",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSecretDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "List secrets"
      },
      "post": {
        "operationId": "create-secret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInputBody1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "Create secret"
      }
    },
    "/api/secrets/{id}": {
      "delete": {
        "operationId": "delete-secret",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "Delete secret"
      },
      "put": {
        "operationId": "update-secret",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInputBody2"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Secrets"
        ],
        "summary": "Update secret"
      }
    },
    "/api/settings": {
      "get": {
        "operationId": "get-settings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSettings"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Settings"
        ],
        "summary": "Get settings"
      },
      "patch": {
        "description": "Requires the admin role or above.",
        "operationId": "update-settings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSettings"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Settings"
        ],
        "summary": "Update settings"
      }
    },
    "/api/settings/notifications/test": {
      "post": {
        "description": "Requires the admin role or above.",
        "operationId": "test-notification",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestOutputBody1"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Settings"
        ],
        "summary": "Test notification"
      }
    },
    "/api/stats/overview": {
      "get": {
        "operationId": "get-stats-overview",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "range",
            "schema": {
              "default": "7d",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverviewOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Stats"
        ],
        "summary": "Get stats overview"
      }
    },
    "/api/system/info": {
      "get": {
        "operationId": "get-system-info",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InfoOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "System"
        ],
        "summary": "Get system info"
      }
    },
    "/api/tokens": {
      "get": {
        "operationId": "list-api-tokens",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedApiTokenDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "API tokens"
        ],
        "summary": "List api tokens"
      },
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "create-api-token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "API tokens"
        ],
        "summary": "Create api token"
      }
    },
    "/api/tokens/{id}": {
      "delete": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "delete-api-token",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "API tokens"
        ],
        "summary": "Delete api token"
      }
    },
    "/api/users/me": {
      "get": {
        "operationId": "get-current-user",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Auth"
        ],
        "summary": "Get current user"
      }
    },
    "/api/workspace": {
      "delete": {
        "description": "Requires the owner role and a signed-in session instead of an API token.",
        "operationId": "delete-workspace",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete workspace"
      },
      "get": {
        "operationId": "get-workspace",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Get workspace"
      },
      "patch": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "update-workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NameBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Update workspace"
      }
    },
    "/api/workspace/invites": {
      "get": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "list-workspace-invites",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/InviteDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "List workspace invites"
      },
      "post": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "create-workspace-invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInviteOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Create workspace invite"
      }
    },
    "/api/workspace/invites/{id}": {
      "delete": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "delete-workspace-invite",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Delete workspace invite"
      }
    },
    "/api/workspace/leave": {
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "leave-workspace",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Leave workspace"
      }
    },
    "/api/workspace/members": {
      "get": {
        "operationId": "list-workspace-members",
        "parameters": [
          {
            "description": "1-based page number",
            "explode": false,
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "description": "1-based page number",
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "explode": false,
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 25,
              "description": "Items per page",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort keys, prefix with - for descending",
            "explode": false,
            "in": "query",
            "name": "sort",
            "schema": {
              "description": "Comma-separated sort keys, prefix with - for descending",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Free-text search",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "Free-text search",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMemberDto"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "List workspace members"
      }
    },
    "/api/workspace/members/{userId}": {
      "delete": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "remove-workspace-member",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Remove workspace member"
      },
      "patch": {
        "description": "Requires the admin role or above and a signed-in session instead of an API token.",
        "operationId": "update-workspace-member",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspace members"
        ],
        "summary": "Update workspace member"
      }
    },
    "/api/workspace/transfer": {
      "post": {
        "description": "Requires the owner role and a signed-in session instead of an API token.",
        "operationId": "transfer-workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Transfer workspace"
      }
    },
    "/api/workspaces": {
      "get": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "list-my-workspaces",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceDto"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "List my workspaces"
      },
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "create-workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NameBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Create workspace"
      }
    },
    "/api/workspaces/{id}/switch": {
      "post": {
        "description": "Requires a signed-in session instead of an API token.",
        "operationId": "switch-workspace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDto"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Workspaces"
        ],
        "summary": "Switch workspace"
      }
    },
    "/hooks/{jobId}": {
      "post": {
        "operationId": "trigger-webhook",
        "parameters": [
          {
            "in": "path",
            "name": "jobId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Body"
                }
              }
            },
            "description": "Error"
          }
        },
        "tags": [
          "Webhooks"
        ],
        "summary": "Trigger webhook"
      }
    }
  },
  "servers": [
    {
      "url": "https://umpteenth.example.com"
    }
  ]
}