{
  "components": {
    "schemas": {
      "ArmKind": {
        "enum": [
          "model",
          "agent",
          "skill"
        ]
      },
      "ArmStatus": {
        "enum": [
          "ready",
          "degraded",
          "disabled"
        ]
      },
      "CostClass": {
        "enum": [
          "economy",
          "standard",
          "premium"
        ]
      },
      "DataClass": {
        "enum": [
          "public",
          "sandbox",
          "tenant_internal"
        ]
      },
      "LifecycleState": {
        "enum": [
          "accepted",
          "queued",
          "running",
          "progress",
          "completed",
          "failed",
          "cancelled",
          "expired"
        ]
      },
      "OnEvalAction": {
        "enum": [
          "gate",
          "fallback",
          "repair_retry"
        ]
      },
      "Problem": {
        "additionalProperties": false,
        "properties": {
          "detail": {
            "description": "Short, safe, occurrence-specific description. Never a stack trace.",
            "type": "string"
          },
          "errors": {
            "description": "Per-field validation failures (validation_failed only).",
            "items": {
              "additionalProperties": false,
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "instance": {
            "description": "Unique id for this occurrence, safe to quote in support requests.",
            "format": "uuid",
            "type": "string"
          },
          "retry_after_s": {
            "description": "Seconds to wait before retrying (rate_limited and quota_exceeded only; mirrored as the Retry-After header).",
            "type": "integer"
          },
          "status": {
            "description": "HTTP status code, duplicated in the body per RFC 7807.",
            "type": "integer"
          },
          "title": {
            "description": "Human-readable summary of the problem type.",
            "type": "string"
          },
          "type": {
            "description": "Stable URI that identifies the error type.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "instance"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "Organization API key for application requests.",
        "scheme": "bearer",
        "type": "http"
      },
      "sessionCookie": {
        "description": "Dashboard browser session. Do not use this credential in an application.",
        "in": "cookie",
        "name": "solverapi_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Run approved AI models under data, cost, and time limits. A cost limit can stop another provider call after recorded spend reaches the limit; it cannot reverse a call already in progress. Each finished run returns a receipt naming the selected model and provider without including the prompt or model output. Use the model catalog for what your organization can run now. Provider secrets never appear in API requests or responses. Retry a mutation with the same Idempotency-Key and the same request body.",
    "title": "Millwork API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/account": {
      "get": {
        "description": "Fetch the account, quota and billing snapshot.",
        "operationId": "getAccount",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "authenticated_principal_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Stable non-secret ID for the current machine credential; null for a human session."
                    },
                    "balance": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "balance_usd": {
                              "type": "number"
                            },
                            "billing_email": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "credit_activity": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount_usd": {
                                    "type": "number"
                                  },
                                  "at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "stripe_checkout",
                                      "credit_grant",
                                      "manual_adjustment",
                                      "refund"
                                    ],
                                    "type": "string"
                                  },
                                  "receipt_emailed": {
                                    "type": "boolean"
                                  },
                                  "reference": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "at",
                                  "amount_usd",
                                  "kind",
                                  "description",
                                  "reference"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "top_up_history": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount_usd": {
                                    "type": "number"
                                  },
                                  "at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "method": {
                                    "enum": [
                                      "stripe_checkout",
                                      "manual_adjustment",
                                      "refund"
                                    ],
                                    "type": "string"
                                  },
                                  "receipt_emailed": {
                                    "type": "boolean"
                                  },
                                  "stripe_event_id": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "at",
                                  "amount_usd",
                                  "method",
                                  "stripe_event_id"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "balance_usd",
                            "top_up_history",
                            "credit_activity",
                            "billing_email"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "billing": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "funded_state": {
                              "enum": [
                                "funded",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            "manage_available": {
                              "type": "boolean"
                            },
                            "platform_fee_usd_per_execution": {
                              "minimum": 0,
                              "type": "number"
                            }
                          },
                          "required": [
                            "funded_state",
                            "manage_available"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "is_demo": {
                      "type": "boolean"
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "concurrency": {
                          "additionalProperties": false,
                          "properties": {
                            "limit": {
                              "type": "integer"
                            },
                            "running": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "limit",
                            "running"
                          ],
                          "type": "object"
                        },
                        "executions": {
                          "additionalProperties": false,
                          "properties": {
                            "limit": {
                              "type": "integer"
                            },
                            "remaining": {
                              "type": "integer"
                            },
                            "reset_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "retry_after_s": {
                              "type": "integer"
                            },
                            "used": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "limit",
                            "used",
                            "remaining",
                            "reset_at",
                            "retry_after_s"
                          ],
                          "type": "object"
                        },
                        "rate_limit_rpm": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "executions",
                        "concurrency",
                        "rate_limit_rpm"
                      ],
                      "type": "object"
                    },
                    "quota_tier": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "authenticated_principal_id",
                    "display_name",
                    "quota_tier",
                    "is_demo",
                    "quota",
                    "balance",
                    "billing"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Account summary",
        "tags": [
          "Account"
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "description": "List this organization's API keys.",
        "operationId": "getApiKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "api_keys": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "api_key_id": {
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "display_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expires_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "key_prefix": {
                            "type": "string"
                          },
                          "revoked_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revoked_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "enum": [
                              "active",
                              "revoked"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "api_key_id",
                          "display_name",
                          "key_prefix",
                          "status",
                          "created_at",
                          "revoked_at",
                          "expires_at",
                          "created_by",
                          "revoked_by"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "api_keys"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List API keys",
        "tags": [
          "API keys"
        ]
      },
      "post": {
        "description": "Create an API key.",
        "operationId": "postApiKeys",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "api_key_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "created_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "display_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key": {
                      "description": "The API key. It is shown once when created, so store it now.",
                      "type": "string"
                    },
                    "key_prefix": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "revoked"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_key_id",
                    "display_name",
                    "key_prefix",
                    "status",
                    "created_at",
                    "revoked_at",
                    "expires_at",
                    "created_by",
                    "revoked_by",
                    "key"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create API key",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/api-keys/{apiKeyId}": {
      "patch": {
        "description": "Relabel an API key.",
        "operationId": "patchApiKeysByApiKeyId",
        "parameters": [
          {
            "in": "path",
            "name": "apiKeyId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "display_name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "api_key_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "created_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "display_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key_prefix": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "revoked"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_key_id",
                    "display_name",
                    "key_prefix",
                    "status",
                    "created_at",
                    "revoked_at",
                    "expires_at",
                    "created_by",
                    "revoked_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rename API key",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/api-keys/{apiKeyId}/revoke": {
      "post": {
        "description": "Revoke an API key.",
        "operationId": "postApiKeysByApiKeyIdRevoke",
        "parameters": [
          {
            "in": "path",
            "name": "apiKeyId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "api_key_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "created_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "display_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key_prefix": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "revoked"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_key_id",
                    "display_name",
                    "key_prefix",
                    "status",
                    "created_at",
                    "revoked_at",
                    "expires_at",
                    "created_by",
                    "revoked_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke API key",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/arms": {
      "get": {
        "description": "List arms.",
        "operationId": "getArms",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ArmKind"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ArmStatus"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arms": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "arm_id": {
                            "type": "string"
                          },
                          "artifact": {
                            "additionalProperties": false,
                            "description": "skill kind only. Artifact content is never exposed on this surface.",
                            "properties": {
                              "editable_regions": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "version",
                              "editable_regions"
                            ],
                            "type": "object"
                          },
                          "artifact_hash": {
                            "description": "skill kind only (sha256:... of the content).",
                            "type": "string"
                          },
                          "capability_tags": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "cost_class": {
                            "$ref": "#/components/schemas/CostClass"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "credential_ref": {
                            "description": "model kind (legacy provider binding) only; masked or redacted per role.",
                            "type": "string"
                          },
                          "data_class_grants": {
                            "items": {
                              "$ref": "#/components/schemas/DataClass"
                            },
                            "type": "array"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "endpoint": {
                            "additionalProperties": false,
                            "properties": {
                              "auth_ref": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url",
                              "auth_ref"
                            ],
                            "type": "object"
                          },
                          "kind": {
                            "$ref": "#/components/schemas/ArmKind"
                          },
                          "lifecycle": {
                            "additionalProperties": false,
                            "description": "agent kind only.",
                            "properties": {
                              "cancellable": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "long_running": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "max_runtime_s": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "long_running",
                              "cancellable",
                              "max_runtime_s"
                            ],
                            "type": "object"
                          },
                          "model_deployment_id": {
                            "description": "model kind (deployment-bound registration) only.",
                            "type": "string"
                          },
                          "model_id": {
                            "description": "model kind (legacy provider binding) only.",
                            "type": "string"
                          },
                          "model_lifecycle": {
                            "description": "Current server-owned lifecycle of a deployment-bound model. Separate from the tenant-controlled arm status.",
                            "enum": [
                              "preview",
                              "active",
                              "deprecated",
                              "retired"
                            ],
                            "type": "string"
                          },
                          "provider": {
                            "description": "model kind (legacy provider binding) only.",
                            "type": "string"
                          },
                          "status": {
                            "$ref": "#/components/schemas/ArmStatus"
                          },
                          "status_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Machine-readable reason the arm is degraded/disabled (a probe reason code, provider_unsupported, or source_connection_revoked); null otherwise."
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "required": [
                          "arm_id",
                          "kind",
                          "display_name",
                          "capability_tags",
                          "data_class_grants",
                          "cost_class",
                          "status",
                          "status_reason",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pagination cursor. It is null on the last page."
                    }
                  },
                  "required": [
                    "arms",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List options",
        "tags": [
          "Registered options"
        ]
      },
      "post": {
        "description": "Register an arm.",
        "operationId": "postArms",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "else": {
                  "else": {
                    "if": {
                      "properties": {
                        "kind": {
                          "enum": [
                            "skill"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "artifact"
                      ]
                    }
                  },
                  "if": {
                    "properties": {
                      "kind": {
                        "enum": [
                          "agent"
                        ]
                      }
                    }
                  },
                  "then": {
                    "required": [
                      "endpoint"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "kind": {
                      "enum": [
                        "model"
                      ]
                    }
                  }
                },
                "properties": {
                  "artifact": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "maxLength": 262144,
                        "minLength": 1,
                        "type": "string"
                      },
                      "editable_regions": {
                        "items": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "version": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "content",
                      "version",
                      "editable_regions"
                    ],
                    "type": "object"
                  },
                  "capability_tags": {
                    "items": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "cost_class": {
                    "$ref": "#/components/schemas/CostClass"
                  },
                  "credential_ref": {
                    "type": "string"
                  },
                  "data_class_grants": {
                    "items": {
                      "$ref": "#/components/schemas/DataClass"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "endpoint": {
                    "additionalProperties": false,
                    "properties": {
                      "auth_ref": {
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "auth_ref"
                    ],
                    "type": "object"
                  },
                  "kind": {
                    "$ref": "#/components/schemas/ArmKind"
                  },
                  "lifecycle": {
                    "additionalProperties": false,
                    "properties": {
                      "cancellable": {
                        "type": "boolean"
                      },
                      "long_running": {
                        "type": "boolean"
                      },
                      "max_runtime_s": {
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "model_deployment_id": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "model_id": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "display_name",
                  "capability_tags",
                  "data_class_grants"
                ],
                "then": {
                  "oneOf": [
                    {
                      "not": {
                        "required": [
                          "model_deployment_id"
                        ]
                      },
                      "required": [
                        "provider",
                        "model_id",
                        "credential_ref"
                      ]
                    },
                    {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "provider"
                            ]
                          },
                          {
                            "required": [
                              "model_id"
                            ]
                          },
                          {
                            "required": [
                              "credential_ref"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "model_deployment_id"
                      ]
                    }
                  ]
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Registration result. Millwork checks the selected type before setting the status.",
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "artifact_hash": {
                      "description": "skill kind only.",
                      "type": "string"
                    },
                    "preflight": {
                      "additionalProperties": false,
                      "description": "Registration reachability probe report. Present only when a probe ran (agent kind).",
                      "properties": {
                        "detail": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "http_status": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "HTTP status the endpoint answered with; null when no response arrived."
                        },
                        "reachable": {
                          "type": "boolean"
                        },
                        "reason_code": {
                          "anyOf": [
                            {
                              "enum": [
                                "scheme_rejected",
                                "dns_resolution_failed",
                                "private_range_rejected",
                                "probe_timeout",
                                "endpoint_unreachable",
                                "authentication_failed"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "reachable",
                        "reason_code",
                        "http_status",
                        "detail"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "$ref": "#/components/schemas/ArmStatus"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "arm_id",
                    "status",
                    "status_reason"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Registration result. Millwork checks the selected type before setting the status."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Register option",
        "tags": [
          "Registered options"
        ]
      }
    },
    "/v1/arms/{armId}": {
      "delete": {
        "description": "Disable an arm and keep its history.",
        "operationId": "deleteArmsByArmId",
        "parameters": [
          {
            "in": "path",
            "name": "armId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "The arm is disabled but remains available in historical records.",
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "status": {
                      "$ref": "#/components/schemas/ArmStatus"
                    }
                  },
                  "required": [
                    "arm_id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The arm is disabled but remains available in historical records."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Disable option",
        "tags": [
          "Registered options"
        ]
      },
      "get": {
        "description": "Get an arm.",
        "operationId": "getArmsByArmId",
        "parameters": [
          {
            "in": "path",
            "name": "armId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "artifact": {
                      "additionalProperties": false,
                      "description": "skill kind only. Artifact content is never exposed on this surface.",
                      "properties": {
                        "editable_regions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "version",
                        "editable_regions"
                      ],
                      "type": "object"
                    },
                    "artifact_hash": {
                      "description": "skill kind only (sha256:... of the content).",
                      "type": "string"
                    },
                    "capability_tags": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "cost_class": {
                      "$ref": "#/components/schemas/CostClass"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_ref": {
                      "description": "model kind (legacy provider binding) only; masked or redacted per role.",
                      "type": "string"
                    },
                    "data_class_grants": {
                      "items": {
                        "$ref": "#/components/schemas/DataClass"
                      },
                      "type": "array"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "additionalProperties": false,
                      "properties": {
                        "auth_ref": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "auth_ref"
                      ],
                      "type": "object"
                    },
                    "kind": {
                      "$ref": "#/components/schemas/ArmKind"
                    },
                    "lifecycle": {
                      "additionalProperties": false,
                      "description": "agent kind only.",
                      "properties": {
                        "cancellable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "long_running": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "max_runtime_s": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "long_running",
                        "cancellable",
                        "max_runtime_s"
                      ],
                      "type": "object"
                    },
                    "model_deployment_id": {
                      "description": "model kind (deployment-bound registration) only.",
                      "type": "string"
                    },
                    "model_id": {
                      "description": "model kind (legacy provider binding) only.",
                      "type": "string"
                    },
                    "model_lifecycle": {
                      "description": "Current server-owned lifecycle of a deployment-bound model. Separate from the tenant-controlled arm status.",
                      "enum": [
                        "preview",
                        "active",
                        "deprecated",
                        "retired"
                      ],
                      "type": "string"
                    },
                    "provider": {
                      "description": "model kind (legacy provider binding) only.",
                      "type": "string"
                    },
                    "status": {
                      "$ref": "#/components/schemas/ArmStatus"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Machine-readable reason the arm is degraded/disabled (a probe reason code, provider_unsupported, or source_connection_revoked); null otherwise."
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "arm_id",
                    "kind",
                    "display_name",
                    "capability_tags",
                    "data_class_grants",
                    "cost_class",
                    "status",
                    "status_reason",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get option",
        "tags": [
          "Registered options"
        ]
      },
      "patch": {
        "description": "Update an arm.",
        "operationId": "patchArmsByArmId",
        "parameters": [
          {
            "in": "path",
            "name": "armId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "minProperties": 1,
                "properties": {
                  "artifact": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "maxLength": 262144,
                        "minLength": 1,
                        "type": "string"
                      },
                      "editable_regions": {
                        "items": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "version": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "content",
                      "version",
                      "editable_regions"
                    ],
                    "type": "object"
                  },
                  "capability_tags": {
                    "items": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "cost_class": {
                    "$ref": "#/components/schemas/CostClass"
                  },
                  "data_class_grants": {
                    "items": {
                      "$ref": "#/components/schemas/DataClass"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "endpoint": {
                    "additionalProperties": false,
                    "properties": {
                      "auth_ref": {
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "artifact": {
                      "additionalProperties": false,
                      "description": "skill kind only. Artifact content is never exposed on this surface.",
                      "properties": {
                        "editable_regions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "version",
                        "editable_regions"
                      ],
                      "type": "object"
                    },
                    "artifact_hash": {
                      "description": "skill kind only (sha256:... of the content).",
                      "type": "string"
                    },
                    "capability_tags": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "cost_class": {
                      "$ref": "#/components/schemas/CostClass"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_ref": {
                      "description": "model kind (legacy provider binding) only; masked or redacted per role.",
                      "type": "string"
                    },
                    "data_class_grants": {
                      "items": {
                        "$ref": "#/components/schemas/DataClass"
                      },
                      "type": "array"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "additionalProperties": false,
                      "properties": {
                        "auth_ref": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "auth_ref"
                      ],
                      "type": "object"
                    },
                    "kind": {
                      "$ref": "#/components/schemas/ArmKind"
                    },
                    "lifecycle": {
                      "additionalProperties": false,
                      "description": "agent kind only.",
                      "properties": {
                        "cancellable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "long_running": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "max_runtime_s": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "long_running",
                        "cancellable",
                        "max_runtime_s"
                      ],
                      "type": "object"
                    },
                    "model_deployment_id": {
                      "description": "model kind (deployment-bound registration) only.",
                      "type": "string"
                    },
                    "model_id": {
                      "description": "model kind (legacy provider binding) only.",
                      "type": "string"
                    },
                    "model_lifecycle": {
                      "description": "Current server-owned lifecycle of a deployment-bound model. Separate from the tenant-controlled arm status.",
                      "enum": [
                        "preview",
                        "active",
                        "deprecated",
                        "retired"
                      ],
                      "type": "string"
                    },
                    "provider": {
                      "description": "model kind (legacy provider binding) only.",
                      "type": "string"
                    },
                    "status": {
                      "$ref": "#/components/schemas/ArmStatus"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Machine-readable reason the arm is degraded/disabled (a probe reason code, provider_unsupported, or source_connection_revoked); null otherwise."
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "arm_id",
                    "kind",
                    "display_name",
                    "capability_tags",
                    "data_class_grants",
                    "cost_class",
                    "status",
                    "status_reason",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Update option",
        "tags": [
          "Registered options"
        ]
      }
    },
    "/v1/auth/session": {
      "delete": {
        "description": "Sign out and revoke the browser session.",
        "operationId": "deleteAuthSession",
        "responses": {
          "204": {
            "description": "Signed out. Idempotent: a missing or already-revoked session cookie also succeeds."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Sign out",
        "tags": [
          "Browser access"
        ]
      },
      "get": {
        "description": "Get the current browser session.",
        "operationId": "getAuthSession",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "display_name": {
                      "type": "string"
                    },
                    "identity": {
                      "additionalProperties": false,
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "subject",
                        "email",
                        "name"
                      ],
                      "type": "object"
                    },
                    "is_demo": {
                      "type": "boolean"
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "role",
                    "is_demo",
                    "identity"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Current session",
        "tags": [
          "Browser access"
        ]
      },
      "post": {
        "description": "Sign in and create a browser session.",
        "operationId": "postAuthSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "redirect_uri": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "state": {
                    "maxLength": 512,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "redirect_uri"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application": {
                      "additionalProperties": false,
                      "properties": {
                        "applied_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "contact_email": {
                          "type": "string"
                        },
                        "requested_display_name": {
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "pending",
                            "approved",
                            "rejected"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "applied_at",
                        "requested_display_name",
                        "contact_email"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "application"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "display_name": {
                      "type": "string"
                    },
                    "identity": {
                      "additionalProperties": false,
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "subject",
                        "email",
                        "name"
                      ],
                      "type": "object"
                    },
                    "is_demo": {
                      "type": "boolean"
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "role",
                    "is_demo",
                    "identity"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "summary": "Sign in",
        "tags": [
          "Browser access"
        ]
      }
    },
    "/v1/auth/signup": {
      "post": {
        "description": "Create an organization when self-service signup is enabled.",
        "operationId": "postAuthSignup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "redirect_uri": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "state": {
                    "maxLength": 512,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "redirect_uri",
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application": {
                      "additionalProperties": false,
                      "properties": {
                        "applied_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "contact_email": {
                          "type": "string"
                        },
                        "requested_display_name": {
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "pending",
                            "approved",
                            "rejected"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "applied_at",
                        "requested_display_name",
                        "contact_email"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "application"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "display_name": {
                      "type": "string"
                    },
                    "identity": {
                      "additionalProperties": false,
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "subject",
                        "email",
                        "name"
                      ],
                      "type": "object"
                    },
                    "is_demo": {
                      "type": "boolean"
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "role",
                    "is_demo",
                    "identity"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application": {
                      "additionalProperties": false,
                      "properties": {
                        "applied_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "contact_email": {
                          "type": "string"
                        },
                        "requested_display_name": {
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "pending",
                            "approved",
                            "rejected"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "applied_at",
                        "requested_display_name",
                        "contact_email"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "application"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "summary": "Create organization",
        "tags": [
          "Browser access"
        ]
      }
    },
    "/v1/auth/signup/name-check": {
      "post": {
        "description": "Check an organization name for availability.",
        "operationId": "postAuthSignupNameCheck",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "The name is available."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "summary": "Check organization name",
        "tags": [
          "Browser access"
        ]
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "description": "Start a Stripe Checkout session for a credit top-up.",
        "operationId": "postBillingCheckout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "return_url": {
                    "deprecated": true,
                    "description": "Deprecated. The server ignores this value and uses its configured application URL.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "topup_usd": {
                    "minimum": 25,
                    "type": "number"
                  }
                },
                "required": [
                  "topup_usd"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "checkout_url": {
                      "description": "Stripe-hosted Checkout page to redirect the browser to.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "checkout_url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Start checkout",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/billing/portal": {
      "post": {
        "description": "Open a Stripe billing portal session.",
        "operationId": "postBillingPortal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "return_url": {
                    "deprecated": true,
                    "description": "Deprecated. The server ignores this value and uses its configured application URL.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "portal_url": {
                      "description": "Stripe-hosted billing portal page to redirect the browser to.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "portal_url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Open billing portal",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/billing/profile": {
      "patch": {
        "description": "Update this organization's billing email.",
        "operationId": "patchBillingProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "billing_email": {
                    "maxLength": 320,
                    "minLength": 3,
                    "type": "string"
                  }
                },
                "required": [
                  "billing_email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "billing_email": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "billing_email"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Update billing email",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/compliance-export": {
      "get": {
        "description": "Download the compliance export for a reporting period.",
        "operationId": "getComplianceExport",
        "parameters": [
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "pattern": "^\\d{4}-\\d{2}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "attestation": {
                      "additionalProperties": false,
                      "properties": {
                        "algorithm": {
                          "enum": [
                            "sha256"
                          ],
                          "type": "string"
                        },
                        "digest": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "algorithm",
                        "digest"
                      ],
                      "type": "object"
                    },
                    "content_policy": {
                      "additionalProperties": false,
                      "properties": {
                        "proposals": {
                          "enum": [
                            "role_scoped_d8b"
                          ],
                          "type": "string"
                        },
                        "receipts": {
                          "enum": [
                            "content_free"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "receipts",
                        "proposals"
                      ],
                      "type": "object"
                    },
                    "decision_log": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "acted_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "action": {
                            "type": "string"
                          },
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "decision_id": {
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "proposal_decision",
                              "execution_cancellation",
                              "api_key_revocation",
                              "registry_action"
                            ],
                            "type": "string"
                          },
                          "proposal": {
                            "additionalProperties": false,
                            "properties": {
                              "arm_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "decided_at": {
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "decided_by": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "diff": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "baseline_hash": {
                                      "type": "string"
                                    },
                                    "candidate_content": {
                                      "type": "string"
                                    },
                                    "candidate_hash": {
                                      "type": "string"
                                    },
                                    "region": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "region",
                                    "baseline_hash",
                                    "candidate_hash"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "execution_id": {
                                "type": "string"
                              },
                              "on_approve": {
                                "additionalProperties": false,
                                "properties": {
                                  "new_artifact_hash": {
                                    "type": "string"
                                  },
                                  "new_version": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "new_version",
                                  "new_artifact_hash"
                                ],
                                "type": "object"
                              },
                              "proposal_id": {
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "pending",
                                  "approved",
                                  "rejected",
                                  "expired"
                                ],
                                "type": "string"
                              },
                              "verifier_evidence": {
                                "additionalProperties": false,
                                "properties": {
                                  "baseline": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "anchor_results": {
                                        "additionalProperties": {
                                          "type": "boolean"
                                        },
                                        "type": "object"
                                      },
                                      "is_correct": {
                                        "type": "boolean"
                                      },
                                      "named_metrics": {
                                        "additionalProperties": {
                                          "type": "number"
                                        },
                                        "type": "object"
                                      },
                                      "quality_score": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "is_correct",
                                      "quality_score"
                                    ],
                                    "type": "object"
                                  },
                                  "candidate": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "anchor_results": {
                                        "additionalProperties": {
                                          "type": "boolean"
                                        },
                                        "type": "object"
                                      },
                                      "is_correct": {
                                        "type": "boolean"
                                      },
                                      "named_metrics": {
                                        "additionalProperties": {
                                          "type": "number"
                                        },
                                        "type": "object"
                                      },
                                      "quality_score": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "is_correct",
                                      "quality_score"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "candidate",
                                  "baseline"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "proposal_id",
                              "arm_id",
                              "execution_id",
                              "status",
                              "diff",
                              "verifier_evidence",
                              "created_at",
                              "decided_at",
                              "decided_by"
                            ],
                            "type": "object"
                          },
                          "resource": {
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "enum": [
                                  "proposal",
                                  "execution",
                                  "api_key",
                                  "arm",
                                  "verifier"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "decision_id",
                          "kind",
                          "action",
                          "resource",
                          "acted_by",
                          "at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "to": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "from",
                        "to"
                      ],
                      "type": "object"
                    },
                    "receipts_ndjson": {
                      "type": "string"
                    },
                    "schema_version": {
                      "enum": [
                        "aud2.v1"
                      ],
                      "type": "string"
                    },
                    "usage_totals": {
                      "additionalProperties": false,
                      "properties": {
                        "calls": {
                          "type": "integer"
                        },
                        "executions": {
                          "type": "integer"
                        },
                        "input_tokens": {
                          "type": "integer"
                        },
                        "output_tokens": {
                          "type": "integer"
                        },
                        "passthrough_usd": {
                          "type": "number"
                        },
                        "platform_usd": {
                          "type": "number"
                        },
                        "slices": {
                          "type": "integer"
                        },
                        "usd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "executions",
                        "slices",
                        "input_tokens",
                        "output_tokens",
                        "calls",
                        "usd",
                        "platform_usd",
                        "passthrough_usd"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "schema_version",
                    "period",
                    "content_policy",
                    "receipts_ndjson",
                    "usage_totals",
                    "decision_log",
                    "attestation"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Download compliance export",
        "tags": [
          "Compliance export"
        ]
      }
    },
    "/v1/credentials": {
      "get": {
        "description": "List this organization's protected credential references.",
        "operationId": "getCredentials",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "credentials": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "credential_ref": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "credential_ref",
                          "display_name",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "credentials"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List credential references",
        "tags": [
          "Credential references"
        ]
      },
      "post": {
        "description": "Claim a protected credential reference prepared for this organization.",
        "operationId": "postCredentials",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "credential_ref": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "credential_ref",
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_ref": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "credential_ref",
                    "display_name",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Claim credential reference",
        "tags": [
          "Credential references"
        ]
      }
    },
    "/v1/demo/session": {
      "post": {
        "description": "Exchange the shared demo code for a short-lived, read-only session.",
        "operationId": "postDemoSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "access_code": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "access_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "display_name": {
                      "type": "string"
                    },
                    "identity": {
                      "additionalProperties": false,
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "subject",
                        "email",
                        "name"
                      ],
                      "type": "object"
                    },
                    "is_demo": {
                      "type": "boolean"
                    },
                    "role": {
                      "enum": [
                        "viewer"
                      ],
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "role",
                    "is_demo",
                    "identity"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "summary": "Start demo session",
        "tags": [
          "Demo"
        ]
      }
    },
    "/v1/eval-summary": {
      "get": {
        "description": "Summarize verifier pass rates and repair history.",
        "operationId": "getEvalSummary",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "pass_rate_trend": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "activity": {
                            "enum": [
                              "customer",
                              "platform_baseline",
                              "platform_echo",
                              "unknown"
                            ],
                            "type": "string"
                          },
                          "attempted_checks": {
                            "type": "integer"
                          },
                          "coverage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "day": {
                            "type": "string"
                          },
                          "mean_quality_score": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pass_rate": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "passed": {
                            "type": "integer"
                          },
                          "technical_failures": {
                            "type": "integer"
                          },
                          "total": {
                            "type": "integer"
                          },
                          "valid_customer_verdicts": {
                            "type": "integer"
                          },
                          "verifier_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "day",
                          "verifier_id",
                          "total",
                          "passed",
                          "pass_rate",
                          "mean_quality_score",
                          "activity",
                          "attempted_checks",
                          "valid_customer_verdicts",
                          "technical_failures",
                          "coverage"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "repair_history": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "arm_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "candidate_score": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "decided_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decision": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "execution_id": {
                            "type": "string"
                          },
                          "parent_artifact_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parent_score": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proposal_id": {
                            "type": "string"
                          },
                          "slice_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "proposal_id",
                          "execution_id",
                          "slice_id",
                          "arm_id",
                          "parent_artifact_id",
                          "parent_score",
                          "candidate_score",
                          "status",
                          "decision",
                          "decided_at",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "window": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "window",
                    "pass_rate_trend",
                    "repair_history"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Evaluation summary",
        "tags": [
          "Evaluation"
        ]
      }
    },
    "/v1/executions": {
      "get": {
        "description": "List executions.",
        "operationId": "getExecutions",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "accepted",
                "queued",
                "running",
                "progress",
                "completed",
                "failed",
                "cancelled",
                "expired"
              ]
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "executions": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "cancelled_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "execution_id": {
                            "type": "string"
                          },
                          "links": {
                            "additionalProperties": false,
                            "properties": {
                              "events": {
                                "type": "string"
                              },
                              "receipt": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "status",
                              "events",
                              "receipt"
                            ],
                            "type": "object"
                          },
                          "mode": {
                            "enum": [
                              "live",
                              "echo"
                            ],
                            "type": "string"
                          },
                          "slices": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "capability": {
                                  "type": "string"
                                },
                                "slice_id": {
                                  "type": "string"
                                },
                                "status": {
                                  "$ref": "#/components/schemas/LifecycleState"
                                }
                              },
                              "required": [
                                "slice_id",
                                "capability",
                                "status"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "status": {
                            "$ref": "#/components/schemas/LifecycleState"
                          }
                        },
                        "required": [
                          "execution_id",
                          "status",
                          "mode",
                          "cancelled_by",
                          "slices",
                          "links",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "executions",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List runs",
        "tags": [
          "Runs"
        ]
      },
      "post": {
        "description": "Submit an execution.",
        "operationId": "postExecutions",
        "parameters": [
          {
            "description": "A unique key for safely retrying this execution submission.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "compose": {
                    "default": "auto",
                    "enum": [
                      "auto"
                    ]
                  },
                  "mode": {
                    "default": "live",
                    "enum": [
                      "live",
                      "echo"
                    ]
                  },
                  "policy": {
                    "additionalProperties": false,
                    "properties": {
                      "budget": {
                        "additionalProperties": false,
                        "properties": {
                          "max_cost_usd": {
                            "exclusiveMinimum": 0,
                            "type": "number"
                          },
                          "max_runtime_s": {
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "max_cost_usd",
                          "max_runtime_s"
                        ],
                        "type": "object"
                      },
                      "cost_coefficient": {
                        "default": 0.5,
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      "data_classes": {
                        "items": {
                          "$ref": "#/components/schemas/DataClass"
                        },
                        "minItems": 1,
                        "type": "array"
                      },
                      "on_eval": {
                        "items": {
                          "$ref": "#/components/schemas/OnEvalAction"
                        },
                        "type": "array",
                        "uniqueItems": true
                      }
                    },
                    "required": [
                      "data_classes",
                      "budget"
                    ],
                    "type": "object"
                  },
                  "routing": {
                    "additionalProperties": false,
                    "properties": {
                      "required_arm_id": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "required_arm_id"
                    ],
                    "type": "object"
                  },
                  "task": {
                    "additionalProperties": false,
                    "properties": {
                      "inputs_ref": {
                        "additionalProperties": false,
                        "properties": {
                          "json": {
                            "type": "object"
                          },
                          "kind": {
                            "enum": [
                              "url_list",
                              "url",
                              "inline_json"
                            ]
                          },
                          "url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "type": "object"
                      },
                      "objective": {
                        "maxLength": 4000,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "objective"
                    ],
                    "type": "object"
                  },
                  "verifier_id": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "task",
                  "policy"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "cancelled_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "links": {
                      "additionalProperties": false,
                      "properties": {
                        "events": {
                          "type": "string"
                        },
                        "receipt": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "events",
                        "receipt"
                      ],
                      "type": "object"
                    },
                    "mode": {
                      "enum": [
                        "live",
                        "echo"
                      ],
                      "type": "string"
                    },
                    "slices": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "capability": {
                            "type": "string"
                          },
                          "slice_id": {
                            "type": "string"
                          },
                          "status": {
                            "$ref": "#/components/schemas/LifecycleState"
                          }
                        },
                        "required": [
                          "slice_id",
                          "capability",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "$ref": "#/components/schemas/LifecycleState"
                    }
                  },
                  "required": [
                    "execution_id",
                    "status",
                    "mode",
                    "cancelled_by",
                    "slices",
                    "links",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Submit run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/v1/executions/{executionId}": {
      "get": {
        "description": "Fetch an execution status snapshot.",
        "operationId": "getExecutionsByExecutionId",
        "parameters": [
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "cancelled_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "links": {
                      "additionalProperties": false,
                      "properties": {
                        "events": {
                          "type": "string"
                        },
                        "receipt": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "events",
                        "receipt"
                      ],
                      "type": "object"
                    },
                    "mode": {
                      "enum": [
                        "live",
                        "echo"
                      ],
                      "type": "string"
                    },
                    "slices": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "capability": {
                            "type": "string"
                          },
                          "slice_id": {
                            "type": "string"
                          },
                          "status": {
                            "$ref": "#/components/schemas/LifecycleState"
                          }
                        },
                        "required": [
                          "slice_id",
                          "capability",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "$ref": "#/components/schemas/LifecycleState"
                    }
                  },
                  "required": [
                    "execution_id",
                    "status",
                    "mode",
                    "cancelled_by",
                    "slices",
                    "links",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Run status",
        "tags": [
          "Runs"
        ]
      }
    },
    "/v1/executions/{executionId}/cancel": {
      "post": {
        "description": "Cancel an execution.",
        "operationId": "postExecutionsByExecutionIdCancel",
        "parameters": [
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "cancelled_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "links": {
                      "additionalProperties": false,
                      "properties": {
                        "events": {
                          "type": "string"
                        },
                        "receipt": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "events",
                        "receipt"
                      ],
                      "type": "object"
                    },
                    "mode": {
                      "enum": [
                        "live",
                        "echo"
                      ],
                      "type": "string"
                    },
                    "slices": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "capability": {
                            "type": "string"
                          },
                          "slice_id": {
                            "type": "string"
                          },
                          "status": {
                            "$ref": "#/components/schemas/LifecycleState"
                          }
                        },
                        "required": [
                          "slice_id",
                          "capability",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "$ref": "#/components/schemas/LifecycleState"
                    }
                  },
                  "required": [
                    "execution_id",
                    "status",
                    "mode",
                    "cancelled_by",
                    "slices",
                    "links",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Cancel run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/v1/executions/{executionId}/events": {
      "get": {
        "description": "List execution events without prompt or result content.",
        "operationId": "getExecutionsByExecutionIdEvents",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "events": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "acted_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "event_id": {
                            "type": "string"
                          },
                          "execution_id": {
                            "type": "string"
                          },
                          "mode": {
                            "enum": [
                              "live",
                              "echo"
                            ],
                            "type": "string"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recorded_check": {
                            "additionalProperties": false,
                            "description": "A check fact recorded for this slice. In a receipt, this is the latest valid recorded-check event; in the event list, it is the fact recorded by that event. If absent, no recorded fact is provided. Do not infer a verdict or a pending evaluation from its absence.",
                            "properties": {
                              "anchor_results": {
                                "additionalProperties": {
                                  "type": "boolean"
                                },
                                "type": "object"
                              },
                              "attempted_verifier_id": {
                                "type": "string"
                              },
                              "check_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The associated check-record ID, when available. Null means no check-record link is provided."
                              },
                              "customer_check_selected": {
                                "description": "False means a customer check was not selected for this run. It does not say whether other checks are configured.",
                                "enum": [
                                  false
                                ],
                                "type": "boolean"
                              },
                              "execution_id": {
                                "type": "string"
                              },
                              "failure_class": {
                                "enum": [
                                  "authentication",
                                  "credential_unavailable",
                                  "timeout",
                                  "network",
                                  "egress_rejected",
                                  "response_too_large",
                                  "http_error",
                                  "invalid_response",
                                  "internal"
                                ],
                                "type": "string"
                              },
                              "identity": {
                                "enum": [
                                  "platform.echo"
                                ],
                                "type": "string"
                              },
                              "is_correct": {
                                "type": "boolean"
                              },
                              "lifecycle_state": {
                                "enum": [
                                  "accepted",
                                  "queued",
                                  "running",
                                  "progress",
                                  "completed",
                                  "failed",
                                  "cancelled",
                                  "expired"
                                ],
                                "type": "string"
                              },
                              "no_evaluation_attempted": {
                                "enum": [
                                  true
                                ],
                                "type": "boolean"
                              },
                              "output_present": {
                                "type": "boolean"
                              },
                              "pending": {
                                "enum": [
                                  true
                                ],
                                "type": "boolean"
                              },
                              "quality_score": {
                                "type": "number"
                              },
                              "reason": {
                                "enum": [
                                  "no_eligible_arms",
                                  "runtime_exceeded",
                                  "arm_not_ready",
                                  "cost_budget_exhausted",
                                  "fallback_exhausted",
                                  "execution_terminal",
                                  "cancelled",
                                  "dispatch_timeout",
                                  "dispatch_network_error",
                                  "dispatch_internal_error",
                                  "candidate_too_large",
                                  "response_too_large",
                                  "internal"
                                ],
                                "type": "string"
                              },
                              "recorded_at": {
                                "description": "When this fact was recorded, rather than when the receipt was retrieved.",
                                "format": "date-time",
                                "type": "string"
                              },
                              "state": {
                                "description": "The kind of fact recorded. customer_verdict contains a returned verdict: read is_correct for pass or rejection. customer_unavailable records a check failure without a correctness verdict. baseline records the built-in output-presence check. platform_test identifies an Echo test. pending_evaluation records a pending evaluation at recorded_at; read the run status separately. terminal_no_evaluation records that the slice ended without attempting a new evaluation and is omitted when the slice already has a durable evaluation fact; it does not erase earlier verification_checks. missing_evidence means evaluation evidence is missing. It provides no verdict and does not identify the cause. unknown_evidence is reserved and currently not emitted by runtime writers; its presence in the schema is not a promise that consumers will receive it.",
                                "enum": [
                                  "customer_verdict",
                                  "customer_unavailable",
                                  "baseline",
                                  "platform_test",
                                  "pending_evaluation",
                                  "terminal_no_evaluation",
                                  "missing_evidence",
                                  "unknown_evidence"
                                ],
                                "type": "string"
                              },
                              "verifier_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "state",
                              "recorded_at"
                            ],
                            "type": "object"
                          },
                          "slice_id": {
                            "type": "string"
                          },
                          "state": {
                            "$ref": "#/components/schemas/LifecycleState"
                          },
                          "type": {
                            "enum": [
                              "lifecycle",
                              "route",
                              "verifier",
                              "verification_check",
                              "recorded_check",
                              "cost",
                              "acted_on_eval",
                              "approval",
                              "lineage",
                              "amendment",
                              "platform_fee",
                              "attempt",
                              "winner"
                            ],
                            "type": "string"
                          },
                          "verification_check": {
                            "additionalProperties": false,
                            "properties": {
                              "activity": {
                                "enum": [
                                  "customer",
                                  "platform_baseline",
                                  "platform_echo",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "arm_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "attempt": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "check_id": {
                                "type": "string"
                              },
                              "failure_class": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "authentication",
                                      "credential_unavailable",
                                      "timeout",
                                      "network",
                                      "egress_rejected",
                                      "response_too_large",
                                      "http_error",
                                      "invalid_response",
                                      "internal"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_correct": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "enum": [
                                  "valid_verdict",
                                  "technical_failure"
                                ],
                                "type": "string"
                              },
                              "phase": {
                                "enum": [
                                  "candidate",
                                  "skill_baseline",
                                  "skill_repair"
                                ],
                                "type": "string"
                              },
                              "quality_score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "verifier_hash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "verifier_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "check_id",
                              "verifier_id",
                              "verifier_hash",
                              "activity",
                              "arm_id",
                              "attempt",
                              "phase",
                              "outcome",
                              "failure_class",
                              "is_correct",
                              "quality_score"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "event_id",
                          "execution_id",
                          "type",
                          "at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "events"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Run events",
        "tags": [
          "Runs"
        ]
      }
    },
    "/v1/executions/{executionId}/result": {
      "get": {
        "description": "Fetch an execution result before it expires.",
        "operationId": "getExecutionsByExecutionIdResult",
        "parameters": [
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "execution_id": {
                      "type": "string"
                    },
                    "final_text": {
                      "type": "string"
                    },
                    "model_provenance": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "deployment": {
                              "additionalProperties": false,
                              "properties": {
                                "fallback_policy": {
                                  "enum": [
                                    "none",
                                    "source_controlled"
                                  ],
                                  "type": "string"
                                },
                                "location": {
                                  "type": "string"
                                },
                                "model_deployment_id": {
                                  "type": "string"
                                },
                                "pricing_basis": {
                                  "enum": [
                                    "source_reported",
                                    "estimated"
                                  ],
                                  "type": "string"
                                },
                                "protocol_profile": {
                                  "enum": [
                                    "openai_responses",
                                    "openai_chat",
                                    "anthropic_messages",
                                    "gemini_generate_content",
                                    "bedrock_converse"
                                  ],
                                  "type": "string"
                                },
                                "route": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model_deployment_id",
                                "protocol_profile",
                                "location",
                                "route",
                                "pricing_basis",
                                "fallback_policy"
                              ],
                              "type": "object"
                            },
                            "requested": {
                              "additionalProperties": false,
                              "properties": {
                                "family": {
                                  "type": "string"
                                },
                                "model_key": {
                                  "type": "string"
                                },
                                "publisher_id": {
                                  "type": "string"
                                },
                                "release": {
                                  "type": "string"
                                },
                                "served_variant_id": {
                                  "type": "string"
                                },
                                "upstream_ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model_key",
                                "publisher_id",
                                "family",
                                "release",
                                "served_variant_id",
                                "upstream_ref"
                              ],
                              "type": "object"
                            },
                            "resolved": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "attestation": {
                                      "enum": [
                                        "source_response",
                                        "gateway_response"
                                      ],
                                      "type": "string"
                                    },
                                    "source_request_id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "upstream_ref",
                                    "source_request_id",
                                    "attestation"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "schema_version": {
                              "enum": [
                                "model-attempt-provenance/v1"
                              ],
                              "type": "string"
                            },
                            "source": {
                              "additionalProperties": false,
                              "properties": {
                                "access_lane": {
                                  "enum": [
                                    "byok",
                                    "millwork_pool"
                                  ],
                                  "type": "string"
                                },
                                "auth_scheme": {
                                  "enum": [
                                    "api_key",
                                    "oauth2",
                                    "aws_sts_sigv4"
                                  ],
                                  "type": "string"
                                },
                                "commercial_owner": {
                                  "enum": [
                                    "customer",
                                    "millwork"
                                  ],
                                  "type": "string"
                                },
                                "connection_id": {
                                  "type": "string"
                                },
                                "source_id": {
                                  "type": "string"
                                },
                                "source_kind": {
                                  "enum": [
                                    "publisher_direct",
                                    "gateway",
                                    "cloud",
                                    "fixture"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source_id",
                                "source_kind",
                                "connection_id",
                                "access_lane",
                                "commercial_owner",
                                "auth_scheme"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "schema_version",
                            "requested",
                            "source",
                            "deployment",
                            "resolved"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "retention_expires_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slice_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "execution_id",
                    "slice_id",
                    "final_text",
                    "model_provenance",
                    "retention_expires_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Run result",
        "tags": [
          "Runs"
        ]
      }
    },
    "/v1/members": {
      "get": {
        "description": "List this organization's members.",
        "operationId": "getMembers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "members": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "identity_email": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "identity_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "identity_subject": {
                            "type": "string"
                          },
                          "invited_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "last_seen_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "role": {
                            "enum": [
                              "owner",
                              "billing_admin",
                              "admin",
                              "developer",
                              "viewer"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "identity_subject",
                          "identity_email",
                          "identity_name",
                          "role",
                          "created_at",
                          "last_seen_at",
                          "invited_by"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "members"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List members",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/members/{subject}": {
      "delete": {
        "description": "Remove a member.",
        "operationId": "deleteMembersBySubject",
        "parameters": [
          {
            "in": "path",
            "name": "subject",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The membership is removed; access ends at the next session mint."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Remove member",
        "tags": [
          "Members"
        ]
      },
      "patch": {
        "description": "Change a member's role.",
        "operationId": "patchMembersBySubject",
        "parameters": [
          {
            "in": "path",
            "name": "subject",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "role": {
                    "enum": [
                      "owner",
                      "billing_admin",
                      "admin",
                      "developer",
                      "viewer"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "identity_email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "identity_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "identity_subject": {
                      "type": "string"
                    },
                    "invited_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_seen_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "identity_subject",
                    "identity_email",
                    "identity_name",
                    "role",
                    "created_at",
                    "last_seen_at",
                    "invited_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change member role",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/members/invites": {
      "get": {
        "description": "List pending invites.",
        "operationId": "getMembersInvites",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "invites": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "expires_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "invited_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "role": {
                            "enum": [
                              "owner",
                              "billing_admin",
                              "admin",
                              "developer",
                              "viewer"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "email",
                          "role",
                          "invited_by",
                          "created_at",
                          "expires_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "invites"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List invitations",
        "tags": [
          "Members"
        ]
      },
      "post": {
        "description": "Invite a member by email.",
        "operationId": "postMembersInvites",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "maxLength": 320,
                    "minLength": 3,
                    "pattern": "^[^@\\s]+@[^@\\s]+$",
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "owner",
                      "billing_admin",
                      "admin",
                      "developer",
                      "viewer"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "auth0_org_id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "invitation_id": {
                      "type": "string"
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "invitation_id",
                    "email",
                    "role",
                    "auth0_org_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Invite member",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/members/invites/{email}": {
      "delete": {
        "description": "Revoke a pending invite.",
        "operationId": "deleteMembersInvitesByEmail",
        "parameters": [
          {
            "in": "path",
            "name": "email",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The pending invite no longer exists."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke invitation",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/members/invites/resend": {
      "post": {
        "description": "Resend a pending invite.",
        "operationId": "postMembersInvitesResend",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "maxLength": 320,
                    "minLength": 3,
                    "pattern": "^[^@\\s]+@[^@\\s]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "invitation_id": {
                      "type": "string"
                    },
                    "invited_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "billing_admin",
                        "admin",
                        "developer",
                        "viewer"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "invitation_id",
                    "email",
                    "role",
                    "invited_by",
                    "created_at",
                    "expires_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Resend invitation",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/model-catalog": {
      "get": {
        "description": "List models this organization can use.",
        "operationId": "getModelCatalog",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "publisher_id",
            "required": false,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source_id",
            "required": false,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "access_lane",
            "required": false,
            "schema": {
              "enum": [
                "byok",
                "millwork_pool"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "catalog_policy": {
                      "description": "Models this organization can use now. Each model requires a checked provider route and either a ready provider connection or access provided by Millwork.",
                      "enum": [
                        "curated_tested_connection_filtered"
                      ],
                      "type": "string"
                    },
                    "models": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "arm_registration_template": {
                            "additionalProperties": false,
                            "description": "POST /v1/arms request body for this model. Send it unchanged; the API rejects changes outside the checked template.",
                            "properties": {
                              "capability_tags": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "cost_class": {
                                "$ref": "#/components/schemas/CostClass"
                              },
                              "data_class_grants": {
                                "items": {
                                  "$ref": "#/components/schemas/DataClass"
                                },
                                "type": "array"
                              },
                              "display_name": {
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "model"
                                ],
                                "type": "string"
                              },
                              "model_deployment_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "display_name",
                              "model_deployment_id",
                              "capability_tags",
                              "data_class_grants",
                              "cost_class"
                            ],
                            "type": "object"
                          },
                          "connection": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "access_lane": {
                                    "enum": [
                                      "byok"
                                    ],
                                    "type": "string"
                                  },
                                  "commercial_owner": {
                                    "enum": [
                                      "customer"
                                    ],
                                    "type": "string"
                                  },
                                  "connection_id": {
                                    "description": "The calling organization's provider connection.",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "access_lane",
                                  "commercial_owner",
                                  "connection_id"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "access_lane": {
                                    "enum": [
                                      "millwork_pool"
                                    ],
                                    "type": "string"
                                  },
                                  "commercial_owner": {
                                    "enum": [
                                      "millwork"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "access_lane",
                                  "commercial_owner"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "deployment": {
                            "additionalProperties": false,
                            "properties": {
                              "assurance_evidence_ref": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "created_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "fallback_policy": {
                                "enum": [
                                  "none",
                                  "source_controlled"
                                ],
                                "type": "string"
                              },
                              "last_tested_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "location": {
                                "type": "string"
                              },
                              "model_deployment_id": {
                                "type": "string"
                              },
                              "model_key": {
                                "type": "string"
                              },
                              "pricing_basis": {
                                "enum": [
                                  "source_reported",
                                  "estimated"
                                ],
                                "type": "string"
                              },
                              "protocol_profile": {
                                "enum": [
                                  "openai_responses",
                                  "openai_chat",
                                  "anthropic_messages",
                                  "gemini_generate_content",
                                  "bedrock_converse"
                                ],
                                "type": "string"
                              },
                              "release_assurance": {
                                "enum": [
                                  "unknown",
                                  "family_alias",
                                  "source_attested_release",
                                  "exact_artifact"
                                ],
                                "type": "string"
                              },
                              "resolution_evidence_ref": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resolved_upstream_ref": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "route": {
                                "type": "string"
                              },
                              "served_variant_id": {
                                "type": "string"
                              },
                              "source_id": {
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "listed",
                                  "disabled"
                                ],
                                "type": "string"
                              },
                              "updated_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "upstream_ref": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "model_deployment_id",
                              "source_id",
                              "model_key",
                              "served_variant_id",
                              "upstream_ref",
                              "release_assurance",
                              "assurance_evidence_ref",
                              "resolved_upstream_ref",
                              "resolution_evidence_ref",
                              "protocol_profile",
                              "location",
                              "route",
                              "fallback_policy",
                              "pricing_basis",
                              "last_tested_at",
                              "status",
                              "created_at",
                              "updated_at"
                            ],
                            "type": "object"
                          },
                          "model": {
                            "additionalProperties": false,
                            "properties": {
                              "capabilities": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "family": {
                                "type": "string"
                              },
                              "lifecycle": {
                                "enum": [
                                  "preview",
                                  "active",
                                  "deprecated",
                                  "retired"
                                ],
                                "type": "string"
                              },
                              "model_key": {
                                "type": "string"
                              },
                              "publisher_id": {
                                "type": "string"
                              },
                              "release": {
                                "type": "string"
                              },
                              "release_license": {
                                "additionalProperties": false,
                                "description": "License is release-scoped; family-wide claims are not accepted.",
                                "properties": {
                                  "commercial_use": {
                                    "enum": [
                                      "allowed",
                                      "restricted",
                                      "unknown"
                                    ],
                                    "type": "string"
                                  },
                                  "evidence_ref": {
                                    "type": "string"
                                  },
                                  "identifier": {
                                    "description": "SPDX expression or a stable source-local license id.",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "identifier",
                                  "commercial_use",
                                  "evidence_ref"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "model_key",
                              "publisher_id",
                              "family",
                              "release",
                              "capabilities",
                              "lifecycle",
                              "release_license"
                            ],
                            "type": "object"
                          },
                          "offering": {
                            "additionalProperties": false,
                            "properties": {
                              "auth_scheme": {
                                "enum": [
                                  "api_key",
                                  "oauth2",
                                  "aws_sts_sigv4"
                                ],
                                "type": "string"
                              },
                              "certification": {
                                "additionalProperties": false,
                                "properties": {
                                  "certification_id": {
                                    "type": "string"
                                  },
                                  "evidence_schema_version": {
                                    "description": "model-source-certification/v1",
                                    "type": "string"
                                  },
                                  "generated_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "standing": {
                                    "enum": [
                                      "conformant",
                                      "exact_artifact"
                                    ],
                                    "type": "string"
                                  },
                                  "subject": {
                                    "additionalProperties": false,
                                    "description": "Model and provider-route facts covered by the certification. Internal evidence connection and ownership fields are not public.",
                                    "properties": {
                                      "auth_scheme": {
                                        "enum": [
                                          "api_key",
                                          "oauth2",
                                          "aws_sts_sigv4"
                                        ],
                                        "type": "string"
                                      },
                                      "location": {
                                        "type": "string"
                                      },
                                      "model_key": {
                                        "type": "string"
                                      },
                                      "pricing_basis": {
                                        "enum": [
                                          "source_reported",
                                          "estimated"
                                        ],
                                        "type": "string"
                                      },
                                      "protocol_profile": {
                                        "enum": [
                                          "openai_responses",
                                          "openai_chat",
                                          "anthropic_messages",
                                          "gemini_generate_content",
                                          "bedrock_converse"
                                        ],
                                        "type": "string"
                                      },
                                      "route": {
                                        "type": "string"
                                      },
                                      "served_variant_id": {
                                        "type": "string"
                                      },
                                      "source_id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model_key",
                                      "served_variant_id",
                                      "source_id",
                                      "protocol_profile",
                                      "auth_scheme",
                                      "location",
                                      "route",
                                      "pricing_basis"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "certification_id",
                                  "evidence_schema_version",
                                  "standing",
                                  "generated_at",
                                  "subject"
                                ],
                                "type": "object"
                              },
                              "data_classes": {
                                "items": {
                                  "$ref": "#/components/schemas/DataClass"
                                },
                                "type": "array"
                              },
                              "fallback_policy": {
                                "enum": [
                                  "none",
                                  "source_controlled"
                                ],
                                "type": "string"
                              },
                              "location": {
                                "type": "string"
                              },
                              "pricing_basis": {
                                "enum": [
                                  "source_reported",
                                  "estimated"
                                ],
                                "type": "string"
                              },
                              "protocol_profile": {
                                "enum": [
                                  "openai_responses",
                                  "openai_chat",
                                  "anthropic_messages",
                                  "gemini_generate_content",
                                  "bedrock_converse"
                                ],
                                "type": "string"
                              },
                              "resolution_evidence_ref": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resolved_upstream_ref": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "route": {
                                "type": "string"
                              },
                              "served_variant": {
                                "additionalProperties": false,
                                "properties": {
                                  "assurance_evidence_ref": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "model_key": {
                                    "type": "string"
                                  },
                                  "release_assurance": {
                                    "enum": [
                                      "unknown",
                                      "family_alias",
                                      "source_attested_release",
                                      "exact_artifact"
                                    ],
                                    "type": "string"
                                  },
                                  "served_variant_id": {
                                    "type": "string"
                                  },
                                  "source_id": {
                                    "type": "string"
                                  },
                                  "upstream_ref": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "served_variant_id",
                                  "source_id",
                                  "model_key",
                                  "upstream_ref",
                                  "release_assurance",
                                  "assurance_evidence_ref"
                                ],
                                "type": "object"
                              },
                              "tested_at": {
                                "format": "date-time",
                                "type": "string"
                              }
                            },
                            "required": [
                              "served_variant",
                              "protocol_profile",
                              "auth_scheme",
                              "data_classes",
                              "fallback_policy",
                              "location",
                              "route",
                              "pricing_basis",
                              "tested_at",
                              "resolved_upstream_ref",
                              "resolution_evidence_ref",
                              "certification"
                            ],
                            "type": "object"
                          },
                          "provenance": {
                            "additionalProperties": false,
                            "properties": {
                              "deployment": {
                                "additionalProperties": false,
                                "properties": {
                                  "fallback_policy": {
                                    "enum": [
                                      "none",
                                      "source_controlled"
                                    ],
                                    "type": "string"
                                  },
                                  "location": {
                                    "type": "string"
                                  },
                                  "model_deployment_id": {
                                    "type": "string"
                                  },
                                  "pricing_basis": {
                                    "enum": [
                                      "source_reported",
                                      "estimated"
                                    ],
                                    "type": "string"
                                  },
                                  "protocol_profile": {
                                    "enum": [
                                      "openai_responses",
                                      "openai_chat",
                                      "anthropic_messages",
                                      "gemini_generate_content",
                                      "bedrock_converse"
                                    ],
                                    "type": "string"
                                  },
                                  "route": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "model_deployment_id",
                                  "protocol_profile",
                                  "location",
                                  "route",
                                  "pricing_basis",
                                  "fallback_policy"
                                ],
                                "type": "object"
                              },
                              "requested": {
                                "additionalProperties": false,
                                "properties": {
                                  "family": {
                                    "type": "string"
                                  },
                                  "model_key": {
                                    "type": "string"
                                  },
                                  "publisher_id": {
                                    "type": "string"
                                  },
                                  "release": {
                                    "type": "string"
                                  },
                                  "served_variant_id": {
                                    "type": "string"
                                  },
                                  "upstream_ref": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "model_key",
                                  "publisher_id",
                                  "family",
                                  "release",
                                  "served_variant_id",
                                  "upstream_ref"
                                ],
                                "type": "object"
                              },
                              "resolved": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "attestation": {
                                        "enum": [
                                          "source_response",
                                          "gateway_response"
                                        ],
                                        "type": "string"
                                      },
                                      "source_request_id": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "upstream_ref": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "upstream_ref",
                                      "source_request_id",
                                      "attestation"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The model identity reported by the provider. It is null in the catalog and filled after a model answers."
                              },
                              "schema_version": {
                                "description": "model-attempt-provenance/v1",
                                "type": "string"
                              },
                              "source": {
                                "oneOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "access_lane": {
                                        "enum": [
                                          "byok"
                                        ],
                                        "type": "string"
                                      },
                                      "auth_scheme": {
                                        "enum": [
                                          "api_key",
                                          "oauth2",
                                          "aws_sts_sigv4"
                                        ],
                                        "type": "string"
                                      },
                                      "commercial_owner": {
                                        "enum": [
                                          "customer"
                                        ],
                                        "type": "string"
                                      },
                                      "connection_id": {
                                        "description": "The calling organization's provider connection.",
                                        "type": "string"
                                      },
                                      "source_id": {
                                        "type": "string"
                                      },
                                      "source_kind": {
                                        "enum": [
                                          "publisher_direct",
                                          "gateway",
                                          "cloud",
                                          "fixture"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source_id",
                                      "source_kind",
                                      "connection_id",
                                      "access_lane",
                                      "commercial_owner",
                                      "auth_scheme"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "access_lane": {
                                        "enum": [
                                          "millwork_pool"
                                        ],
                                        "type": "string"
                                      },
                                      "auth_scheme": {
                                        "enum": [
                                          "api_key",
                                          "oauth2",
                                          "aws_sts_sigv4"
                                        ],
                                        "type": "string"
                                      },
                                      "commercial_owner": {
                                        "enum": [
                                          "millwork"
                                        ],
                                        "type": "string"
                                      },
                                      "source_id": {
                                        "type": "string"
                                      },
                                      "source_kind": {
                                        "enum": [
                                          "publisher_direct",
                                          "gateway",
                                          "cloud",
                                          "fixture"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source_id",
                                      "source_kind",
                                      "access_lane",
                                      "commercial_owner",
                                      "auth_scheme"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "requested",
                              "source",
                              "deployment",
                              "resolved"
                            ],
                            "type": "object"
                          },
                          "source": {
                            "additionalProperties": false,
                            "properties": {
                              "source_id": {
                                "type": "string"
                              },
                              "source_kind": {
                                "enum": [
                                  "publisher_direct",
                                  "gateway",
                                  "cloud",
                                  "fixture"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "source_id",
                              "source_kind"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "model",
                          "source",
                          "offering",
                          "connection",
                          "deployment",
                          "provenance",
                          "arm_registration_template"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Present only when the caller opts into model-key pagination with limit."
                    }
                  },
                  "required": [
                    "catalog_policy",
                    "models"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List available models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v1/model-definitions": {
      "get": {
        "description": "List curated model definitions with a registered offering.",
        "operationId": "getModelDefinitions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "models": {
                      "description": "Curated definitions with at least one registered offering. Metadata only -- never usable supply by itself.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "capabilities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "family": {
                            "type": "string"
                          },
                          "lifecycle": {
                            "enum": [
                              "preview",
                              "active",
                              "deprecated",
                              "retired"
                            ],
                            "type": "string"
                          },
                          "model_key": {
                            "type": "string"
                          },
                          "publisher_id": {
                            "type": "string"
                          },
                          "release": {
                            "type": "string"
                          },
                          "release_license": {
                            "additionalProperties": false,
                            "description": "License is release-scoped; family-wide claims are not accepted.",
                            "properties": {
                              "commercial_use": {
                                "enum": [
                                  "allowed",
                                  "restricted",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "evidence_ref": {
                                "type": "string"
                              },
                              "identifier": {
                                "description": "SPDX expression or a stable source-local license id.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "identifier",
                              "commercial_use",
                              "evidence_ref"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "model_key",
                          "publisher_id",
                          "family",
                          "release",
                          "capabilities",
                          "lifecycle",
                          "release_license"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "schema_version": {
                      "description": "model-source-profiles/v1",
                      "type": "string"
                    }
                  },
                  "required": [
                    "schema_version",
                    "models"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List model definitions",
        "tags": [
          "Model definitions"
        ]
      }
    },
    "/v1/model-deployments": {
      "get": {
        "description": "List this organization's provider model routes.",
        "operationId": "getModelDeployments",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "deployments": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "assurance_evidence_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "connection_id": {
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "fallback_policy": {
                            "enum": [
                              "none",
                              "source_controlled"
                            ],
                            "type": "string"
                          },
                          "last_tested_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "location": {
                            "type": "string"
                          },
                          "model_deployment_id": {
                            "type": "string"
                          },
                          "model_key": {
                            "type": "string"
                          },
                          "pricing_basis": {
                            "enum": [
                              "source_reported",
                              "estimated"
                            ],
                            "type": "string"
                          },
                          "protocol_profile": {
                            "enum": [
                              "openai_responses",
                              "openai_chat",
                              "anthropic_messages",
                              "gemini_generate_content",
                              "bedrock_converse"
                            ],
                            "type": "string"
                          },
                          "release_assurance": {
                            "enum": [
                              "unknown",
                              "family_alias",
                              "source_attested_release",
                              "exact_artifact"
                            ],
                            "type": "string"
                          },
                          "resolution_evidence_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolved_upstream_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "route": {
                            "type": "string"
                          },
                          "served_variant_id": {
                            "type": "string"
                          },
                          "source_id": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "listed",
                              "disabled"
                            ],
                            "type": "string"
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "upstream_ref": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "model_deployment_id",
                          "connection_id",
                          "source_id",
                          "model_key",
                          "served_variant_id",
                          "upstream_ref",
                          "release_assurance",
                          "assurance_evidence_ref",
                          "resolved_upstream_ref",
                          "resolution_evidence_ref",
                          "protocol_profile",
                          "location",
                          "route",
                          "fallback_policy",
                          "pricing_basis",
                          "last_tested_at",
                          "status",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "deployments"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List provider models",
        "tags": [
          "Provider models"
        ]
      }
    },
    "/v1/model-deployments/{modelDeploymentId}": {
      "get": {
        "description": "Fetch one model deployment.",
        "operationId": "getModelDeploymentsByModelDeploymentId",
        "parameters": [
          {
            "in": "path",
            "name": "modelDeploymentId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "assurance_evidence_ref": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "fallback_policy": {
                      "enum": [
                        "none",
                        "source_controlled"
                      ],
                      "type": "string"
                    },
                    "last_tested_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "model_deployment_id": {
                      "type": "string"
                    },
                    "model_key": {
                      "type": "string"
                    },
                    "pricing_basis": {
                      "enum": [
                        "source_reported",
                        "estimated"
                      ],
                      "type": "string"
                    },
                    "protocol_profile": {
                      "enum": [
                        "openai_responses",
                        "openai_chat",
                        "anthropic_messages",
                        "gemini_generate_content",
                        "bedrock_converse"
                      ],
                      "type": "string"
                    },
                    "release_assurance": {
                      "enum": [
                        "unknown",
                        "family_alias",
                        "source_attested_release",
                        "exact_artifact"
                      ],
                      "type": "string"
                    },
                    "resolution_evidence_ref": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolved_upstream_ref": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "route": {
                      "type": "string"
                    },
                    "served_variant_id": {
                      "type": "string"
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "listed",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "upstream_ref": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "model_deployment_id",
                    "connection_id",
                    "source_id",
                    "model_key",
                    "served_variant_id",
                    "upstream_ref",
                    "release_assurance",
                    "assurance_evidence_ref",
                    "resolved_upstream_ref",
                    "resolution_evidence_ref",
                    "protocol_profile",
                    "location",
                    "route",
                    "fallback_policy",
                    "pricing_basis",
                    "last_tested_at",
                    "status",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get provider model",
        "tags": [
          "Provider models"
        ]
      }
    },
    "/v1/model-source-profiles": {
      "get": {
        "description": "List providers this organization can connect.",
        "operationId": "getModelSourceProfiles",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "schema_version": {
                      "enum": [
                        "model-source-profiles/v1"
                      ],
                      "type": "string"
                    },
                    "sources": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "access_lane": {
                            "enum": [
                              "byok"
                            ],
                            "type": "string"
                          },
                          "auth_schemes": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "enum": [
                                    "api_key",
                                    "oauth2",
                                    "aws_sts_sigv4"
                                  ],
                                  "type": "string"
                                },
                                "version": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "version"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "commercial_owner": {
                            "enum": [
                              "customer"
                            ],
                            "type": "string"
                          },
                          "credential_owner": {
                            "enum": [
                              "customer"
                            ],
                            "type": "string"
                          },
                          "endpoint_policy": {
                            "additionalProperties": false,
                            "properties": {
                              "https_required": {
                                "type": "boolean"
                              },
                              "redirects_allowed": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "https_required",
                              "redirects_allowed"
                            ],
                            "type": "object"
                          },
                          "protocol_profiles": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "enum": [
                                    "openai_responses",
                                    "openai_chat",
                                    "anthropic_messages",
                                    "gemini_generate_content",
                                    "bedrock_converse"
                                  ],
                                  "type": "string"
                                },
                                "version": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "version"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "source_id": {
                            "type": "string"
                          },
                          "source_kind": {
                            "enum": [
                              "publisher_direct",
                              "gateway",
                              "cloud",
                              "fixture"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "source_id",
                          "source_kind",
                          "protocol_profiles",
                          "auth_schemes",
                          "endpoint_policy",
                          "access_lane",
                          "credential_owner",
                          "commercial_owner"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "schema_version",
                    "sources"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List available providers",
        "tags": [
          "Available providers"
        ]
      }
    },
    "/v1/proposals": {
      "get": {
        "description": "List repair proposals.",
        "operationId": "getProposals",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "approved",
                "rejected",
                "expired"
              ]
            }
          },
          {
            "in": "query",
            "name": "arm_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "proposals": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "arm_id": {
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "decided_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decided_by": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "diff": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "baseline_hash": {
                                  "type": "string"
                                },
                                "candidate_content": {
                                  "type": "string"
                                },
                                "candidate_hash": {
                                  "type": "string"
                                },
                                "region": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "region",
                                "baseline_hash",
                                "candidate_hash"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "execution_id": {
                            "type": "string"
                          },
                          "on_approve": {
                            "additionalProperties": false,
                            "properties": {
                              "new_artifact_hash": {
                                "type": "string"
                              },
                              "new_version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "new_version",
                              "new_artifact_hash"
                            ],
                            "type": "object"
                          },
                          "proposal_id": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "pending",
                              "approved",
                              "rejected",
                              "expired"
                            ],
                            "type": "string"
                          },
                          "verifier_evidence": {
                            "additionalProperties": false,
                            "properties": {
                              "baseline": {
                                "additionalProperties": false,
                                "properties": {
                                  "anchor_results": {
                                    "additionalProperties": {
                                      "type": "boolean"
                                    },
                                    "type": "object"
                                  },
                                  "is_correct": {
                                    "type": "boolean"
                                  },
                                  "named_metrics": {
                                    "additionalProperties": {
                                      "type": "number"
                                    },
                                    "type": "object"
                                  },
                                  "quality_score": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "is_correct",
                                  "quality_score"
                                ],
                                "type": "object"
                              },
                              "candidate": {
                                "additionalProperties": false,
                                "properties": {
                                  "anchor_results": {
                                    "additionalProperties": {
                                      "type": "boolean"
                                    },
                                    "type": "object"
                                  },
                                  "is_correct": {
                                    "type": "boolean"
                                  },
                                  "named_metrics": {
                                    "additionalProperties": {
                                      "type": "number"
                                    },
                                    "type": "object"
                                  },
                                  "quality_score": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "is_correct",
                                  "quality_score"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "candidate",
                              "baseline"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "proposal_id",
                          "arm_id",
                          "execution_id",
                          "status",
                          "diff",
                          "verifier_evidence",
                          "created_at",
                          "decided_at",
                          "decided_by"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "proposals",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List repair proposals",
        "tags": [
          "Repair proposals"
        ]
      }
    },
    "/v1/proposals/{proposalId}": {
      "get": {
        "description": "Fetch a repair proposal.",
        "operationId": "getProposalsByProposalId",
        "parameters": [
          {
            "in": "path",
            "name": "proposalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "decided_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decided_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "diff": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "baseline_hash": {
                            "type": "string"
                          },
                          "candidate_content": {
                            "type": "string"
                          },
                          "candidate_hash": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "region",
                          "baseline_hash",
                          "candidate_hash"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "on_approve": {
                      "additionalProperties": false,
                      "properties": {
                        "new_artifact_hash": {
                          "type": "string"
                        },
                        "new_version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "new_version",
                        "new_artifact_hash"
                      ],
                      "type": "object"
                    },
                    "proposal_id": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "approved",
                        "rejected",
                        "expired"
                      ],
                      "type": "string"
                    },
                    "verifier_evidence": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        },
                        "candidate": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "candidate",
                        "baseline"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "proposal_id",
                    "arm_id",
                    "execution_id",
                    "status",
                    "diff",
                    "verifier_evidence",
                    "created_at",
                    "decided_at",
                    "decided_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get repair proposal",
        "tags": [
          "Repair proposals"
        ]
      }
    },
    "/v1/proposals/{proposalId}/approve": {
      "post": {
        "description": "Approve a repair proposal.",
        "operationId": "postProposalsByProposalIdApprove",
        "parameters": [
          {
            "in": "path",
            "name": "proposalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "decided_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decided_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "diff": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "baseline_hash": {
                            "type": "string"
                          },
                          "candidate_content": {
                            "type": "string"
                          },
                          "candidate_hash": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "region",
                          "baseline_hash",
                          "candidate_hash"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "on_approve": {
                      "additionalProperties": false,
                      "properties": {
                        "new_artifact_hash": {
                          "type": "string"
                        },
                        "new_version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "new_version",
                        "new_artifact_hash"
                      ],
                      "type": "object"
                    },
                    "proposal_id": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "approved",
                        "rejected",
                        "expired"
                      ],
                      "type": "string"
                    },
                    "verifier_evidence": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        },
                        "candidate": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "candidate",
                        "baseline"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "proposal_id",
                    "arm_id",
                    "execution_id",
                    "status",
                    "diff",
                    "verifier_evidence",
                    "created_at",
                    "decided_at",
                    "decided_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Approve repair proposal",
        "tags": [
          "Repair proposals"
        ]
      }
    },
    "/v1/proposals/{proposalId}/reject": {
      "post": {
        "description": "Reject a repair proposal.",
        "operationId": "postProposalsByProposalIdReject",
        "parameters": [
          {
            "in": "path",
            "name": "proposalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "maxLength": 200,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "arm_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "decided_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decided_by": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "diff": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "baseline_hash": {
                            "type": "string"
                          },
                          "candidate_content": {
                            "type": "string"
                          },
                          "candidate_hash": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "region",
                          "baseline_hash",
                          "candidate_hash"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "on_approve": {
                      "additionalProperties": false,
                      "properties": {
                        "new_artifact_hash": {
                          "type": "string"
                        },
                        "new_version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "new_version",
                        "new_artifact_hash"
                      ],
                      "type": "object"
                    },
                    "proposal_id": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "approved",
                        "rejected",
                        "expired"
                      ],
                      "type": "string"
                    },
                    "verifier_evidence": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        },
                        "candidate": {
                          "additionalProperties": false,
                          "properties": {
                            "anchor_results": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "type": "object"
                            },
                            "is_correct": {
                              "type": "boolean"
                            },
                            "named_metrics": {
                              "additionalProperties": {
                                "type": "number"
                              },
                              "type": "object"
                            },
                            "quality_score": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "is_correct",
                            "quality_score"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "candidate",
                        "baseline"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "proposal_id",
                    "arm_id",
                    "execution_id",
                    "status",
                    "diff",
                    "verifier_evidence",
                    "created_at",
                    "decided_at",
                    "decided_by"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Reject repair proposal",
        "tags": [
          "Repair proposals"
        ]
      }
    },
    "/v1/receipts": {
      "get": {
        "description": "List receipts.",
        "operationId": "getReceipts",
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LifecycleState"
            }
          },
          {
            "in": "query",
            "name": "arm_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "enum": [
                "export"
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "receipts": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "content_policy": {
                            "enum": [
                              "content_free"
                            ],
                            "type": "string"
                          },
                          "execution_id": {
                            "type": "string"
                          },
                          "mode": {
                            "enum": [
                              "live",
                              "echo"
                            ],
                            "type": "string"
                          },
                          "slices": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "acted_on_eval": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "action": {
                                      "$ref": "#/components/schemas/OnEvalAction"
                                    },
                                    "outcome": {
                                      "enum": [
                                        "passed_gate",
                                        "fell_back",
                                        "repair_accepted",
                                        "repair_rejected",
                                        "proposal_created"
                                      ],
                                      "type": "string"
                                    },
                                    "proposal_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "outcome"
                                  ],
                                  "type": "object"
                                },
                                "capability": {
                                  "type": "string"
                                },
                                "cost": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "input_tokens": {
                                      "type": "integer"
                                    },
                                    "latency_ms": {
                                      "type": "integer"
                                    },
                                    "output_tokens": {
                                      "type": "integer"
                                    },
                                    "usd": {
                                      "type": "number"
                                    },
                                    "waiver": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "reason": {
                                          "enum": [
                                            "sandbox_echo_d9"
                                          ],
                                          "type": "string"
                                        },
                                        "waived_usd": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "reason",
                                        "waived_usd"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "usd",
                                    "latency_ms"
                                  ],
                                  "type": "object"
                                },
                                "model_provenance": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "deployment": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "fallback_policy": {
                                          "enum": [
                                            "none",
                                            "source_controlled"
                                          ],
                                          "type": "string"
                                        },
                                        "location": {
                                          "type": "string"
                                        },
                                        "model_deployment_id": {
                                          "type": "string"
                                        },
                                        "pricing_basis": {
                                          "enum": [
                                            "source_reported",
                                            "estimated"
                                          ],
                                          "type": "string"
                                        },
                                        "protocol_profile": {
                                          "enum": [
                                            "openai_responses",
                                            "openai_chat",
                                            "anthropic_messages",
                                            "gemini_generate_content",
                                            "bedrock_converse"
                                          ],
                                          "type": "string"
                                        },
                                        "route": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "model_deployment_id",
                                        "protocol_profile",
                                        "location",
                                        "route",
                                        "pricing_basis",
                                        "fallback_policy"
                                      ],
                                      "type": "object"
                                    },
                                    "requested": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "family": {
                                          "type": "string"
                                        },
                                        "model_key": {
                                          "type": "string"
                                        },
                                        "publisher_id": {
                                          "type": "string"
                                        },
                                        "release": {
                                          "type": "string"
                                        },
                                        "served_variant_id": {
                                          "type": "string"
                                        },
                                        "upstream_ref": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "model_key",
                                        "publisher_id",
                                        "family",
                                        "release",
                                        "served_variant_id",
                                        "upstream_ref"
                                      ],
                                      "type": "object"
                                    },
                                    "resolved": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "attestation": {
                                              "enum": [
                                                "source_response",
                                                "gateway_response"
                                              ],
                                              "type": "string"
                                            },
                                            "source_request_id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "upstream_ref": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "upstream_ref",
                                            "source_request_id",
                                            "attestation"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "schema_version": {
                                      "enum": [
                                        "model-attempt-provenance/v1"
                                      ],
                                      "type": "string"
                                    },
                                    "source": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "access_lane": {
                                          "enum": [
                                            "byok",
                                            "millwork_pool"
                                          ],
                                          "type": "string"
                                        },
                                        "auth_scheme": {
                                          "enum": [
                                            "api_key",
                                            "oauth2",
                                            "aws_sts_sigv4"
                                          ],
                                          "type": "string"
                                        },
                                        "commercial_owner": {
                                          "enum": [
                                            "customer",
                                            "millwork"
                                          ],
                                          "type": "string"
                                        },
                                        "connection_id": {
                                          "type": "string"
                                        },
                                        "source_id": {
                                          "type": "string"
                                        },
                                        "source_kind": {
                                          "enum": [
                                            "publisher_direct",
                                            "gateway",
                                            "cloud",
                                            "fixture"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "source_id",
                                        "source_kind",
                                        "connection_id",
                                        "access_lane",
                                        "commercial_owner",
                                        "auth_scheme"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "requested",
                                    "source",
                                    "deployment",
                                    "resolved"
                                  ],
                                  "type": "object"
                                },
                                "recorded_check": {
                                  "additionalProperties": false,
                                  "description": "A check fact recorded for this slice. In a receipt, this is the latest valid recorded-check event; in the event list, it is the fact recorded by that event. If absent, no recorded fact is provided. Do not infer a verdict or a pending evaluation from its absence.",
                                  "properties": {
                                    "anchor_results": {
                                      "additionalProperties": {
                                        "type": "boolean"
                                      },
                                      "type": "object"
                                    },
                                    "attempted_verifier_id": {
                                      "type": "string"
                                    },
                                    "check_id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The associated check-record ID, when available. Null means no check-record link is provided."
                                    },
                                    "customer_check_selected": {
                                      "description": "False means a customer check was not selected for this run. It does not say whether other checks are configured.",
                                      "enum": [
                                        false
                                      ],
                                      "type": "boolean"
                                    },
                                    "execution_id": {
                                      "type": "string"
                                    },
                                    "failure_class": {
                                      "enum": [
                                        "authentication",
                                        "credential_unavailable",
                                        "timeout",
                                        "network",
                                        "egress_rejected",
                                        "response_too_large",
                                        "http_error",
                                        "invalid_response",
                                        "internal"
                                      ],
                                      "type": "string"
                                    },
                                    "identity": {
                                      "enum": [
                                        "platform.echo"
                                      ],
                                      "type": "string"
                                    },
                                    "is_correct": {
                                      "type": "boolean"
                                    },
                                    "lifecycle_state": {
                                      "enum": [
                                        "accepted",
                                        "queued",
                                        "running",
                                        "progress",
                                        "completed",
                                        "failed",
                                        "cancelled",
                                        "expired"
                                      ],
                                      "type": "string"
                                    },
                                    "no_evaluation_attempted": {
                                      "enum": [
                                        true
                                      ],
                                      "type": "boolean"
                                    },
                                    "output_present": {
                                      "type": "boolean"
                                    },
                                    "pending": {
                                      "enum": [
                                        true
                                      ],
                                      "type": "boolean"
                                    },
                                    "quality_score": {
                                      "type": "number"
                                    },
                                    "reason": {
                                      "enum": [
                                        "no_eligible_arms",
                                        "runtime_exceeded",
                                        "arm_not_ready",
                                        "cost_budget_exhausted",
                                        "fallback_exhausted",
                                        "execution_terminal",
                                        "cancelled",
                                        "dispatch_timeout",
                                        "dispatch_network_error",
                                        "dispatch_internal_error",
                                        "candidate_too_large",
                                        "response_too_large",
                                        "internal"
                                      ],
                                      "type": "string"
                                    },
                                    "recorded_at": {
                                      "description": "When this fact was recorded, rather than when the receipt was retrieved.",
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "state": {
                                      "description": "The kind of fact recorded. customer_verdict contains a returned verdict: read is_correct for pass or rejection. customer_unavailable records a check failure without a correctness verdict. baseline records the built-in output-presence check. platform_test identifies an Echo test. pending_evaluation records a pending evaluation at recorded_at; read the run status separately. terminal_no_evaluation records that the slice ended without attempting a new evaluation and is omitted when the slice already has a durable evaluation fact; it does not erase earlier verification_checks. missing_evidence means evaluation evidence is missing. It provides no verdict and does not identify the cause. unknown_evidence is reserved and currently not emitted by runtime writers; its presence in the schema is not a promise that consumers will receive it.",
                                      "enum": [
                                        "customer_verdict",
                                        "customer_unavailable",
                                        "baseline",
                                        "platform_test",
                                        "pending_evaluation",
                                        "terminal_no_evaluation",
                                        "missing_evidence",
                                        "unknown_evidence"
                                      ],
                                      "type": "string"
                                    },
                                    "verifier_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "recorded_at"
                                  ],
                                  "type": "object"
                                },
                                "route": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cost_coefficient": {
                                      "type": "number"
                                    },
                                    "eligible": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "fallback_chain": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "mode": {
                                      "enum": [
                                        "live",
                                        "echo"
                                      ],
                                      "type": "string"
                                    },
                                    "ranking": {
                                      "enum": [
                                        "performed",
                                        "skipped_platform_proof"
                                      ],
                                      "type": "string"
                                    },
                                    "rejected": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "arm": {
                                            "type": "string"
                                          },
                                          "reason": {
                                            "enum": [
                                              "data_class_not_granted",
                                              "capability_mismatch",
                                              "arm_not_ready"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arm",
                                          "reason"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "required_arm_id": {
                                      "type": "string"
                                    },
                                    "selected_arm": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "selected_arm",
                                    "eligible",
                                    "rejected",
                                    "fallback_chain",
                                    "cost_coefficient"
                                  ],
                                  "type": "object"
                                },
                                "slice_id": {
                                  "type": "string"
                                },
                                "verification_checks": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "activity": {
                                        "enum": [
                                          "customer",
                                          "platform_baseline",
                                          "platform_echo",
                                          "unknown"
                                        ],
                                        "type": "string"
                                      },
                                      "arm_id": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "attempt": {
                                        "anyOf": [
                                          {
                                            "type": "integer"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "check_id": {
                                        "type": "string"
                                      },
                                      "failure_class": {
                                        "anyOf": [
                                          {
                                            "enum": [
                                              "authentication",
                                              "credential_unavailable",
                                              "timeout",
                                              "network",
                                              "egress_rejected",
                                              "response_too_large",
                                              "http_error",
                                              "invalid_response",
                                              "internal"
                                            ],
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "is_correct": {
                                        "anyOf": [
                                          {
                                            "type": "boolean"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "outcome": {
                                        "enum": [
                                          "valid_verdict",
                                          "technical_failure"
                                        ],
                                        "type": "string"
                                      },
                                      "phase": {
                                        "enum": [
                                          "candidate",
                                          "skill_baseline",
                                          "skill_repair"
                                        ],
                                        "type": "string"
                                      },
                                      "quality_score": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "verifier_hash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "verifier_id": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "check_id",
                                      "verifier_id",
                                      "verifier_hash",
                                      "activity",
                                      "arm_id",
                                      "attempt",
                                      "phase",
                                      "outcome",
                                      "failure_class",
                                      "is_correct",
                                      "quality_score"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "verifier": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "anchor_results": {
                                      "additionalProperties": {
                                        "type": "boolean"
                                      },
                                      "type": "object"
                                    },
                                    "contract_sha256": {
                                      "type": "string"
                                    },
                                    "contract_version": {
                                      "type": "string"
                                    },
                                    "correctness_declaration": {
                                      "additionalProperties": false,
                                      "description": "The tenant's own declaration about this verifier's correctness method as it stood when this slice was evaluated. It is self-reported and not independently verified. Absent for evaluations recorded before declarations existed, for the built-in output-presence baseline and for Echo; absence is not a declaration either way.",
                                      "properties": {
                                        "declared_at": {
                                          "format": "date-time",
                                          "type": "string"
                                        },
                                        "method": {
                                          "enum": [
                                            "deterministic"
                                          ],
                                          "type": "string"
                                        },
                                        "statement": {
                                          "enum": [
                                            "Tenant declared deterministic correctness; not independently verified",
                                            "Not declared"
                                          ],
                                          "type": "string"
                                        },
                                        "status": {
                                          "enum": [
                                            "declared",
                                            "not_declared"
                                          ],
                                          "type": "string"
                                        },
                                        "verifier_revision": {
                                          "description": "The verifier definition revision that was evaluated.",
                                          "minimum": 1,
                                          "type": "integer"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "verifier_revision",
                                        "statement"
                                      ],
                                      "type": "object"
                                    },
                                    "hash": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "type": "string"
                                    },
                                    "identity": {
                                      "enum": [
                                        "platform.echo"
                                      ],
                                      "type": "string"
                                    },
                                    "is_correct": {
                                      "type": "boolean"
                                    },
                                    "quality_score": {
                                      "type": "number"
                                    },
                                    "task_sha256": {
                                      "type": "string"
                                    },
                                    "verifier_id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "hash",
                                    "verifier_id",
                                    "is_correct",
                                    "quality_score"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "slice_id",
                                "capability",
                                "route",
                                "cost"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "status": {
                            "$ref": "#/components/schemas/LifecycleState"
                          },
                          "totals": {
                            "additionalProperties": false,
                            "properties": {
                              "platform_fee_usd": {
                                "description": "Millwork's platform fee for this run after any refund, in USD. It is zero for a test run or when Millwork returns the fee because the run failed before any model attempt.",
                                "type": "number"
                              },
                              "runtime_s": {
                                "type": "number"
                              },
                              "usd": {
                                "description": "Model usage recorded for the run, in USD. Excludes the platform fee.",
                                "type": "number"
                              }
                            },
                            "required": [
                              "usd",
                              "platform_fee_usd",
                              "runtime_s"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "execution_id",
                          "status",
                          "mode",
                          "slices",
                          "totals",
                          "content_policy"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "receipts"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List receipts",
        "tags": [
          "Receipts"
        ]
      }
    },
    "/v1/receipts/{executionId}": {
      "get": {
        "description": "Fetch an execution receipt without prompt or result content.",
        "operationId": "getReceiptsByExecutionId",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "enum": [
                "export"
              ]
            }
          },
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "content_policy": {
                      "enum": [
                        "content_free"
                      ],
                      "type": "string"
                    },
                    "execution_id": {
                      "type": "string"
                    },
                    "mode": {
                      "enum": [
                        "live",
                        "echo"
                      ],
                      "type": "string"
                    },
                    "slices": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "acted_on_eval": {
                            "additionalProperties": false,
                            "properties": {
                              "action": {
                                "$ref": "#/components/schemas/OnEvalAction"
                              },
                              "outcome": {
                                "enum": [
                                  "passed_gate",
                                  "fell_back",
                                  "repair_accepted",
                                  "repair_rejected",
                                  "proposal_created"
                                ],
                                "type": "string"
                              },
                              "proposal_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "action",
                              "outcome"
                            ],
                            "type": "object"
                          },
                          "capability": {
                            "type": "string"
                          },
                          "cost": {
                            "additionalProperties": false,
                            "properties": {
                              "input_tokens": {
                                "type": "integer"
                              },
                              "latency_ms": {
                                "type": "integer"
                              },
                              "output_tokens": {
                                "type": "integer"
                              },
                              "usd": {
                                "type": "number"
                              },
                              "waiver": {
                                "additionalProperties": false,
                                "properties": {
                                  "reason": {
                                    "enum": [
                                      "sandbox_echo_d9"
                                    ],
                                    "type": "string"
                                  },
                                  "waived_usd": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "reason",
                                  "waived_usd"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "usd",
                              "latency_ms"
                            ],
                            "type": "object"
                          },
                          "model_provenance": {
                            "additionalProperties": false,
                            "properties": {
                              "deployment": {
                                "additionalProperties": false,
                                "properties": {
                                  "fallback_policy": {
                                    "enum": [
                                      "none",
                                      "source_controlled"
                                    ],
                                    "type": "string"
                                  },
                                  "location": {
                                    "type": "string"
                                  },
                                  "model_deployment_id": {
                                    "type": "string"
                                  },
                                  "pricing_basis": {
                                    "enum": [
                                      "source_reported",
                                      "estimated"
                                    ],
                                    "type": "string"
                                  },
                                  "protocol_profile": {
                                    "enum": [
                                      "openai_responses",
                                      "openai_chat",
                                      "anthropic_messages",
                                      "gemini_generate_content",
                                      "bedrock_converse"
                                    ],
                                    "type": "string"
                                  },
                                  "route": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "model_deployment_id",
                                  "protocol_profile",
                                  "location",
                                  "route",
                                  "pricing_basis",
                                  "fallback_policy"
                                ],
                                "type": "object"
                              },
                              "requested": {
                                "additionalProperties": false,
                                "properties": {
                                  "family": {
                                    "type": "string"
                                  },
                                  "model_key": {
                                    "type": "string"
                                  },
                                  "publisher_id": {
                                    "type": "string"
                                  },
                                  "release": {
                                    "type": "string"
                                  },
                                  "served_variant_id": {
                                    "type": "string"
                                  },
                                  "upstream_ref": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "model_key",
                                  "publisher_id",
                                  "family",
                                  "release",
                                  "served_variant_id",
                                  "upstream_ref"
                                ],
                                "type": "object"
                              },
                              "resolved": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "attestation": {
                                        "enum": [
                                          "source_response",
                                          "gateway_response"
                                        ],
                                        "type": "string"
                                      },
                                      "source_request_id": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "upstream_ref": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "upstream_ref",
                                      "source_request_id",
                                      "attestation"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "schema_version": {
                                "enum": [
                                  "model-attempt-provenance/v1"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "additionalProperties": false,
                                "properties": {
                                  "access_lane": {
                                    "enum": [
                                      "byok",
                                      "millwork_pool"
                                    ],
                                    "type": "string"
                                  },
                                  "auth_scheme": {
                                    "enum": [
                                      "api_key",
                                      "oauth2",
                                      "aws_sts_sigv4"
                                    ],
                                    "type": "string"
                                  },
                                  "commercial_owner": {
                                    "enum": [
                                      "customer",
                                      "millwork"
                                    ],
                                    "type": "string"
                                  },
                                  "connection_id": {
                                    "type": "string"
                                  },
                                  "source_id": {
                                    "type": "string"
                                  },
                                  "source_kind": {
                                    "enum": [
                                      "publisher_direct",
                                      "gateway",
                                      "cloud",
                                      "fixture"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source_id",
                                  "source_kind",
                                  "connection_id",
                                  "access_lane",
                                  "commercial_owner",
                                  "auth_scheme"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "schema_version",
                              "requested",
                              "source",
                              "deployment",
                              "resolved"
                            ],
                            "type": "object"
                          },
                          "recorded_check": {
                            "additionalProperties": false,
                            "description": "A check fact recorded for this slice. In a receipt, this is the latest valid recorded-check event; in the event list, it is the fact recorded by that event. If absent, no recorded fact is provided. Do not infer a verdict or a pending evaluation from its absence.",
                            "properties": {
                              "anchor_results": {
                                "additionalProperties": {
                                  "type": "boolean"
                                },
                                "type": "object"
                              },
                              "attempted_verifier_id": {
                                "type": "string"
                              },
                              "check_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The associated check-record ID, when available. Null means no check-record link is provided."
                              },
                              "customer_check_selected": {
                                "description": "False means a customer check was not selected for this run. It does not say whether other checks are configured.",
                                "enum": [
                                  false
                                ],
                                "type": "boolean"
                              },
                              "execution_id": {
                                "type": "string"
                              },
                              "failure_class": {
                                "enum": [
                                  "authentication",
                                  "credential_unavailable",
                                  "timeout",
                                  "network",
                                  "egress_rejected",
                                  "response_too_large",
                                  "http_error",
                                  "invalid_response",
                                  "internal"
                                ],
                                "type": "string"
                              },
                              "identity": {
                                "enum": [
                                  "platform.echo"
                                ],
                                "type": "string"
                              },
                              "is_correct": {
                                "type": "boolean"
                              },
                              "lifecycle_state": {
                                "enum": [
                                  "accepted",
                                  "queued",
                                  "running",
                                  "progress",
                                  "completed",
                                  "failed",
                                  "cancelled",
                                  "expired"
                                ],
                                "type": "string"
                              },
                              "no_evaluation_attempted": {
                                "enum": [
                                  true
                                ],
                                "type": "boolean"
                              },
                              "output_present": {
                                "type": "boolean"
                              },
                              "pending": {
                                "enum": [
                                  true
                                ],
                                "type": "boolean"
                              },
                              "quality_score": {
                                "type": "number"
                              },
                              "reason": {
                                "enum": [
                                  "no_eligible_arms",
                                  "runtime_exceeded",
                                  "arm_not_ready",
                                  "cost_budget_exhausted",
                                  "fallback_exhausted",
                                  "execution_terminal",
                                  "cancelled",
                                  "dispatch_timeout",
                                  "dispatch_network_error",
                                  "dispatch_internal_error",
                                  "candidate_too_large",
                                  "response_too_large",
                                  "internal"
                                ],
                                "type": "string"
                              },
                              "recorded_at": {
                                "description": "When this fact was recorded, rather than when the receipt was retrieved.",
                                "format": "date-time",
                                "type": "string"
                              },
                              "state": {
                                "description": "The kind of fact recorded. customer_verdict contains a returned verdict: read is_correct for pass or rejection. customer_unavailable records a check failure without a correctness verdict. baseline records the built-in output-presence check. platform_test identifies an Echo test. pending_evaluation records a pending evaluation at recorded_at; read the run status separately. terminal_no_evaluation records that the slice ended without attempting a new evaluation and is omitted when the slice already has a durable evaluation fact; it does not erase earlier verification_checks. missing_evidence means evaluation evidence is missing. It provides no verdict and does not identify the cause. unknown_evidence is reserved and currently not emitted by runtime writers; its presence in the schema is not a promise that consumers will receive it.",
                                "enum": [
                                  "customer_verdict",
                                  "customer_unavailable",
                                  "baseline",
                                  "platform_test",
                                  "pending_evaluation",
                                  "terminal_no_evaluation",
                                  "missing_evidence",
                                  "unknown_evidence"
                                ],
                                "type": "string"
                              },
                              "verifier_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "state",
                              "recorded_at"
                            ],
                            "type": "object"
                          },
                          "route": {
                            "additionalProperties": false,
                            "properties": {
                              "cost_coefficient": {
                                "type": "number"
                              },
                              "eligible": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "fallback_chain": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "mode": {
                                "enum": [
                                  "live",
                                  "echo"
                                ],
                                "type": "string"
                              },
                              "ranking": {
                                "enum": [
                                  "performed",
                                  "skipped_platform_proof"
                                ],
                                "type": "string"
                              },
                              "rejected": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "arm": {
                                      "type": "string"
                                    },
                                    "reason": {
                                      "enum": [
                                        "data_class_not_granted",
                                        "capability_mismatch",
                                        "arm_not_ready"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "arm",
                                    "reason"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "required_arm_id": {
                                "type": "string"
                              },
                              "selected_arm": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "selected_arm",
                              "eligible",
                              "rejected",
                              "fallback_chain",
                              "cost_coefficient"
                            ],
                            "type": "object"
                          },
                          "slice_id": {
                            "type": "string"
                          },
                          "verification_checks": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "activity": {
                                  "enum": [
                                    "customer",
                                    "platform_baseline",
                                    "platform_echo",
                                    "unknown"
                                  ],
                                  "type": "string"
                                },
                                "arm_id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "attempt": {
                                  "anyOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "check_id": {
                                  "type": "string"
                                },
                                "failure_class": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "authentication",
                                        "credential_unavailable",
                                        "timeout",
                                        "network",
                                        "egress_rejected",
                                        "response_too_large",
                                        "http_error",
                                        "invalid_response",
                                        "internal"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "is_correct": {
                                  "anyOf": [
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "outcome": {
                                  "enum": [
                                    "valid_verdict",
                                    "technical_failure"
                                  ],
                                  "type": "string"
                                },
                                "phase": {
                                  "enum": [
                                    "candidate",
                                    "skill_baseline",
                                    "skill_repair"
                                  ],
                                  "type": "string"
                                },
                                "quality_score": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "verifier_hash": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "verifier_id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "check_id",
                                "verifier_id",
                                "verifier_hash",
                                "activity",
                                "arm_id",
                                "attempt",
                                "phase",
                                "outcome",
                                "failure_class",
                                "is_correct",
                                "quality_score"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "verifier": {
                            "additionalProperties": false,
                            "properties": {
                              "anchor_results": {
                                "additionalProperties": {
                                  "type": "boolean"
                                },
                                "type": "object"
                              },
                              "contract_sha256": {
                                "type": "string"
                              },
                              "contract_version": {
                                "type": "string"
                              },
                              "correctness_declaration": {
                                "additionalProperties": false,
                                "description": "The tenant's own declaration about this verifier's correctness method as it stood when this slice was evaluated. It is self-reported and not independently verified. Absent for evaluations recorded before declarations existed, for the built-in output-presence baseline and for Echo; absence is not a declaration either way.",
                                "properties": {
                                  "declared_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "method": {
                                    "enum": [
                                      "deterministic"
                                    ],
                                    "type": "string"
                                  },
                                  "statement": {
                                    "enum": [
                                      "Tenant declared deterministic correctness; not independently verified",
                                      "Not declared"
                                    ],
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "declared",
                                      "not_declared"
                                    ],
                                    "type": "string"
                                  },
                                  "verifier_revision": {
                                    "description": "The verifier definition revision that was evaluated.",
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "status",
                                  "verifier_revision",
                                  "statement"
                                ],
                                "type": "object"
                              },
                              "hash": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "identity": {
                                "enum": [
                                  "platform.echo"
                                ],
                                "type": "string"
                              },
                              "is_correct": {
                                "type": "boolean"
                              },
                              "quality_score": {
                                "type": "number"
                              },
                              "task_sha256": {
                                "type": "string"
                              },
                              "verifier_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "hash",
                              "verifier_id",
                              "is_correct",
                              "quality_score"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "slice_id",
                          "capability",
                          "route",
                          "cost"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "$ref": "#/components/schemas/LifecycleState"
                    },
                    "totals": {
                      "additionalProperties": false,
                      "properties": {
                        "platform_fee_usd": {
                          "description": "Millwork's platform fee for this run after any refund, in USD. It is zero for a test run or when Millwork returns the fee because the run failed before any model attempt.",
                          "type": "number"
                        },
                        "runtime_s": {
                          "type": "number"
                        },
                        "usd": {
                          "description": "Model usage recorded for the run, in USD. Excludes the platform fee.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "usd",
                        "platform_fee_usd",
                        "runtime_s"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "execution_id",
                    "status",
                    "mode",
                    "slices",
                    "totals",
                    "content_policy"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get receipt",
        "tags": [
          "Receipts"
        ]
      }
    },
    "/v1/source-connections": {
      "get": {
        "description": "List this organization's provider connections.",
        "operationId": "getSourceConnections",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "access_lane": {
                            "enum": [
                              "byok",
                              "millwork_pool"
                            ],
                            "type": "string"
                          },
                          "auth_binding_ref": {
                            "type": "string"
                          },
                          "auth_scheme": {
                            "enum": [
                              "api_key",
                              "oauth2",
                              "aws_sts_sigv4"
                            ],
                            "type": "string"
                          },
                          "binding_revision": {
                            "type": "integer"
                          },
                          "commercial_owner": {
                            "enum": [
                              "customer",
                              "millwork"
                            ],
                            "type": "string"
                          },
                          "connection_id": {
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "credential_owner": {
                            "enum": [
                              "customer"
                            ],
                            "type": "string"
                          },
                          "customer_ref": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "last_tested_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revoked_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rotated_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source_id": {
                            "type": "string"
                          },
                          "source_scope": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "account_ref": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "account"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "account_ref"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "kind": {
                                    "enum": [
                                      "project"
                                    ],
                                    "type": "string"
                                  },
                                  "project_ref": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "project_ref"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "kind": {
                                    "enum": [
                                      "region"
                                    ],
                                    "type": "string"
                                  },
                                  "region": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "region"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "status": {
                            "enum": [
                              "active",
                              "disabled"
                            ],
                            "type": "string"
                          },
                          "test_error": {
                            "anyOf": [
                              {
                                "enum": [
                                  "authentication",
                                  "permission",
                                  "model_not_found",
                                  "rate_limited",
                                  "capacity",
                                  "source_5xx",
                                  "provider_insufficient_funds"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "test_state": {
                            "enum": [
                              "untested",
                              "passed",
                              "failed"
                            ],
                            "type": "string"
                          },
                          "tested_binding_revision": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "required": [
                          "connection_id",
                          "source_id",
                          "display_name",
                          "auth_scheme",
                          "auth_binding_ref",
                          "source_scope",
                          "status",
                          "access_lane",
                          "credential_owner",
                          "commercial_owner",
                          "customer_ref",
                          "binding_revision",
                          "tested_binding_revision",
                          "test_state",
                          "test_error",
                          "last_tested_at",
                          "rotated_at",
                          "revoked_at",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "connections"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List provider connections",
        "tags": [
          "Provider connections"
        ]
      },
      "post": {
        "description": "Connect a provider account from a completed credential flow.",
        "operationId": "postSourceConnections",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "auth_scheme": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "handoff_intent_id": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "source_id": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "source_scope": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "account_ref": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "account"
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "account_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "kind": {
                            "enum": [
                              "project"
                            ]
                          },
                          "project_ref": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "project_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "kind": {
                            "enum": [
                              "region"
                            ]
                          },
                          "region": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "region"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "display_name",
                  "source_id",
                  "auth_scheme",
                  "handoff_intent_id",
                  "source_scope"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "access_lane": {
                      "enum": [
                        "byok",
                        "millwork_pool"
                      ],
                      "type": "string"
                    },
                    "auth_binding_ref": {
                      "type": "string"
                    },
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "binding_revision": {
                      "type": "integer"
                    },
                    "commercial_owner": {
                      "enum": [
                        "customer",
                        "millwork"
                      ],
                      "type": "string"
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_owner": {
                      "enum": [
                        "customer"
                      ],
                      "type": "string"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "last_tested_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rotated_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "source_scope": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "account_ref": {
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "account"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "account_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "project"
                              ],
                              "type": "string"
                            },
                            "project_ref": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "project_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "region"
                              ],
                              "type": "string"
                            },
                            "region": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "region"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "test_error": {
                      "anyOf": [
                        {
                          "enum": [
                            "authentication",
                            "permission",
                            "model_not_found",
                            "rate_limited",
                            "capacity",
                            "source_5xx",
                            "provider_insufficient_funds"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "test_state": {
                      "enum": [
                        "untested",
                        "passed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "tested_binding_revision": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "connection_id",
                    "source_id",
                    "display_name",
                    "auth_scheme",
                    "auth_binding_ref",
                    "source_scope",
                    "status",
                    "access_lane",
                    "credential_owner",
                    "commercial_owner",
                    "customer_ref",
                    "binding_revision",
                    "tested_binding_revision",
                    "test_state",
                    "test_error",
                    "last_tested_at",
                    "rotated_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Connect provider",
        "tags": [
          "Provider connections"
        ]
      }
    },
    "/v1/source-connections/{connectionId}": {
      "delete": {
        "description": "Revoke the source connection and disable its dependent deployments and arms.",
        "operationId": "deleteSourceConnectionsByConnectionId",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection_id": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "connection_id",
                    "status",
                    "revoked_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke connection",
        "tags": [
          "Provider connections"
        ]
      },
      "get": {
        "description": "Fetch one source connection.",
        "operationId": "getSourceConnectionsByConnectionId",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "access_lane": {
                      "enum": [
                        "byok",
                        "millwork_pool"
                      ],
                      "type": "string"
                    },
                    "auth_binding_ref": {
                      "type": "string"
                    },
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "binding_revision": {
                      "type": "integer"
                    },
                    "commercial_owner": {
                      "enum": [
                        "customer",
                        "millwork"
                      ],
                      "type": "string"
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_owner": {
                      "enum": [
                        "customer"
                      ],
                      "type": "string"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "last_tested_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rotated_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "source_scope": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "account_ref": {
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "account"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "account_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "project"
                              ],
                              "type": "string"
                            },
                            "project_ref": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "project_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "region"
                              ],
                              "type": "string"
                            },
                            "region": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "region"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "test_error": {
                      "anyOf": [
                        {
                          "enum": [
                            "authentication",
                            "permission",
                            "model_not_found",
                            "rate_limited",
                            "capacity",
                            "source_5xx",
                            "provider_insufficient_funds"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "test_state": {
                      "enum": [
                        "untested",
                        "passed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "tested_binding_revision": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "connection_id",
                    "source_id",
                    "display_name",
                    "auth_scheme",
                    "auth_binding_ref",
                    "source_scope",
                    "status",
                    "access_lane",
                    "credential_owner",
                    "commercial_owner",
                    "customer_ref",
                    "binding_revision",
                    "tested_binding_revision",
                    "test_state",
                    "test_error",
                    "last_tested_at",
                    "rotated_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get provider connection",
        "tags": [
          "Provider connections"
        ]
      }
    },
    "/v1/source-connections/{connectionId}/deployments/sync": {
      "post": {
        "description": "Refresh models available through this provider connection.",
        "operationId": "postSourceConnectionsByConnectionIdDeploymentsSync",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "deployments": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "assurance_evidence_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "connection_id": {
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "fallback_policy": {
                            "enum": [
                              "none",
                              "source_controlled"
                            ],
                            "type": "string"
                          },
                          "last_tested_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "location": {
                            "type": "string"
                          },
                          "model_deployment_id": {
                            "type": "string"
                          },
                          "model_key": {
                            "type": "string"
                          },
                          "pricing_basis": {
                            "enum": [
                              "source_reported",
                              "estimated"
                            ],
                            "type": "string"
                          },
                          "protocol_profile": {
                            "enum": [
                              "openai_responses",
                              "openai_chat",
                              "anthropic_messages",
                              "gemini_generate_content",
                              "bedrock_converse"
                            ],
                            "type": "string"
                          },
                          "release_assurance": {
                            "enum": [
                              "unknown",
                              "family_alias",
                              "source_attested_release",
                              "exact_artifact"
                            ],
                            "type": "string"
                          },
                          "resolution_evidence_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolved_upstream_ref": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "route": {
                            "type": "string"
                          },
                          "served_variant_id": {
                            "type": "string"
                          },
                          "source_id": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "listed",
                              "disabled"
                            ],
                            "type": "string"
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "upstream_ref": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "model_deployment_id",
                          "connection_id",
                          "source_id",
                          "model_key",
                          "served_variant_id",
                          "upstream_ref",
                          "release_assurance",
                          "assurance_evidence_ref",
                          "resolved_upstream_ref",
                          "resolution_evidence_ref",
                          "protocol_profile",
                          "location",
                          "route",
                          "fallback_policy",
                          "pricing_basis",
                          "last_tested_at",
                          "status",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "deployments"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Sync models",
        "tags": [
          "Provider connections"
        ]
      }
    },
    "/v1/source-connections/{connectionId}/rotate": {
      "post": {
        "description": "Rotate the connection's credential binding from a completed handoff; the current binding is kept unless the replacement passes the source test.",
        "operationId": "postSourceConnectionsByConnectionIdRotate",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "handoff_intent_id": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "handoff_intent_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "access_lane": {
                      "enum": [
                        "byok",
                        "millwork_pool"
                      ],
                      "type": "string"
                    },
                    "auth_binding_ref": {
                      "type": "string"
                    },
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "binding_revision": {
                      "type": "integer"
                    },
                    "commercial_owner": {
                      "enum": [
                        "customer",
                        "millwork"
                      ],
                      "type": "string"
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_owner": {
                      "enum": [
                        "customer"
                      ],
                      "type": "string"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "last_tested_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rotated_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "source_scope": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "account_ref": {
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "account"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "account_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "project"
                              ],
                              "type": "string"
                            },
                            "project_ref": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "project_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "region"
                              ],
                              "type": "string"
                            },
                            "region": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "region"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "test_error": {
                      "anyOf": [
                        {
                          "enum": [
                            "authentication",
                            "permission",
                            "model_not_found",
                            "rate_limited",
                            "capacity",
                            "source_5xx",
                            "provider_insufficient_funds"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "test_state": {
                      "enum": [
                        "untested",
                        "passed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "tested_binding_revision": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "connection_id",
                    "source_id",
                    "display_name",
                    "auth_scheme",
                    "auth_binding_ref",
                    "source_scope",
                    "status",
                    "access_lane",
                    "credential_owner",
                    "commercial_owner",
                    "customer_ref",
                    "binding_revision",
                    "tested_binding_revision",
                    "test_state",
                    "test_error",
                    "last_tested_at",
                    "rotated_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rotate credential",
        "tags": [
          "Provider connections"
        ]
      }
    },
    "/v1/source-connections/{connectionId}/test": {
      "post": {
        "description": "Test a provider connection and record the result.",
        "operationId": "postSourceConnectionsByConnectionIdTest",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "access_lane": {
                      "enum": [
                        "byok",
                        "millwork_pool"
                      ],
                      "type": "string"
                    },
                    "auth_binding_ref": {
                      "type": "string"
                    },
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "binding_revision": {
                      "type": "integer"
                    },
                    "commercial_owner": {
                      "enum": [
                        "customer",
                        "millwork"
                      ],
                      "type": "string"
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "credential_owner": {
                      "enum": [
                        "customer"
                      ],
                      "type": "string"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "last_tested_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rotated_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "source_scope": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "account_ref": {
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "account"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "account_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "project"
                              ],
                              "type": "string"
                            },
                            "project_ref": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "project_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "region"
                              ],
                              "type": "string"
                            },
                            "region": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "region"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "test_error": {
                      "anyOf": [
                        {
                          "enum": [
                            "authentication",
                            "permission",
                            "model_not_found",
                            "rate_limited",
                            "capacity",
                            "source_5xx",
                            "provider_insufficient_funds"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "test_state": {
                      "enum": [
                        "untested",
                        "passed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "tested_binding_revision": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "connection_id",
                    "source_id",
                    "display_name",
                    "auth_scheme",
                    "auth_binding_ref",
                    "source_scope",
                    "status",
                    "access_lane",
                    "credential_owner",
                    "commercial_owner",
                    "customer_ref",
                    "binding_revision",
                    "tested_binding_revision",
                    "test_state",
                    "test_error",
                    "last_tested_at",
                    "rotated_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Test connection",
        "tags": [
          "Provider connections"
        ]
      }
    },
    "/v1/source-credential-handoffs": {
      "post": {
        "description": "Start provider approval or secure credential entry in a browser. The secret never passes through this API.",
        "operationId": "postSourceCredentialHandoffs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "auth_scheme": {
                    "enum": [
                      "api_key",
                      "oauth2",
                      "aws_sts_sigv4"
                    ],
                    "type": "string"
                  },
                  "source_id": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "source_id",
                  "auth_scheme"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "completed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "consumed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "continue_url": {
                      "format": "uri",
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "expired_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "failed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "failure_code": {
                      "anyOf": [
                        {
                          "enum": [
                            "cancelled",
                            "broker_error"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "handoff_intent_id": {
                      "type": "string"
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "state": {
                      "enum": [
                        "pending",
                        "completed",
                        "failed",
                        "expired",
                        "consumed"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "handoff_intent_id",
                    "source_id",
                    "auth_scheme",
                    "state",
                    "failure_code",
                    "expires_at",
                    "completed_at",
                    "failed_at",
                    "expired_at",
                    "consumed_at",
                    "created_at",
                    "updated_at",
                    "continue_url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Start credential setup",
        "tags": [
          "Secure credential setup"
        ]
      }
    },
    "/v1/source-credential-handoffs/{handoffIntentId}": {
      "get": {
        "description": "Check provider setup. When completed, use the returned source_scope to create the connection.",
        "operationId": "getSourceCredentialHandoffsByHandoffIntentId",
        "parameters": [
          {
            "in": "path",
            "name": "handoffIntentId",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "auth_scheme": {
                      "enum": [
                        "api_key",
                        "oauth2",
                        "aws_sts_sigv4"
                      ],
                      "type": "string"
                    },
                    "completed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "consumed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "expired_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "failed_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "failure_code": {
                      "anyOf": [
                        {
                          "enum": [
                            "cancelled",
                            "broker_error"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "handoff_intent_id": {
                      "type": "string"
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "source_scope": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "account_ref": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "account"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "account_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "project"
                              ]
                            },
                            "project_ref": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "project_ref"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "region"
                              ]
                            },
                            "region": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "region"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "state": {
                      "enum": [
                        "pending",
                        "completed",
                        "failed",
                        "expired",
                        "consumed"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "handoff_intent_id",
                    "source_id",
                    "auth_scheme",
                    "state",
                    "failure_code",
                    "expires_at",
                    "completed_at",
                    "failed_at",
                    "expired_at",
                    "consumed_at",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Credential setup status",
        "tags": [
          "Secure credential setup"
        ]
      }
    },
    "/v1/tenant-model-selection": {
      "get": {
        "description": "Read the current proved template-managed model.",
        "operationId": "getTenantModelSelection",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "selection": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "application_id": {
                              "type": "string"
                            },
                            "managed_arm_id": {
                              "type": "string"
                            },
                            "model_deployment_id": {
                              "type": "string"
                            },
                            "proof_execution_id": {
                              "type": "string"
                            },
                            "request_policy": {
                              "additionalProperties": false,
                              "properties": {
                                "budget": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "max_cost_usd": {
                                      "type": "number"
                                    },
                                    "max_runtime_s": {
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "max_cost_usd",
                                    "max_runtime_s"
                                  ],
                                  "type": "object"
                                },
                                "data_classes": {
                                  "items": {
                                    "enum": [
                                      "public",
                                      "sandbox",
                                      "tenant_internal"
                                    ],
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "fallback_policy": {
                                  "enum": [
                                    "none"
                                  ],
                                  "type": "string"
                                },
                                "mode": {
                                  "enum": [
                                    "live"
                                  ],
                                  "type": "string"
                                },
                                "verifier": {
                                  "enum": [
                                    "platform.output_presence"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "mode",
                                "data_classes",
                                "budget",
                                "fallback_policy",
                                "verifier"
                              ],
                              "type": "object"
                            },
                            "request_preset_id": {
                              "type": "string"
                            },
                            "selected_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "template_id": {
                              "enum": [
                                "starter",
                                "pooled-open-model",
                                "byok-open-model"
                              ],
                              "type": "string"
                            },
                            "template_version": {
                              "type": "string"
                            },
                            "updated_at": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": [
                            "application_id",
                            "template_id",
                            "template_version",
                            "managed_arm_id",
                            "model_deployment_id",
                            "request_preset_id",
                            "request_policy",
                            "proof_execution_id",
                            "selected_at",
                            "updated_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "selection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get current proved model",
        "tags": [
          "tenant-model-selection"
        ]
      },
      "post": {
        "description": "Select a template-managed model only after its exact-arm proof completed.",
        "operationId": "postTenantModelSelection",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "application_id": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "application_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application_id": {
                      "type": "string"
                    },
                    "managed_arm_id": {
                      "type": "string"
                    },
                    "model_deployment_id": {
                      "type": "string"
                    },
                    "proof_execution_id": {
                      "type": "string"
                    },
                    "request_policy": {
                      "additionalProperties": false,
                      "properties": {
                        "budget": {
                          "additionalProperties": false,
                          "properties": {
                            "max_cost_usd": {
                              "type": "number"
                            },
                            "max_runtime_s": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "max_cost_usd",
                            "max_runtime_s"
                          ],
                          "type": "object"
                        },
                        "data_classes": {
                          "items": {
                            "enum": [
                              "public",
                              "sandbox",
                              "tenant_internal"
                            ],
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "fallback_policy": {
                          "enum": [
                            "none"
                          ],
                          "type": "string"
                        },
                        "mode": {
                          "enum": [
                            "live"
                          ],
                          "type": "string"
                        },
                        "verifier": {
                          "enum": [
                            "platform.output_presence"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "mode",
                        "data_classes",
                        "budget",
                        "fallback_policy",
                        "verifier"
                      ],
                      "type": "object"
                    },
                    "request_preset_id": {
                      "type": "string"
                    },
                    "selected_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "template_id": {
                      "enum": [
                        "starter",
                        "pooled-open-model",
                        "byok-open-model"
                      ],
                      "type": "string"
                    },
                    "template_version": {
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "application_id",
                    "template_id",
                    "template_version",
                    "managed_arm_id",
                    "model_deployment_id",
                    "request_preset_id",
                    "request_policy",
                    "proof_execution_id",
                    "selected_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Select proved model",
        "tags": [
          "tenant-model-selection"
        ]
      }
    },
    "/v1/tenant-template-applications": {
      "get": {
        "description": "Recover an application by its durable tenant-scoped caller key without applying effects.",
        "operationId": "getTenantTemplateApplications",
        "parameters": [
          {
            "in": "query",
            "name": "template_id",
            "required": true,
            "schema": {
              "enum": [
                "starter",
                "pooled-open-model",
                "byok-open-model"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "idempotency_key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "application_id": {
                              "type": "string"
                            },
                            "completed_effects": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "at"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "consent": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "attempt": {
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "continue_url": {
                                      "format": "uri",
                                      "type": "string"
                                    },
                                    "expires_at": {
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "handoff_intent_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "handoff_intent_id",
                                    "continue_url",
                                    "expires_at",
                                    "attempt"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "created_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "diagnostics": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "echo_execution_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "echo_receipt_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "live_execution_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "live_proof": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "digest": {
                                      "pattern": "^sha256:[0-9a-f]{64}$",
                                      "type": "string"
                                    },
                                    "expires_at": {
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "issued_at": {
                                      "format": "date-time",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "digest",
                                    "issued_at",
                                    "expires_at"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "managed_arm_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "next_action": {
                              "additionalProperties": false,
                              "properties": {
                                "detail": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "detail"
                              ],
                              "type": "object"
                            },
                            "receipt": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "href": {
                                      "type": "string"
                                    },
                                    "receipt_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "receipt_id",
                                    "href"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "request_preset_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "result": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "execution_id": {
                                      "type": "string"
                                    },
                                    "href": {
                                      "type": "string"
                                    },
                                    "model_provenance": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "deployment": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "fallback_policy": {
                                              "enum": [
                                                "none",
                                                "source_controlled"
                                              ],
                                              "type": "string"
                                            },
                                            "location": {
                                              "type": "string"
                                            },
                                            "model_deployment_id": {
                                              "type": "string"
                                            },
                                            "pricing_basis": {
                                              "enum": [
                                                "source_reported",
                                                "estimated"
                                              ],
                                              "type": "string"
                                            },
                                            "protocol_profile": {
                                              "enum": [
                                                "openai_responses",
                                                "openai_chat",
                                                "anthropic_messages",
                                                "gemini_generate_content",
                                                "bedrock_converse"
                                              ],
                                              "type": "string"
                                            },
                                            "route": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "model_deployment_id",
                                            "protocol_profile",
                                            "location",
                                            "route",
                                            "pricing_basis",
                                            "fallback_policy"
                                          ],
                                          "type": "object"
                                        },
                                        "requested": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "family": {
                                              "type": "string"
                                            },
                                            "model_key": {
                                              "type": "string"
                                            },
                                            "publisher_id": {
                                              "type": "string"
                                            },
                                            "release": {
                                              "type": "string"
                                            },
                                            "served_variant_id": {
                                              "type": "string"
                                            },
                                            "upstream_ref": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "model_key",
                                            "publisher_id",
                                            "family",
                                            "release",
                                            "served_variant_id",
                                            "upstream_ref"
                                          ],
                                          "type": "object"
                                        },
                                        "resolved": {
                                          "anyOf": [
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "attestation": {
                                                  "enum": [
                                                    "source_response",
                                                    "gateway_response"
                                                  ],
                                                  "type": "string"
                                                },
                                                "source_request_id": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "upstream_ref": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "upstream_ref",
                                                "source_request_id",
                                                "attestation"
                                              ],
                                              "type": "object"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "schema_version": {
                                          "enum": [
                                            "model-attempt-provenance/v1"
                                          ],
                                          "type": "string"
                                        },
                                        "source": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "access_lane": {
                                              "enum": [
                                                "byok",
                                                "millwork_pool"
                                              ],
                                              "type": "string"
                                            },
                                            "auth_scheme": {
                                              "enum": [
                                                "api_key",
                                                "oauth2",
                                                "aws_sts_sigv4"
                                              ],
                                              "type": "string"
                                            },
                                            "commercial_owner": {
                                              "enum": [
                                                "customer",
                                                "millwork"
                                              ],
                                              "type": "string"
                                            },
                                            "connection_id": {
                                              "type": "string"
                                            },
                                            "source_id": {
                                              "type": "string"
                                            },
                                            "source_kind": {
                                              "enum": [
                                                "publisher_direct",
                                                "gateway",
                                                "cloud",
                                                "fixture"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "source_id",
                                            "source_kind",
                                            "connection_id",
                                            "access_lane",
                                            "commercial_owner",
                                            "auth_scheme"
                                          ],
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "schema_version",
                                        "requested",
                                        "source",
                                        "deployment",
                                        "resolved"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "execution_id",
                                    "href",
                                    "model_provenance"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "selected_model_deployment_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_connection_id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "enum": [
                                "planned",
                                "applying",
                                "consent_pending",
                                "arm_ready",
                                "echo_proved",
                                "live_queued",
                                "live_running",
                                "ready",
                                "action_required",
                                "failed_safe"
                              ],
                              "type": "string"
                            },
                            "template_id": {
                              "enum": [
                                "starter",
                                "pooled-open-model",
                                "byok-open-model"
                              ],
                              "type": "string"
                            },
                            "template_version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "application_id",
                            "template_id",
                            "template_version",
                            "state",
                            "completed_effects",
                            "result",
                            "receipt",
                            "managed_arm_id",
                            "echo_execution_id",
                            "echo_receipt_id",
                            "live_execution_id",
                            "selected_model_deployment_id",
                            "source_connection_id",
                            "consent",
                            "live_proof",
                            "next_action",
                            "diagnostics",
                            "created_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "application"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Recover template application",
        "tags": [
          "Tenant template applications"
        ]
      },
      "post": {
        "description": "Create or resume a tenant-template application.",
        "operationId": "postTenantTemplateApplications",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "application_key": {
                    "maxLength": 512,
                    "minLength": 1,
                    "type": "string"
                  },
                  "byok_offering": {
                    "additionalProperties": false,
                    "properties": {
                      "auth_scheme": {
                        "maxLength": 100,
                        "minLength": 1,
                        "type": "string"
                      },
                      "served_variant_id": {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      },
                      "source_id": {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "source_id",
                      "auth_scheme",
                      "served_variant_id"
                    ],
                    "type": "object"
                  },
                  "digest": {
                    "minLength": 8,
                    "type": "string"
                  },
                  "issued_at": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "model_deployment_id": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "template_id": {
                    "enum": [
                      "starter",
                      "pooled-open-model",
                      "byok-open-model"
                    ],
                    "type": "string"
                  },
                  "write": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "digest",
                  "issued_at"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application_id": {
                      "type": "string"
                    },
                    "completed_effects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "consent": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "attempt": {
                              "minimum": 1,
                              "type": "integer"
                            },
                            "continue_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "handoff_intent_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "handoff_intent_id",
                            "continue_url",
                            "expires_at",
                            "attempt"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "diagnostics": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "echo_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "echo_receipt_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_proof": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "digest": {
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "issued_at": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": [
                            "digest",
                            "issued_at",
                            "expires_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "managed_arm_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_action": {
                      "additionalProperties": false,
                      "properties": {
                        "detail": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "detail"
                      ],
                      "type": "object"
                    },
                    "receipt": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "href": {
                              "type": "string"
                            },
                            "receipt_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "receipt_id",
                            "href"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_preset_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "result": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "execution_id": {
                              "type": "string"
                            },
                            "href": {
                              "type": "string"
                            },
                            "model_provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "deployment": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fallback_policy": {
                                      "enum": [
                                        "none",
                                        "source_controlled"
                                      ],
                                      "type": "string"
                                    },
                                    "location": {
                                      "type": "string"
                                    },
                                    "model_deployment_id": {
                                      "type": "string"
                                    },
                                    "pricing_basis": {
                                      "enum": [
                                        "source_reported",
                                        "estimated"
                                      ],
                                      "type": "string"
                                    },
                                    "protocol_profile": {
                                      "enum": [
                                        "openai_responses",
                                        "openai_chat",
                                        "anthropic_messages",
                                        "gemini_generate_content",
                                        "bedrock_converse"
                                      ],
                                      "type": "string"
                                    },
                                    "route": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_deployment_id",
                                    "protocol_profile",
                                    "location",
                                    "route",
                                    "pricing_basis",
                                    "fallback_policy"
                                  ],
                                  "type": "object"
                                },
                                "requested": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "family": {
                                      "type": "string"
                                    },
                                    "model_key": {
                                      "type": "string"
                                    },
                                    "publisher_id": {
                                      "type": "string"
                                    },
                                    "release": {
                                      "type": "string"
                                    },
                                    "served_variant_id": {
                                      "type": "string"
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_key",
                                    "publisher_id",
                                    "family",
                                    "release",
                                    "served_variant_id",
                                    "upstream_ref"
                                  ],
                                  "type": "object"
                                },
                                "resolved": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "attestation": {
                                          "enum": [
                                            "source_response",
                                            "gateway_response"
                                          ],
                                          "type": "string"
                                        },
                                        "source_request_id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "upstream_ref": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "upstream_ref",
                                        "source_request_id",
                                        "attestation"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "schema_version": {
                                  "enum": [
                                    "model-attempt-provenance/v1"
                                  ],
                                  "type": "string"
                                },
                                "source": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "access_lane": {
                                      "enum": [
                                        "byok",
                                        "millwork_pool"
                                      ],
                                      "type": "string"
                                    },
                                    "auth_scheme": {
                                      "enum": [
                                        "api_key",
                                        "oauth2",
                                        "aws_sts_sigv4"
                                      ],
                                      "type": "string"
                                    },
                                    "commercial_owner": {
                                      "enum": [
                                        "customer",
                                        "millwork"
                                      ],
                                      "type": "string"
                                    },
                                    "connection_id": {
                                      "type": "string"
                                    },
                                    "source_id": {
                                      "type": "string"
                                    },
                                    "source_kind": {
                                      "enum": [
                                        "publisher_direct",
                                        "gateway",
                                        "cloud",
                                        "fixture"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "source_id",
                                    "source_kind",
                                    "connection_id",
                                    "access_lane",
                                    "commercial_owner",
                                    "auth_scheme"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "schema_version",
                                "requested",
                                "source",
                                "deployment",
                                "resolved"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "execution_id",
                            "href",
                            "model_provenance"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "selected_model_deployment_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_connection_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "enum": [
                        "planned",
                        "applying",
                        "consent_pending",
                        "arm_ready",
                        "echo_proved",
                        "live_queued",
                        "live_running",
                        "ready",
                        "action_required",
                        "failed_safe"
                      ],
                      "type": "string"
                    },
                    "template_id": {
                      "enum": [
                        "starter",
                        "pooled-open-model",
                        "byok-open-model"
                      ],
                      "type": "string"
                    },
                    "template_version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "application_id",
                    "template_id",
                    "template_version",
                    "state",
                    "completed_effects",
                    "result",
                    "receipt",
                    "managed_arm_id",
                    "echo_execution_id",
                    "echo_receipt_id",
                    "live_execution_id",
                    "selected_model_deployment_id",
                    "source_connection_id",
                    "consent",
                    "live_proof",
                    "next_action",
                    "diagnostics",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Apply tenant template",
        "tags": [
          "Tenant template applications"
        ]
      }
    },
    "/v1/tenant-template-applications/{applicationId}": {
      "get": {
        "description": "Fetch a tenant-template application.",
        "operationId": "getTenantTemplateApplicationsByApplicationId",
        "parameters": [
          {
            "in": "path",
            "name": "applicationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application_id": {
                      "type": "string"
                    },
                    "completed_effects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "consent": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "attempt": {
                              "minimum": 1,
                              "type": "integer"
                            },
                            "continue_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "handoff_intent_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "handoff_intent_id",
                            "continue_url",
                            "expires_at",
                            "attempt"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "diagnostics": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "echo_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "echo_receipt_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_proof": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "digest": {
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "issued_at": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": [
                            "digest",
                            "issued_at",
                            "expires_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "managed_arm_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_action": {
                      "additionalProperties": false,
                      "properties": {
                        "detail": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "detail"
                      ],
                      "type": "object"
                    },
                    "receipt": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "href": {
                              "type": "string"
                            },
                            "receipt_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "receipt_id",
                            "href"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_preset_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "result": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "execution_id": {
                              "type": "string"
                            },
                            "href": {
                              "type": "string"
                            },
                            "model_provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "deployment": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fallback_policy": {
                                      "enum": [
                                        "none",
                                        "source_controlled"
                                      ],
                                      "type": "string"
                                    },
                                    "location": {
                                      "type": "string"
                                    },
                                    "model_deployment_id": {
                                      "type": "string"
                                    },
                                    "pricing_basis": {
                                      "enum": [
                                        "source_reported",
                                        "estimated"
                                      ],
                                      "type": "string"
                                    },
                                    "protocol_profile": {
                                      "enum": [
                                        "openai_responses",
                                        "openai_chat",
                                        "anthropic_messages",
                                        "gemini_generate_content",
                                        "bedrock_converse"
                                      ],
                                      "type": "string"
                                    },
                                    "route": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_deployment_id",
                                    "protocol_profile",
                                    "location",
                                    "route",
                                    "pricing_basis",
                                    "fallback_policy"
                                  ],
                                  "type": "object"
                                },
                                "requested": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "family": {
                                      "type": "string"
                                    },
                                    "model_key": {
                                      "type": "string"
                                    },
                                    "publisher_id": {
                                      "type": "string"
                                    },
                                    "release": {
                                      "type": "string"
                                    },
                                    "served_variant_id": {
                                      "type": "string"
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_key",
                                    "publisher_id",
                                    "family",
                                    "release",
                                    "served_variant_id",
                                    "upstream_ref"
                                  ],
                                  "type": "object"
                                },
                                "resolved": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "attestation": {
                                          "enum": [
                                            "source_response",
                                            "gateway_response"
                                          ],
                                          "type": "string"
                                        },
                                        "source_request_id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "upstream_ref": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "upstream_ref",
                                        "source_request_id",
                                        "attestation"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "schema_version": {
                                  "enum": [
                                    "model-attempt-provenance/v1"
                                  ],
                                  "type": "string"
                                },
                                "source": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "access_lane": {
                                      "enum": [
                                        "byok",
                                        "millwork_pool"
                                      ],
                                      "type": "string"
                                    },
                                    "auth_scheme": {
                                      "enum": [
                                        "api_key",
                                        "oauth2",
                                        "aws_sts_sigv4"
                                      ],
                                      "type": "string"
                                    },
                                    "commercial_owner": {
                                      "enum": [
                                        "customer",
                                        "millwork"
                                      ],
                                      "type": "string"
                                    },
                                    "connection_id": {
                                      "type": "string"
                                    },
                                    "source_id": {
                                      "type": "string"
                                    },
                                    "source_kind": {
                                      "enum": [
                                        "publisher_direct",
                                        "gateway",
                                        "cloud",
                                        "fixture"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "source_id",
                                    "source_kind",
                                    "connection_id",
                                    "access_lane",
                                    "commercial_owner",
                                    "auth_scheme"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "schema_version",
                                "requested",
                                "source",
                                "deployment",
                                "resolved"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "execution_id",
                            "href",
                            "model_provenance"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "selected_model_deployment_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_connection_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "enum": [
                        "planned",
                        "applying",
                        "consent_pending",
                        "arm_ready",
                        "echo_proved",
                        "live_queued",
                        "live_running",
                        "ready",
                        "action_required",
                        "failed_safe"
                      ],
                      "type": "string"
                    },
                    "template_id": {
                      "enum": [
                        "starter",
                        "pooled-open-model",
                        "byok-open-model"
                      ],
                      "type": "string"
                    },
                    "template_version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "application_id",
                    "template_id",
                    "template_version",
                    "state",
                    "completed_effects",
                    "result",
                    "receipt",
                    "managed_arm_id",
                    "echo_execution_id",
                    "echo_receipt_id",
                    "live_execution_id",
                    "selected_model_deployment_id",
                    "source_connection_id",
                    "consent",
                    "live_proof",
                    "next_action",
                    "diagnostics",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Template apply status",
        "tags": [
          "Tenant template applications"
        ]
      }
    },
    "/v1/tenant-template-applications/{applicationId}/resume": {
      "post": {
        "description": "Resume one explicit pool-readiness, BYOK-consent or live-proof step.",
        "operationId": "postTenantTemplateApplicationsByApplicationIdResume",
        "parameters": [
          {
            "in": "path",
            "name": "applicationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "enum": [
                      "poll_consent",
                      "retry_consent",
                      "retry_connection_test",
                      "retry_deployment_sync",
                      "authorize_live_proof",
                      "refresh_pool_readiness",
                      "refresh_byok_readiness"
                    ],
                    "type": "string"
                  },
                  "live_proof_digest": {
                    "pattern": "^sha256:[0-9a-f]{64}$",
                    "type": "string"
                  }
                },
                "required": [
                  "action"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "application_id": {
                      "type": "string"
                    },
                    "completed_effects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "consent": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "attempt": {
                              "minimum": 1,
                              "type": "integer"
                            },
                            "continue_url": {
                              "format": "uri",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "handoff_intent_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "handoff_intent_id",
                            "continue_url",
                            "expires_at",
                            "attempt"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "diagnostics": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "echo_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "echo_receipt_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_execution_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_proof": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "digest": {
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "type": "string"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "issued_at": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": [
                            "digest",
                            "issued_at",
                            "expires_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "managed_arm_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_action": {
                      "additionalProperties": false,
                      "properties": {
                        "detail": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "detail"
                      ],
                      "type": "object"
                    },
                    "receipt": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "href": {
                              "type": "string"
                            },
                            "receipt_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "receipt_id",
                            "href"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_preset_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "result": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "execution_id": {
                              "type": "string"
                            },
                            "href": {
                              "type": "string"
                            },
                            "model_provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "deployment": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fallback_policy": {
                                      "enum": [
                                        "none",
                                        "source_controlled"
                                      ],
                                      "type": "string"
                                    },
                                    "location": {
                                      "type": "string"
                                    },
                                    "model_deployment_id": {
                                      "type": "string"
                                    },
                                    "pricing_basis": {
                                      "enum": [
                                        "source_reported",
                                        "estimated"
                                      ],
                                      "type": "string"
                                    },
                                    "protocol_profile": {
                                      "enum": [
                                        "openai_responses",
                                        "openai_chat",
                                        "anthropic_messages",
                                        "gemini_generate_content",
                                        "bedrock_converse"
                                      ],
                                      "type": "string"
                                    },
                                    "route": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_deployment_id",
                                    "protocol_profile",
                                    "location",
                                    "route",
                                    "pricing_basis",
                                    "fallback_policy"
                                  ],
                                  "type": "object"
                                },
                                "requested": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "family": {
                                      "type": "string"
                                    },
                                    "model_key": {
                                      "type": "string"
                                    },
                                    "publisher_id": {
                                      "type": "string"
                                    },
                                    "release": {
                                      "type": "string"
                                    },
                                    "served_variant_id": {
                                      "type": "string"
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_key",
                                    "publisher_id",
                                    "family",
                                    "release",
                                    "served_variant_id",
                                    "upstream_ref"
                                  ],
                                  "type": "object"
                                },
                                "resolved": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "attestation": {
                                          "enum": [
                                            "source_response",
                                            "gateway_response"
                                          ],
                                          "type": "string"
                                        },
                                        "source_request_id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "upstream_ref": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "upstream_ref",
                                        "source_request_id",
                                        "attestation"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "schema_version": {
                                  "enum": [
                                    "model-attempt-provenance/v1"
                                  ],
                                  "type": "string"
                                },
                                "source": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "access_lane": {
                                      "enum": [
                                        "byok",
                                        "millwork_pool"
                                      ],
                                      "type": "string"
                                    },
                                    "auth_scheme": {
                                      "enum": [
                                        "api_key",
                                        "oauth2",
                                        "aws_sts_sigv4"
                                      ],
                                      "type": "string"
                                    },
                                    "commercial_owner": {
                                      "enum": [
                                        "customer",
                                        "millwork"
                                      ],
                                      "type": "string"
                                    },
                                    "connection_id": {
                                      "type": "string"
                                    },
                                    "source_id": {
                                      "type": "string"
                                    },
                                    "source_kind": {
                                      "enum": [
                                        "publisher_direct",
                                        "gateway",
                                        "cloud",
                                        "fixture"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "source_id",
                                    "source_kind",
                                    "connection_id",
                                    "access_lane",
                                    "commercial_owner",
                                    "auth_scheme"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "schema_version",
                                "requested",
                                "source",
                                "deployment",
                                "resolved"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "execution_id",
                            "href",
                            "model_provenance"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "selected_model_deployment_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_connection_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "enum": [
                        "planned",
                        "applying",
                        "consent_pending",
                        "arm_ready",
                        "echo_proved",
                        "live_queued",
                        "live_running",
                        "ready",
                        "action_required",
                        "failed_safe"
                      ],
                      "type": "string"
                    },
                    "template_id": {
                      "enum": [
                        "starter",
                        "pooled-open-model",
                        "byok-open-model"
                      ],
                      "type": "string"
                    },
                    "template_version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "application_id",
                    "template_id",
                    "template_version",
                    "state",
                    "completed_effects",
                    "result",
                    "receipt",
                    "managed_arm_id",
                    "echo_execution_id",
                    "echo_receipt_id",
                    "live_execution_id",
                    "selected_model_deployment_id",
                    "source_connection_id",
                    "consent",
                    "live_proof",
                    "next_action",
                    "diagnostics",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Resume template application",
        "tags": [
          "Tenant template applications"
        ]
      }
    },
    "/v1/tenant-template-plans": {
      "post": {
        "description": "Resolve a tenant-template plan without writing.",
        "operationId": "postTenantTemplatePlans",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "byok_offering": {
                    "additionalProperties": false,
                    "properties": {
                      "auth_scheme": {
                        "maxLength": 100,
                        "minLength": 1,
                        "type": "string"
                      },
                      "served_variant_id": {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      },
                      "source_id": {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "source_id",
                      "auth_scheme",
                      "served_variant_id"
                    ],
                    "type": "object"
                  },
                  "model_deployment_id": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "template_id": {
                    "enum": [
                      "starter",
                      "pooled-open-model",
                      "byok-open-model"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "access_lane": {
                      "enum": [
                        "diagnostic",
                        "millwork_pool",
                        "byok"
                      ],
                      "type": "string"
                    },
                    "alternative_plans": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "access_lane": {
                            "enum": [
                              "byok"
                            ],
                            "type": "string"
                          },
                          "application_supported": {
                            "type": "boolean"
                          },
                          "next_action": {
                            "additionalProperties": false,
                            "properties": {
                              "detail": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "detail"
                            ],
                            "type": "object"
                          },
                          "template_id": {
                            "enum": [
                              "byok-open-model"
                            ],
                            "type": "string"
                          },
                          "template_version": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "template_id",
                          "template_version",
                          "access_lane",
                          "application_supported",
                          "next_action"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "blockers": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "next_action": {
                            "additionalProperties": false,
                            "properties": {
                              "detail": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "detail"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "code",
                          "detail",
                          "next_action"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "byok_offerings": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "auth_scheme": {
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                          },
                          "certification_id": {
                            "type": "string"
                          },
                          "model_key": {
                            "type": "string"
                          },
                          "served_variant_id": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "source_id": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "source_id",
                          "auth_scheme",
                          "served_variant_id",
                          "model_key",
                          "certification_id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "byok_source": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "auth_scheme": {
                              "type": "string"
                            },
                            "certification_id": {
                              "type": "string"
                            },
                            "model_key": {
                              "type": "string"
                            },
                            "served_variant_id": {
                              "type": "string"
                            },
                            "source_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source_id",
                            "auth_scheme",
                            "model_key",
                            "served_variant_id",
                            "certification_id"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "catalog_row": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "arm_registration_template": {
                              "additionalProperties": false,
                              "description": "POST /v1/arms request body for this model. Send it unchanged; the API rejects changes outside the checked template.",
                              "properties": {
                                "capability_tags": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "cost_class": {
                                  "$ref": "#/components/schemas/CostClass"
                                },
                                "data_class_grants": {
                                  "items": {
                                    "$ref": "#/components/schemas/DataClass"
                                  },
                                  "type": "array"
                                },
                                "display_name": {
                                  "type": "string"
                                },
                                "kind": {
                                  "enum": [
                                    "model"
                                  ],
                                  "type": "string"
                                },
                                "model_deployment_id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "display_name",
                                "model_deployment_id",
                                "capability_tags",
                                "data_class_grants",
                                "cost_class"
                              ],
                              "type": "object"
                            },
                            "connection": {
                              "oneOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "access_lane": {
                                      "enum": [
                                        "byok"
                                      ],
                                      "type": "string"
                                    },
                                    "commercial_owner": {
                                      "enum": [
                                        "customer"
                                      ],
                                      "type": "string"
                                    },
                                    "connection_id": {
                                      "description": "The calling organization's provider connection.",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "access_lane",
                                    "commercial_owner",
                                    "connection_id"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "access_lane": {
                                      "enum": [
                                        "millwork_pool"
                                      ],
                                      "type": "string"
                                    },
                                    "commercial_owner": {
                                      "enum": [
                                        "millwork"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "access_lane",
                                    "commercial_owner"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "deployment": {
                              "additionalProperties": false,
                              "properties": {
                                "assurance_evidence_ref": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "created_at": {
                                  "format": "date-time",
                                  "type": "string"
                                },
                                "fallback_policy": {
                                  "enum": [
                                    "none",
                                    "source_controlled"
                                  ],
                                  "type": "string"
                                },
                                "last_tested_at": {
                                  "format": "date-time",
                                  "type": "string"
                                },
                                "location": {
                                  "type": "string"
                                },
                                "model_deployment_id": {
                                  "type": "string"
                                },
                                "model_key": {
                                  "type": "string"
                                },
                                "pricing_basis": {
                                  "enum": [
                                    "source_reported",
                                    "estimated"
                                  ],
                                  "type": "string"
                                },
                                "protocol_profile": {
                                  "enum": [
                                    "openai_responses",
                                    "openai_chat",
                                    "anthropic_messages",
                                    "gemini_generate_content",
                                    "bedrock_converse"
                                  ],
                                  "type": "string"
                                },
                                "release_assurance": {
                                  "enum": [
                                    "unknown",
                                    "family_alias",
                                    "source_attested_release",
                                    "exact_artifact"
                                  ],
                                  "type": "string"
                                },
                                "resolution_evidence_ref": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "resolved_upstream_ref": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "route": {
                                  "type": "string"
                                },
                                "served_variant_id": {
                                  "type": "string"
                                },
                                "source_id": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "listed",
                                    "disabled"
                                  ],
                                  "type": "string"
                                },
                                "updated_at": {
                                  "format": "date-time",
                                  "type": "string"
                                },
                                "upstream_ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model_deployment_id",
                                "source_id",
                                "model_key",
                                "served_variant_id",
                                "upstream_ref",
                                "release_assurance",
                                "assurance_evidence_ref",
                                "resolved_upstream_ref",
                                "resolution_evidence_ref",
                                "protocol_profile",
                                "location",
                                "route",
                                "fallback_policy",
                                "pricing_basis",
                                "last_tested_at",
                                "status",
                                "created_at",
                                "updated_at"
                              ],
                              "type": "object"
                            },
                            "model": {
                              "additionalProperties": false,
                              "properties": {
                                "capabilities": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "family": {
                                  "type": "string"
                                },
                                "lifecycle": {
                                  "enum": [
                                    "preview",
                                    "active",
                                    "deprecated",
                                    "retired"
                                  ],
                                  "type": "string"
                                },
                                "model_key": {
                                  "type": "string"
                                },
                                "publisher_id": {
                                  "type": "string"
                                },
                                "release": {
                                  "type": "string"
                                },
                                "release_license": {
                                  "additionalProperties": false,
                                  "description": "License is release-scoped; family-wide claims are not accepted.",
                                  "properties": {
                                    "commercial_use": {
                                      "enum": [
                                        "allowed",
                                        "restricted",
                                        "unknown"
                                      ],
                                      "type": "string"
                                    },
                                    "evidence_ref": {
                                      "type": "string"
                                    },
                                    "identifier": {
                                      "description": "SPDX expression or a stable source-local license id.",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "identifier",
                                    "commercial_use",
                                    "evidence_ref"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "model_key",
                                "publisher_id",
                                "family",
                                "release",
                                "capabilities",
                                "lifecycle",
                                "release_license"
                              ],
                              "type": "object"
                            },
                            "offering": {
                              "additionalProperties": false,
                              "properties": {
                                "auth_scheme": {
                                  "enum": [
                                    "api_key",
                                    "oauth2",
                                    "aws_sts_sigv4"
                                  ],
                                  "type": "string"
                                },
                                "certification": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "certification_id": {
                                      "type": "string"
                                    },
                                    "evidence_schema_version": {
                                      "description": "model-source-certification/v1",
                                      "type": "string"
                                    },
                                    "generated_at": {
                                      "format": "date-time",
                                      "type": "string"
                                    },
                                    "standing": {
                                      "enum": [
                                        "conformant",
                                        "exact_artifact"
                                      ],
                                      "type": "string"
                                    },
                                    "subject": {
                                      "additionalProperties": false,
                                      "description": "Model and provider-route facts covered by the certification. Internal evidence connection and ownership fields are not public.",
                                      "properties": {
                                        "auth_scheme": {
                                          "enum": [
                                            "api_key",
                                            "oauth2",
                                            "aws_sts_sigv4"
                                          ],
                                          "type": "string"
                                        },
                                        "location": {
                                          "type": "string"
                                        },
                                        "model_key": {
                                          "type": "string"
                                        },
                                        "pricing_basis": {
                                          "enum": [
                                            "source_reported",
                                            "estimated"
                                          ],
                                          "type": "string"
                                        },
                                        "protocol_profile": {
                                          "enum": [
                                            "openai_responses",
                                            "openai_chat",
                                            "anthropic_messages",
                                            "gemini_generate_content",
                                            "bedrock_converse"
                                          ],
                                          "type": "string"
                                        },
                                        "route": {
                                          "type": "string"
                                        },
                                        "served_variant_id": {
                                          "type": "string"
                                        },
                                        "source_id": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "model_key",
                                        "served_variant_id",
                                        "source_id",
                                        "protocol_profile",
                                        "auth_scheme",
                                        "location",
                                        "route",
                                        "pricing_basis"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "certification_id",
                                    "evidence_schema_version",
                                    "standing",
                                    "generated_at",
                                    "subject"
                                  ],
                                  "type": "object"
                                },
                                "data_classes": {
                                  "items": {
                                    "$ref": "#/components/schemas/DataClass"
                                  },
                                  "type": "array"
                                },
                                "fallback_policy": {
                                  "enum": [
                                    "none",
                                    "source_controlled"
                                  ],
                                  "type": "string"
                                },
                                "location": {
                                  "type": "string"
                                },
                                "pricing_basis": {
                                  "enum": [
                                    "source_reported",
                                    "estimated"
                                  ],
                                  "type": "string"
                                },
                                "protocol_profile": {
                                  "enum": [
                                    "openai_responses",
                                    "openai_chat",
                                    "anthropic_messages",
                                    "gemini_generate_content",
                                    "bedrock_converse"
                                  ],
                                  "type": "string"
                                },
                                "resolution_evidence_ref": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "resolved_upstream_ref": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "route": {
                                  "type": "string"
                                },
                                "served_variant": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assurance_evidence_ref": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "model_key": {
                                      "type": "string"
                                    },
                                    "release_assurance": {
                                      "enum": [
                                        "unknown",
                                        "family_alias",
                                        "source_attested_release",
                                        "exact_artifact"
                                      ],
                                      "type": "string"
                                    },
                                    "served_variant_id": {
                                      "type": "string"
                                    },
                                    "source_id": {
                                      "type": "string"
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "served_variant_id",
                                    "source_id",
                                    "model_key",
                                    "upstream_ref",
                                    "release_assurance",
                                    "assurance_evidence_ref"
                                  ],
                                  "type": "object"
                                },
                                "tested_at": {
                                  "format": "date-time",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "served_variant",
                                "protocol_profile",
                                "auth_scheme",
                                "data_classes",
                                "fallback_policy",
                                "location",
                                "route",
                                "pricing_basis",
                                "tested_at",
                                "resolved_upstream_ref",
                                "resolution_evidence_ref",
                                "certification"
                              ],
                              "type": "object"
                            },
                            "provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "deployment": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fallback_policy": {
                                      "enum": [
                                        "none",
                                        "source_controlled"
                                      ],
                                      "type": "string"
                                    },
                                    "location": {
                                      "type": "string"
                                    },
                                    "model_deployment_id": {
                                      "type": "string"
                                    },
                                    "pricing_basis": {
                                      "enum": [
                                        "source_reported",
                                        "estimated"
                                      ],
                                      "type": "string"
                                    },
                                    "protocol_profile": {
                                      "enum": [
                                        "openai_responses",
                                        "openai_chat",
                                        "anthropic_messages",
                                        "gemini_generate_content",
                                        "bedrock_converse"
                                      ],
                                      "type": "string"
                                    },
                                    "route": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_deployment_id",
                                    "protocol_profile",
                                    "location",
                                    "route",
                                    "pricing_basis",
                                    "fallback_policy"
                                  ],
                                  "type": "object"
                                },
                                "requested": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "family": {
                                      "type": "string"
                                    },
                                    "model_key": {
                                      "type": "string"
                                    },
                                    "publisher_id": {
                                      "type": "string"
                                    },
                                    "release": {
                                      "type": "string"
                                    },
                                    "served_variant_id": {
                                      "type": "string"
                                    },
                                    "upstream_ref": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model_key",
                                    "publisher_id",
                                    "family",
                                    "release",
                                    "served_variant_id",
                                    "upstream_ref"
                                  ],
                                  "type": "object"
                                },
                                "resolved": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "attestation": {
                                          "enum": [
                                            "source_response",
                                            "gateway_response"
                                          ],
                                          "type": "string"
                                        },
                                        "source_request_id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "upstream_ref": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "upstream_ref",
                                        "source_request_id",
                                        "attestation"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The model identity reported by the provider. It is null in the catalog and filled after a model answers."
                                },
                                "schema_version": {
                                  "description": "model-attempt-provenance/v1",
                                  "type": "string"
                                },
                                "source": {
                                  "oneOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "access_lane": {
                                          "enum": [
                                            "byok"
                                          ],
                                          "type": "string"
                                        },
                                        "auth_scheme": {
                                          "enum": [
                                            "api_key",
                                            "oauth2",
                                            "aws_sts_sigv4"
                                          ],
                                          "type": "string"
                                        },
                                        "commercial_owner": {
                                          "enum": [
                                            "customer"
                                          ],
                                          "type": "string"
                                        },
                                        "connection_id": {
                                          "description": "The calling organization's provider connection.",
                                          "type": "string"
                                        },
                                        "source_id": {
                                          "type": "string"
                                        },
                                        "source_kind": {
                                          "enum": [
                                            "publisher_direct",
                                            "gateway",
                                            "cloud",
                                            "fixture"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "source_id",
                                        "source_kind",
                                        "connection_id",
                                        "access_lane",
                                        "commercial_owner",
                                        "auth_scheme"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "access_lane": {
                                          "enum": [
                                            "millwork_pool"
                                          ],
                                          "type": "string"
                                        },
                                        "auth_scheme": {
                                          "enum": [
                                            "api_key",
                                            "oauth2",
                                            "aws_sts_sigv4"
                                          ],
                                          "type": "string"
                                        },
                                        "commercial_owner": {
                                          "enum": [
                                            "millwork"
                                          ],
                                          "type": "string"
                                        },
                                        "source_id": {
                                          "type": "string"
                                        },
                                        "source_kind": {
                                          "enum": [
                                            "publisher_direct",
                                            "gateway",
                                            "cloud",
                                            "fixture"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "source_id",
                                        "source_kind",
                                        "access_lane",
                                        "commercial_owner",
                                        "auth_scheme"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "requested",
                                "source",
                                "deployment",
                                "resolved"
                              ],
                              "type": "object"
                            },
                            "source": {
                              "additionalProperties": false,
                              "properties": {
                                "source_id": {
                                  "type": "string"
                                },
                                "source_kind": {
                                  "enum": [
                                    "publisher_direct",
                                    "gateway",
                                    "cloud",
                                    "fixture"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source_id",
                                "source_kind"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "model",
                            "source",
                            "offering",
                            "connection",
                            "deployment",
                            "provenance",
                            "arm_registration_template"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "digest": {
                      "pattern": "^sha256:[0-9a-f]{64}$",
                      "type": "string"
                    },
                    "effects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "description"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "file_manifest": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "kind": {
                            "enum": [
                              "secretless_config",
                              "env_placeholders",
                              "node_ts_example"
                            ],
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "kind"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "issued_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "maximum_spend_usd": {
                      "type": "number"
                    },
                    "qualification": {
                      "additionalProperties": false,
                      "properties": {
                        "next_action": {
                          "additionalProperties": false,
                          "properties": {
                            "detail": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "detail"
                          ],
                          "type": "object"
                        },
                        "state": {
                          "enum": [
                            "no_credential",
                            "preview_pending_or_rejected",
                            "tenant_not_admitted",
                            "organization_invite_required",
                            "role_lacks_permission",
                            "approved"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "state",
                        "next_action"
                      ],
                      "type": "object"
                    },
                    "request_policy": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "budget": {
                              "additionalProperties": false,
                              "properties": {
                                "max_cost_usd": {
                                  "type": "number"
                                },
                                "max_runtime_s": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "max_cost_usd",
                                "max_runtime_s"
                              ],
                              "type": "object"
                            },
                            "data_classes": {
                              "items": {
                                "$ref": "#/components/schemas/DataClass"
                              },
                              "type": "array"
                            },
                            "fallback_policy": {
                              "enum": [
                                "none"
                              ],
                              "type": "string"
                            },
                            "mode": {
                              "enum": [
                                "echo",
                                "live"
                              ],
                              "type": "string"
                            },
                            "verifier": {
                              "enum": [
                                "platform.echo",
                                "platform.output_presence"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "mode",
                            "data_classes",
                            "budget",
                            "fallback_policy",
                            "verifier"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_preset_id": {
                      "type": "string"
                    },
                    "starter_credit": {
                      "additionalProperties": false,
                      "properties": {
                        "balance_usd": {
                          "type": "number"
                        },
                        "covers_maximum_spend": {
                          "type": "boolean"
                        },
                        "funded_state": {
                          "enum": [
                            "funded",
                            "sandbox"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "balance_usd",
                        "funded_state",
                        "covers_maximum_spend"
                      ],
                      "type": "object"
                    },
                    "template_id": {
                      "enum": [
                        "starter",
                        "pooled-open-model",
                        "byok-open-model"
                      ],
                      "type": "string"
                    },
                    "template_version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "template_id",
                    "template_version",
                    "request_preset_id",
                    "issued_at",
                    "expires_at",
                    "qualification",
                    "access_lane",
                    "catalog_row",
                    "byok_source",
                    "blockers",
                    "alternative_plans",
                    "effects",
                    "request_policy",
                    "starter_credit",
                    "maximum_spend_usd",
                    "file_manifest",
                    "digest"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Resolve tenant-template plan",
        "tags": [
          "Tenant template plans"
        ]
      }
    },
    "/v1/tenant-templates": {
      "get": {
        "description": "List eligible tenant templates.",
        "operationId": "getTenantTemplates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "templates": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "access_lane": {
                            "enum": [
                              "diagnostic",
                              "millwork_pool",
                              "byok"
                            ],
                            "type": "string"
                          },
                          "alternative_plans": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "access_lane": {
                                  "enum": [
                                    "byok"
                                  ],
                                  "type": "string"
                                },
                                "application_supported": {
                                  "type": "boolean"
                                },
                                "next_action": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "detail": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "detail"
                                  ],
                                  "type": "object"
                                },
                                "template_id": {
                                  "enum": [
                                    "byok-open-model"
                                  ],
                                  "type": "string"
                                },
                                "template_version": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "template_id",
                                "template_version",
                                "access_lane",
                                "application_supported",
                                "next_action"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "blockers": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "detail": {
                                  "type": "string"
                                },
                                "next_action": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "detail": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "detail"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "code",
                                "detail",
                                "next_action"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "byok_offerings": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "auth_scheme": {
                                  "maxLength": 100,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "certification_id": {
                                  "type": "string"
                                },
                                "model_key": {
                                  "type": "string"
                                },
                                "served_variant_id": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "source_id": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source_id",
                                "auth_scheme",
                                "served_variant_id",
                                "model_key",
                                "certification_id"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "catalog_row": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "arm_registration_template": {
                                    "additionalProperties": false,
                                    "description": "POST /v1/arms request body for this model. Send it unchanged; the API rejects changes outside the checked template.",
                                    "properties": {
                                      "capability_tags": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "cost_class": {
                                        "$ref": "#/components/schemas/CostClass"
                                      },
                                      "data_class_grants": {
                                        "items": {
                                          "$ref": "#/components/schemas/DataClass"
                                        },
                                        "type": "array"
                                      },
                                      "display_name": {
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "model"
                                        ],
                                        "type": "string"
                                      },
                                      "model_deployment_id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "display_name",
                                      "model_deployment_id",
                                      "capability_tags",
                                      "data_class_grants",
                                      "cost_class"
                                    ],
                                    "type": "object"
                                  },
                                  "connection": {
                                    "oneOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "access_lane": {
                                            "enum": [
                                              "byok"
                                            ],
                                            "type": "string"
                                          },
                                          "commercial_owner": {
                                            "enum": [
                                              "customer"
                                            ],
                                            "type": "string"
                                          },
                                          "connection_id": {
                                            "description": "The calling organization's provider connection.",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "access_lane",
                                          "commercial_owner",
                                          "connection_id"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "access_lane": {
                                            "enum": [
                                              "millwork_pool"
                                            ],
                                            "type": "string"
                                          },
                                          "commercial_owner": {
                                            "enum": [
                                              "millwork"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "access_lane",
                                          "commercial_owner"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "deployment": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "assurance_evidence_ref": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "created_at": {
                                        "format": "date-time",
                                        "type": "string"
                                      },
                                      "fallback_policy": {
                                        "enum": [
                                          "none",
                                          "source_controlled"
                                        ],
                                        "type": "string"
                                      },
                                      "last_tested_at": {
                                        "format": "date-time",
                                        "type": "string"
                                      },
                                      "location": {
                                        "type": "string"
                                      },
                                      "model_deployment_id": {
                                        "type": "string"
                                      },
                                      "model_key": {
                                        "type": "string"
                                      },
                                      "pricing_basis": {
                                        "enum": [
                                          "source_reported",
                                          "estimated"
                                        ],
                                        "type": "string"
                                      },
                                      "protocol_profile": {
                                        "enum": [
                                          "openai_responses",
                                          "openai_chat",
                                          "anthropic_messages",
                                          "gemini_generate_content",
                                          "bedrock_converse"
                                        ],
                                        "type": "string"
                                      },
                                      "release_assurance": {
                                        "enum": [
                                          "unknown",
                                          "family_alias",
                                          "source_attested_release",
                                          "exact_artifact"
                                        ],
                                        "type": "string"
                                      },
                                      "resolution_evidence_ref": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "resolved_upstream_ref": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "route": {
                                        "type": "string"
                                      },
                                      "served_variant_id": {
                                        "type": "string"
                                      },
                                      "source_id": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "enum": [
                                          "listed",
                                          "disabled"
                                        ],
                                        "type": "string"
                                      },
                                      "updated_at": {
                                        "format": "date-time",
                                        "type": "string"
                                      },
                                      "upstream_ref": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model_deployment_id",
                                      "source_id",
                                      "model_key",
                                      "served_variant_id",
                                      "upstream_ref",
                                      "release_assurance",
                                      "assurance_evidence_ref",
                                      "resolved_upstream_ref",
                                      "resolution_evidence_ref",
                                      "protocol_profile",
                                      "location",
                                      "route",
                                      "fallback_policy",
                                      "pricing_basis",
                                      "last_tested_at",
                                      "status",
                                      "created_at",
                                      "updated_at"
                                    ],
                                    "type": "object"
                                  },
                                  "model": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "capabilities": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "family": {
                                        "type": "string"
                                      },
                                      "lifecycle": {
                                        "enum": [
                                          "preview",
                                          "active",
                                          "deprecated",
                                          "retired"
                                        ],
                                        "type": "string"
                                      },
                                      "model_key": {
                                        "type": "string"
                                      },
                                      "publisher_id": {
                                        "type": "string"
                                      },
                                      "release": {
                                        "type": "string"
                                      },
                                      "release_license": {
                                        "additionalProperties": false,
                                        "description": "License is release-scoped; family-wide claims are not accepted.",
                                        "properties": {
                                          "commercial_use": {
                                            "enum": [
                                              "allowed",
                                              "restricted",
                                              "unknown"
                                            ],
                                            "type": "string"
                                          },
                                          "evidence_ref": {
                                            "type": "string"
                                          },
                                          "identifier": {
                                            "description": "SPDX expression or a stable source-local license id.",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "identifier",
                                          "commercial_use",
                                          "evidence_ref"
                                        ],
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "model_key",
                                      "publisher_id",
                                      "family",
                                      "release",
                                      "capabilities",
                                      "lifecycle",
                                      "release_license"
                                    ],
                                    "type": "object"
                                  },
                                  "offering": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "auth_scheme": {
                                        "enum": [
                                          "api_key",
                                          "oauth2",
                                          "aws_sts_sigv4"
                                        ],
                                        "type": "string"
                                      },
                                      "certification": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "certification_id": {
                                            "type": "string"
                                          },
                                          "evidence_schema_version": {
                                            "description": "model-source-certification/v1",
                                            "type": "string"
                                          },
                                          "generated_at": {
                                            "format": "date-time",
                                            "type": "string"
                                          },
                                          "standing": {
                                            "enum": [
                                              "conformant",
                                              "exact_artifact"
                                            ],
                                            "type": "string"
                                          },
                                          "subject": {
                                            "additionalProperties": false,
                                            "description": "Model and provider-route facts covered by the certification. Internal evidence connection and ownership fields are not public.",
                                            "properties": {
                                              "auth_scheme": {
                                                "enum": [
                                                  "api_key",
                                                  "oauth2",
                                                  "aws_sts_sigv4"
                                                ],
                                                "type": "string"
                                              },
                                              "location": {
                                                "type": "string"
                                              },
                                              "model_key": {
                                                "type": "string"
                                              },
                                              "pricing_basis": {
                                                "enum": [
                                                  "source_reported",
                                                  "estimated"
                                                ],
                                                "type": "string"
                                              },
                                              "protocol_profile": {
                                                "enum": [
                                                  "openai_responses",
                                                  "openai_chat",
                                                  "anthropic_messages",
                                                  "gemini_generate_content",
                                                  "bedrock_converse"
                                                ],
                                                "type": "string"
                                              },
                                              "route": {
                                                "type": "string"
                                              },
                                              "served_variant_id": {
                                                "type": "string"
                                              },
                                              "source_id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "model_key",
                                              "served_variant_id",
                                              "source_id",
                                              "protocol_profile",
                                              "auth_scheme",
                                              "location",
                                              "route",
                                              "pricing_basis"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "certification_id",
                                          "evidence_schema_version",
                                          "standing",
                                          "generated_at",
                                          "subject"
                                        ],
                                        "type": "object"
                                      },
                                      "data_classes": {
                                        "items": {
                                          "$ref": "#/components/schemas/DataClass"
                                        },
                                        "type": "array"
                                      },
                                      "fallback_policy": {
                                        "enum": [
                                          "none",
                                          "source_controlled"
                                        ],
                                        "type": "string"
                                      },
                                      "location": {
                                        "type": "string"
                                      },
                                      "pricing_basis": {
                                        "enum": [
                                          "source_reported",
                                          "estimated"
                                        ],
                                        "type": "string"
                                      },
                                      "protocol_profile": {
                                        "enum": [
                                          "openai_responses",
                                          "openai_chat",
                                          "anthropic_messages",
                                          "gemini_generate_content",
                                          "bedrock_converse"
                                        ],
                                        "type": "string"
                                      },
                                      "resolution_evidence_ref": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "resolved_upstream_ref": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "route": {
                                        "type": "string"
                                      },
                                      "served_variant": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "assurance_evidence_ref": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "model_key": {
                                            "type": "string"
                                          },
                                          "release_assurance": {
                                            "enum": [
                                              "unknown",
                                              "family_alias",
                                              "source_attested_release",
                                              "exact_artifact"
                                            ],
                                            "type": "string"
                                          },
                                          "served_variant_id": {
                                            "type": "string"
                                          },
                                          "source_id": {
                                            "type": "string"
                                          },
                                          "upstream_ref": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "served_variant_id",
                                          "source_id",
                                          "model_key",
                                          "upstream_ref",
                                          "release_assurance",
                                          "assurance_evidence_ref"
                                        ],
                                        "type": "object"
                                      },
                                      "tested_at": {
                                        "format": "date-time",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "served_variant",
                                      "protocol_profile",
                                      "auth_scheme",
                                      "data_classes",
                                      "fallback_policy",
                                      "location",
                                      "route",
                                      "pricing_basis",
                                      "tested_at",
                                      "resolved_upstream_ref",
                                      "resolution_evidence_ref",
                                      "certification"
                                    ],
                                    "type": "object"
                                  },
                                  "provenance": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "deployment": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "fallback_policy": {
                                            "enum": [
                                              "none",
                                              "source_controlled"
                                            ],
                                            "type": "string"
                                          },
                                          "location": {
                                            "type": "string"
                                          },
                                          "model_deployment_id": {
                                            "type": "string"
                                          },
                                          "pricing_basis": {
                                            "enum": [
                                              "source_reported",
                                              "estimated"
                                            ],
                                            "type": "string"
                                          },
                                          "protocol_profile": {
                                            "enum": [
                                              "openai_responses",
                                              "openai_chat",
                                              "anthropic_messages",
                                              "gemini_generate_content",
                                              "bedrock_converse"
                                            ],
                                            "type": "string"
                                          },
                                          "route": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "model_deployment_id",
                                          "protocol_profile",
                                          "location",
                                          "route",
                                          "pricing_basis",
                                          "fallback_policy"
                                        ],
                                        "type": "object"
                                      },
                                      "requested": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "family": {
                                            "type": "string"
                                          },
                                          "model_key": {
                                            "type": "string"
                                          },
                                          "publisher_id": {
                                            "type": "string"
                                          },
                                          "release": {
                                            "type": "string"
                                          },
                                          "served_variant_id": {
                                            "type": "string"
                                          },
                                          "upstream_ref": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "model_key",
                                          "publisher_id",
                                          "family",
                                          "release",
                                          "served_variant_id",
                                          "upstream_ref"
                                        ],
                                        "type": "object"
                                      },
                                      "resolved": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "attestation": {
                                                "enum": [
                                                  "source_response",
                                                  "gateway_response"
                                                ],
                                                "type": "string"
                                              },
                                              "source_request_id": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "upstream_ref": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "upstream_ref",
                                              "source_request_id",
                                              "attestation"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "description": "The model identity reported by the provider. It is null in the catalog and filled after a model answers."
                                      },
                                      "schema_version": {
                                        "description": "model-attempt-provenance/v1",
                                        "type": "string"
                                      },
                                      "source": {
                                        "oneOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "access_lane": {
                                                "enum": [
                                                  "byok"
                                                ],
                                                "type": "string"
                                              },
                                              "auth_scheme": {
                                                "enum": [
                                                  "api_key",
                                                  "oauth2",
                                                  "aws_sts_sigv4"
                                                ],
                                                "type": "string"
                                              },
                                              "commercial_owner": {
                                                "enum": [
                                                  "customer"
                                                ],
                                                "type": "string"
                                              },
                                              "connection_id": {
                                                "description": "The calling organization's provider connection.",
                                                "type": "string"
                                              },
                                              "source_id": {
                                                "type": "string"
                                              },
                                              "source_kind": {
                                                "enum": [
                                                  "publisher_direct",
                                                  "gateway",
                                                  "cloud",
                                                  "fixture"
                                                ],
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "source_id",
                                              "source_kind",
                                              "connection_id",
                                              "access_lane",
                                              "commercial_owner",
                                              "auth_scheme"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "access_lane": {
                                                "enum": [
                                                  "millwork_pool"
                                                ],
                                                "type": "string"
                                              },
                                              "auth_scheme": {
                                                "enum": [
                                                  "api_key",
                                                  "oauth2",
                                                  "aws_sts_sigv4"
                                                ],
                                                "type": "string"
                                              },
                                              "commercial_owner": {
                                                "enum": [
                                                  "millwork"
                                                ],
                                                "type": "string"
                                              },
                                              "source_id": {
                                                "type": "string"
                                              },
                                              "source_kind": {
                                                "enum": [
                                                  "publisher_direct",
                                                  "gateway",
                                                  "cloud",
                                                  "fixture"
                                                ],
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "source_id",
                                              "source_kind",
                                              "access_lane",
                                              "commercial_owner",
                                              "auth_scheme"
                                            ],
                                            "type": "object"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "requested",
                                      "source",
                                      "deployment",
                                      "resolved"
                                    ],
                                    "type": "object"
                                  },
                                  "source": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "source_id": {
                                        "type": "string"
                                      },
                                      "source_kind": {
                                        "enum": [
                                          "publisher_direct",
                                          "gateway",
                                          "cloud",
                                          "fixture"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source_id",
                                      "source_kind"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "model",
                                  "source",
                                  "offering",
                                  "connection",
                                  "deployment",
                                  "provenance",
                                  "arm_registration_template"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "eligible": {
                            "type": "boolean"
                          },
                          "template_id": {
                            "enum": [
                              "starter",
                              "pooled-open-model",
                              "byok-open-model"
                            ],
                            "type": "string"
                          },
                          "template_version": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "template_id",
                          "template_version",
                          "access_lane",
                          "eligible",
                          "blockers",
                          "alternative_plans",
                          "catalog_row"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "templates"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List tenant templates",
        "tags": [
          "Tenant templates"
        ]
      }
    },
    "/v1/tenants": {
      "post": {
        "description": "This machine/bootstrap route is available only when private preview enforcement is disabled. People requesting private preview access should use the dashboard application flow instead.",
        "operationId": "postTenants",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "api_key": {
                      "additionalProperties": false,
                      "properties": {
                        "api_key_id": {
                          "type": "string"
                        },
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "created_by": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "display_name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expires_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "key": {
                          "description": "The API key. It is shown once when created, so store it now.",
                          "type": "string"
                        },
                        "key_prefix": {
                          "type": "string"
                        },
                        "revoked_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revoked_by": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "enum": [
                            "active",
                            "revoked"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "api_key_id",
                        "display_name",
                        "key_prefix",
                        "status",
                        "created_at",
                        "revoked_at",
                        "expires_at",
                        "created_by",
                        "revoked_by",
                        "key"
                      ],
                      "type": "object"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "api_key"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "summary": "Create organization",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/v1/tenants/{tenantId}": {
      "patch": {
        "description": "Rename the authenticated organization.",
        "operationId": "patchTenantsByTenantId",
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "display_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "quota_tier": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tenant_id",
                    "display_name",
                    "quota_tier",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rename organization",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "description": "Report metered usage for a billing period.",
        "operationId": "getUsage",
        "parameters": [
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "pattern": "^\\d{4}-\\d{2}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "api_key_id",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "by_arm": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "arm_id": {
                            "type": "string"
                          },
                          "fallback_count": {
                            "type": "integer"
                          },
                          "input_tokens": {
                            "type": "integer"
                          },
                          "output_tokens": {
                            "type": "integer"
                          },
                          "selected_count": {
                            "type": "integer"
                          },
                          "usd": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "arm_id",
                          "selected_count",
                          "fallback_count",
                          "input_tokens",
                          "output_tokens",
                          "usd"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "by_day": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "executions": {
                            "type": "integer"
                          },
                          "passthrough_usd": {
                            "type": "number"
                          },
                          "platform_usd": {
                            "type": "number"
                          },
                          "usd": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "executions",
                          "platform_usd",
                          "passthrough_usd",
                          "usd"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "by_key": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "api_key_id": {
                            "type": "string"
                          },
                          "by_day": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "date": {
                                  "type": "string"
                                },
                                "usd": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "date",
                                "usd"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "calls": {
                            "type": "integer"
                          },
                          "executions": {
                            "type": "integer"
                          },
                          "input_tokens": {
                            "type": "integer"
                          },
                          "output_tokens": {
                            "type": "integer"
                          },
                          "slices": {
                            "type": "integer"
                          },
                          "top_arms": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "arm_id": {
                                  "type": "string"
                                },
                                "selected_count": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "arm_id",
                                "selected_count"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "usd": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "api_key_id",
                          "executions",
                          "slices",
                          "input_tokens",
                          "output_tokens",
                          "calls",
                          "usd",
                          "by_day",
                          "top_arms"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "to": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "from",
                        "to"
                      ],
                      "type": "object"
                    },
                    "totals": {
                      "additionalProperties": false,
                      "properties": {
                        "calls": {
                          "type": "integer"
                        },
                        "executions": {
                          "type": "integer"
                        },
                        "input_tokens": {
                          "type": "integer"
                        },
                        "output_tokens": {
                          "type": "integer"
                        },
                        "passthrough_usd": {
                          "type": "number"
                        },
                        "platform_usd": {
                          "type": "number"
                        },
                        "slices": {
                          "type": "integer"
                        },
                        "usd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "executions",
                        "slices",
                        "input_tokens",
                        "output_tokens",
                        "calls",
                        "usd",
                        "platform_usd",
                        "passthrough_usd"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "period",
                    "totals",
                    "by_arm",
                    "by_day",
                    "by_key"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Usage report",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/verifiers": {
      "get": {
        "description": "List verifiers.",
        "operationId": "getVerifiers",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "include_retired",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pagination cursor. It is null on the last page."
                    },
                    "verifiers": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "connection": {
                            "additionalProperties": false,
                            "properties": {
                              "days_remaining": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Whole days until the scheduled stop, or null when no stop is scheduled."
                              },
                              "status": {
                                "description": "Whether Millwork currently uses the verifier key: active means connected, revoked means disconnected in Millwork, expired means the Millwork stop date passed, unbound means no key has been connected, and unknown means Millwork could not confirm the state.",
                                "enum": [
                                  "unbound",
                                  "active",
                                  "revoked",
                                  "expired",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "stop_at": {
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "When Millwork is scheduled to stop using the key, or null when no stop is scheduled."
                              },
                              "stop_reason": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "revoked",
                                      "origin_invalidated",
                                      "stop_date"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Why Millwork stopped using the key: revoked is a manual disconnect, origin_invalidated is an endpoint-address change, and stop_date is the scheduled stop."
                              },
                              "stop_time_zone": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The time zone used to choose the stop date, or null when no stop is scheduled."
                              },
                              "stopped_at": {
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "When Millwork actually stopped using the key, or null while it is active or has never been connected."
                              }
                            },
                            "required": [
                              "status",
                              "stop_at",
                              "stop_time_zone",
                              "days_remaining",
                              "stopped_at",
                              "stop_reason"
                            ],
                            "type": "object"
                          },
                          "correctness_declaration": {
                            "additionalProperties": false,
                            "description": "The tenant's own declaration about this verifier's correctness method. It is self-reported, not independently verified, never gates dispatch and is not part of the identity hash. Verifiers registered before declarations existed read as not declared.",
                            "properties": {
                              "declared_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "method": {
                                "enum": [
                                  "deterministic"
                                ],
                                "type": "string"
                              },
                              "statement": {
                                "enum": [
                                  "Tenant declared deterministic correctness; not independently verified",
                                  "Not declared"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "declared",
                                  "not_declared"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "status",
                              "statement"
                            ],
                            "type": "object"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "endpoint": {
                            "additionalProperties": false,
                            "properties": {
                              "auth_ref": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url",
                              "auth_ref"
                            ],
                            "type": "object"
                          },
                          "hash": {
                            "description": "Identity hash of the definition (sha256:...); auth_ref rotation never changes it.",
                            "type": "string"
                          },
                          "input_data_classes": {
                            "items": {
                              "$ref": "#/components/schemas/DataClass"
                            },
                            "type": "array"
                          },
                          "kind": {
                            "enum": [
                              "endpoint"
                            ],
                            "type": "string"
                          },
                          "retired_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revision": {
                            "type": "integer"
                          },
                          "scoring": {
                            "additionalProperties": false,
                            "properties": {
                              "correctness": {
                                "type": "string"
                              },
                              "quality": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "correctness",
                              "quality"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "description": "PF1 probe-decided health. Verifiers have no disabled state; leaving service is retirement.",
                            "enum": [
                              "ready",
                              "degraded"
                            ],
                            "type": "string"
                          },
                          "status_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The probe reason code that degraded this verifier; null when ready."
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "verifier_id": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "verifier_id",
                          "display_name",
                          "version",
                          "hash",
                          "kind",
                          "endpoint",
                          "input_data_classes",
                          "scoring",
                          "correctness_declaration",
                          "connection",
                          "status",
                          "status_reason",
                          "revision",
                          "created_at",
                          "updated_at",
                          "retired_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "verifiers",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List output checks",
        "tags": [
          "Output checks"
        ]
      },
      "post": {
        "description": "Register a verifier.",
        "operationId": "postVerifiers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "correctness_declaration": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "method": {
                            "description": "The correctness method the tenant declares. Only deterministic correctness can be declared.",
                            "enum": [
                              "deterministic"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "method"
                        ],
                        "type": "object"
                      },
                      {
                        "enum": [
                          null
                        ]
                      }
                    ]
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "endpoint": {
                    "additionalProperties": false,
                    "properties": {
                      "auth_ref": {
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "auth_ref"
                    ],
                    "type": "object"
                  },
                  "input_data_classes": {
                    "items": {
                      "$ref": "#/components/schemas/DataClass"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "kind": {
                    "enum": [
                      "endpoint"
                    ]
                  },
                  "scoring": {
                    "additionalProperties": false,
                    "properties": {
                      "correctness": {
                        "enum": [
                          "boolean_anchors"
                        ]
                      },
                      "quality": {
                        "enum": [
                          "scalar_0_1"
                        ]
                      }
                    },
                    "required": [
                      "correctness",
                      "quality"
                    ],
                    "type": "object"
                  },
                  "version": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "display_name",
                  "version",
                  "kind",
                  "endpoint",
                  "input_data_classes",
                  "scoring"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Registration result. Millwork tests the verifier before setting the status. Probe feedback and the declaration are separate from each other.",
                  "properties": {
                    "correctness_declaration": {
                      "additionalProperties": false,
                      "description": "The tenant's own declaration about this verifier's correctness method. It is self-reported, not independently verified, never gates dispatch and is not part of the identity hash. Verifiers registered before declarations existed read as not declared.",
                      "properties": {
                        "declared_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "method": {
                          "enum": [
                            "deterministic"
                          ],
                          "type": "string"
                        },
                        "statement": {
                          "enum": [
                            "Tenant declared deterministic correctness; not independently verified",
                            "Not declared"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "declared",
                            "not_declared"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "statement"
                      ],
                      "type": "object"
                    },
                    "hash": {
                      "type": "string"
                    },
                    "preflight": {
                      "additionalProperties": false,
                      "properties": {
                        "checked_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "contract": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "validated": {
                                  "description": "true only when the endpoint answered 2xx with a valid VerifierResult.",
                                  "type": "boolean"
                                },
                                "verifier_result": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "anchor_results": {
                                          "additionalProperties": {
                                            "type": "boolean"
                                          },
                                          "type": "object"
                                        },
                                        "is_correct": {
                                          "type": "boolean"
                                        },
                                        "named_metrics": {
                                          "additionalProperties": {
                                            "type": "number"
                                          },
                                          "type": "object"
                                        },
                                        "quality_score": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "is_correct",
                                        "quality_score"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "violation": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Contract-violation detail when the endpoint was reachable but its response failed validation; null otherwise."
                                }
                              },
                              "required": [
                                "validated",
                                "verifier_result",
                                "violation"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "null when the endpoint was unreachable (no response to check)."
                        },
                        "detail": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feedback": {
                          "additionalProperties": false,
                          "description": "DH2: host reachability, adapter authentication, and response-body compatibility as separate classes.",
                          "properties": {
                            "authentication": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            },
                            "reachability": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            },
                            "response_compatibility": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "reachability",
                            "authentication",
                            "response_compatibility"
                          ],
                          "type": "object"
                        },
                        "http_status": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "HTTP status the endpoint answered with; null when no response arrived."
                        },
                        "outcome": {
                          "enum": [
                            "reachable",
                            "unreachable"
                          ],
                          "type": "string"
                        },
                        "reason_code": {
                          "anyOf": [
                            {
                              "enum": [
                                "scheme_rejected",
                                "dns_resolution_failed",
                                "private_range_rejected",
                                "probe_timeout",
                                "endpoint_unreachable",
                                "authentication_failed"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "outcome",
                        "reason_code",
                        "http_status",
                        "contract",
                        "feedback",
                        "detail",
                        "checked_at"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "ready",
                        "degraded"
                      ],
                      "type": "string"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "verifier_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verifier_id",
                    "hash",
                    "status",
                    "status_reason",
                    "preflight",
                    "correctness_declaration"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Registration result. Millwork tests the verifier before setting the status. Probe feedback and the declaration are separate from each other."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Register output check",
        "tags": [
          "Output checks"
        ]
      }
    },
    "/v1/verifiers/{verifierId}": {
      "delete": {
        "description": "Retire a verifier.",
        "operationId": "deleteVerifiersByVerifierId",
        "parameters": [
          {
            "in": "path",
            "name": "verifierId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Verifier retired (idempotent). No content."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retire output check",
        "tags": [
          "Output checks"
        ]
      },
      "get": {
        "description": "Get a verifier.",
        "operationId": "getVerifiersByVerifierId",
        "parameters": [
          {
            "in": "path",
            "name": "verifierId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "additionalProperties": false,
                      "properties": {
                        "days_remaining": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Whole days until the scheduled stop, or null when no stop is scheduled."
                        },
                        "status": {
                          "description": "Whether Millwork currently uses the verifier key: active means connected, revoked means disconnected in Millwork, expired means the Millwork stop date passed, unbound means no key has been connected, and unknown means Millwork could not confirm the state.",
                          "enum": [
                            "unbound",
                            "active",
                            "revoked",
                            "expired",
                            "unknown"
                          ],
                          "type": "string"
                        },
                        "stop_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "When Millwork is scheduled to stop using the key, or null when no stop is scheduled."
                        },
                        "stop_reason": {
                          "anyOf": [
                            {
                              "enum": [
                                "revoked",
                                "origin_invalidated",
                                "stop_date"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Why Millwork stopped using the key: revoked is a manual disconnect, origin_invalidated is an endpoint-address change, and stop_date is the scheduled stop."
                        },
                        "stop_time_zone": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The time zone used to choose the stop date, or null when no stop is scheduled."
                        },
                        "stopped_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "When Millwork actually stopped using the key, or null while it is active or has never been connected."
                        }
                      },
                      "required": [
                        "status",
                        "stop_at",
                        "stop_time_zone",
                        "days_remaining",
                        "stopped_at",
                        "stop_reason"
                      ],
                      "type": "object"
                    },
                    "correctness_declaration": {
                      "additionalProperties": false,
                      "description": "The tenant's own declaration about this verifier's correctness method. It is self-reported, not independently verified, never gates dispatch and is not part of the identity hash. Verifiers registered before declarations existed read as not declared.",
                      "properties": {
                        "declared_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "method": {
                          "enum": [
                            "deterministic"
                          ],
                          "type": "string"
                        },
                        "statement": {
                          "enum": [
                            "Tenant declared deterministic correctness; not independently verified",
                            "Not declared"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "declared",
                            "not_declared"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "statement"
                      ],
                      "type": "object"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "additionalProperties": false,
                      "properties": {
                        "auth_ref": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "auth_ref"
                      ],
                      "type": "object"
                    },
                    "hash": {
                      "description": "Identity hash of the definition (sha256:...); auth_ref rotation never changes it.",
                      "type": "string"
                    },
                    "input_data_classes": {
                      "items": {
                        "$ref": "#/components/schemas/DataClass"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "endpoint"
                      ],
                      "type": "string"
                    },
                    "retired_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "scoring": {
                      "additionalProperties": false,
                      "properties": {
                        "correctness": {
                          "type": "string"
                        },
                        "quality": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "correctness",
                        "quality"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "description": "PF1 probe-decided health. Verifiers have no disabled state; leaving service is retirement.",
                      "enum": [
                        "ready",
                        "degraded"
                      ],
                      "type": "string"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The probe reason code that degraded this verifier; null when ready."
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "verifier_id": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verifier_id",
                    "display_name",
                    "version",
                    "hash",
                    "kind",
                    "endpoint",
                    "input_data_classes",
                    "scoring",
                    "correctness_declaration",
                    "connection",
                    "status",
                    "status_reason",
                    "revision",
                    "created_at",
                    "updated_at",
                    "retired_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get output check",
        "tags": [
          "Output checks"
        ]
      },
      "patch": {
        "description": "Update a verifier.",
        "operationId": "patchVerifiersByVerifierId",
        "parameters": [
          {
            "in": "path",
            "name": "verifierId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "minProperties": 1,
                "properties": {
                  "correctness_declaration": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "method": {
                            "description": "The correctness method the tenant declares. Only deterministic correctness can be declared.",
                            "enum": [
                              "deterministic"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "method"
                        ],
                        "type": "object"
                      },
                      {
                        "enum": [
                          null
                        ]
                      }
                    ]
                  },
                  "display_name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "endpoint": {
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "auth_ref": {
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "input_data_classes": {
                    "items": {
                      "$ref": "#/components/schemas/DataClass"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "scoring": {
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "correctness": {
                        "enum": [
                          "boolean_anchors"
                        ]
                      },
                      "quality": {
                        "enum": [
                          "scalar_0_1"
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "version": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "additionalProperties": false,
                      "properties": {
                        "days_remaining": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Whole days until the scheduled stop, or null when no stop is scheduled."
                        },
                        "status": {
                          "description": "Whether Millwork currently uses the verifier key: active means connected, revoked means disconnected in Millwork, expired means the Millwork stop date passed, unbound means no key has been connected, and unknown means Millwork could not confirm the state.",
                          "enum": [
                            "unbound",
                            "active",
                            "revoked",
                            "expired",
                            "unknown"
                          ],
                          "type": "string"
                        },
                        "stop_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "When Millwork is scheduled to stop using the key, or null when no stop is scheduled."
                        },
                        "stop_reason": {
                          "anyOf": [
                            {
                              "enum": [
                                "revoked",
                                "origin_invalidated",
                                "stop_date"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Why Millwork stopped using the key: revoked is a manual disconnect, origin_invalidated is an endpoint-address change, and stop_date is the scheduled stop."
                        },
                        "stop_time_zone": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The time zone used to choose the stop date, or null when no stop is scheduled."
                        },
                        "stopped_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "When Millwork actually stopped using the key, or null while it is active or has never been connected."
                        }
                      },
                      "required": [
                        "status",
                        "stop_at",
                        "stop_time_zone",
                        "days_remaining",
                        "stopped_at",
                        "stop_reason"
                      ],
                      "type": "object"
                    },
                    "correctness_declaration": {
                      "additionalProperties": false,
                      "description": "The tenant's own declaration about this verifier's correctness method. It is self-reported, not independently verified, never gates dispatch and is not part of the identity hash. Verifiers registered before declarations existed read as not declared.",
                      "properties": {
                        "declared_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "method": {
                          "enum": [
                            "deterministic"
                          ],
                          "type": "string"
                        },
                        "statement": {
                          "enum": [
                            "Tenant declared deterministic correctness; not independently verified",
                            "Not declared"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "declared",
                            "not_declared"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "statement"
                      ],
                      "type": "object"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "additionalProperties": false,
                      "properties": {
                        "auth_ref": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "auth_ref"
                      ],
                      "type": "object"
                    },
                    "hash": {
                      "description": "Identity hash of the definition (sha256:...); auth_ref rotation never changes it.",
                      "type": "string"
                    },
                    "input_data_classes": {
                      "items": {
                        "$ref": "#/components/schemas/DataClass"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "endpoint"
                      ],
                      "type": "string"
                    },
                    "retired_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "scoring": {
                      "additionalProperties": false,
                      "properties": {
                        "correctness": {
                          "type": "string"
                        },
                        "quality": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "correctness",
                        "quality"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "description": "PF1 probe-decided health. Verifiers have no disabled state; leaving service is retirement.",
                      "enum": [
                        "ready",
                        "degraded"
                      ],
                      "type": "string"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The probe reason code that degraded this verifier; null when ready."
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "verifier_id": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verifier_id",
                    "display_name",
                    "version",
                    "hash",
                    "kind",
                    "endpoint",
                    "input_data_classes",
                    "scoring",
                    "correctness_declaration",
                    "connection",
                    "status",
                    "status_reason",
                    "revision",
                    "created_at",
                    "updated_at",
                    "retired_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Update output check",
        "tags": [
          "Output checks"
        ]
      }
    },
    "/v1/verifiers/{verifierId}/connection": {
      "get": {
        "description": "Returns whether Millwork currently uses the verifier key, when use is scheduled to stop, and why it stopped. The response never includes key material or claims that the key was revoked at the verifier endpoint.",
        "operationId": "getVerifiersByVerifierIdConnection",
        "parameters": [
          {
            "in": "query",
            "name": "operation_key",
            "required": false,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "verifierId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "days_remaining": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whole days until the scheduled stop, or null when no stop is scheduled."
                    },
                    "generation": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "handle": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_operation": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "type": "integer"
                            },
                            "kind": {
                              "type": "string"
                            },
                            "phase": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "recorded_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "resulting_state": {
                              "additionalProperties": true,
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "phase",
                            "generation",
                            "resulting_state",
                            "recorded_at"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "status": {
                              "enum": [
                                "unknown"
                              ]
                            }
                          },
                          "required": [
                            "status"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_test": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "handle": {
                              "type": "string"
                            },
                            "outcome": {
                              "enum": [
                                "passed",
                                "failed"
                              ],
                              "type": "string"
                            },
                            "reason": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "outcome",
                            "handle",
                            "reason",
                            "at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "origin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending_key": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "captured_generation": {
                              "type": "integer"
                            },
                            "handle": {
                              "type": "string"
                            },
                            "staged_until": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": [
                            "handle",
                            "captured_generation",
                            "staged_until"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "projection_ack": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replacement": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "handle": {
                              "type": "string"
                            },
                            "staged_until": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "status": {
                              "enum": [
                                "pending"
                              ]
                            }
                          },
                          "required": [
                            "status",
                            "handle",
                            "staged_until"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "handle": {
                              "type": "string"
                            },
                            "reason": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "status": {
                              "enum": [
                                "failed"
                              ]
                            }
                          },
                          "required": [
                            "status",
                            "handle",
                            "reason",
                            "at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "retired_keys": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "destroyed_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "handle": {
                            "type": "string"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "retired_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "enum": [
                              "scheduled_for_destruction",
                              "destroyed"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "handle",
                          "state",
                          "reason",
                          "retired_at",
                          "destroyed_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "description": "Whether Millwork currently uses the verifier key: active means connected, revoked means disconnected in Millwork, expired means the Millwork stop date passed, unbound means no key has been connected, and unknown means Millwork could not confirm the state.",
                      "enum": [
                        "unbound",
                        "active",
                        "revoked",
                        "expired",
                        "unknown"
                      ],
                      "type": "string"
                    },
                    "stop_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Millwork is scheduled to stop using the key, or null when no stop is scheduled."
                    },
                    "stop_reason": {
                      "anyOf": [
                        {
                          "enum": [
                            "revoked",
                            "origin_invalidated",
                            "stop_date"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why Millwork stopped using the key: revoked is a manual disconnect, origin_invalidated is an endpoint-address change, and stop_date is the scheduled stop."
                    },
                    "stop_time_zone": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The time zone used to choose the stop date, or null when no stop is scheduled."
                    },
                    "stopped_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Millwork actually stopped using the key, or null while it is active or has never been connected."
                    }
                  },
                  "required": [
                    "status",
                    "handle",
                    "origin",
                    "generation",
                    "stop_at",
                    "stop_time_zone",
                    "days_remaining",
                    "stopped_at",
                    "stop_reason",
                    "projection_ack",
                    "pending_key",
                    "last_test",
                    "replacement",
                    "retired_keys"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read connection state",
        "tags": [
          "Output checks"
        ]
      }
    },
    "/v1/verifiers/{verifierId}/test": {
      "post": {
        "description": "Test a verifier endpoint and save its health.",
        "operationId": "postVerifiersByVerifierIdTest",
        "parameters": [
          {
            "in": "path",
            "name": "verifierId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "On-demand probe report. The observed health is persisted: a degraded verifier heals here, a dead one degrades. Probe feedback and the declaration are separate from each other.",
                  "properties": {
                    "correctness_declaration": {
                      "additionalProperties": false,
                      "description": "The tenant's own declaration about this verifier's correctness method. It is self-reported, not independently verified, never gates dispatch and is not part of the identity hash. Verifiers registered before declarations existed read as not declared.",
                      "properties": {
                        "declared_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "method": {
                          "enum": [
                            "deterministic"
                          ],
                          "type": "string"
                        },
                        "statement": {
                          "enum": [
                            "Tenant declared deterministic correctness; not independently verified",
                            "Not declared"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "declared",
                            "not_declared"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "statement"
                      ],
                      "type": "object"
                    },
                    "probe": {
                      "additionalProperties": false,
                      "properties": {
                        "checked_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "contract": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "validated": {
                                  "description": "true only when the endpoint answered 2xx with a valid VerifierResult.",
                                  "type": "boolean"
                                },
                                "verifier_result": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "anchor_results": {
                                          "additionalProperties": {
                                            "type": "boolean"
                                          },
                                          "type": "object"
                                        },
                                        "is_correct": {
                                          "type": "boolean"
                                        },
                                        "named_metrics": {
                                          "additionalProperties": {
                                            "type": "number"
                                          },
                                          "type": "object"
                                        },
                                        "quality_score": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "is_correct",
                                        "quality_score"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "violation": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Contract-violation detail when the endpoint was reachable but its response failed validation; null otherwise."
                                }
                              },
                              "required": [
                                "validated",
                                "verifier_result",
                                "violation"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "null when the endpoint was unreachable (no response to check)."
                        },
                        "detail": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feedback": {
                          "additionalProperties": false,
                          "description": "DH2: host reachability, adapter authentication, and response-body compatibility as separate classes.",
                          "properties": {
                            "authentication": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            },
                            "reachability": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            },
                            "response_compatibility": {
                              "additionalProperties": false,
                              "properties": {
                                "correction": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Concrete next step when this class failed; null otherwise."
                                },
                                "status": {
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "not_checked"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "correction"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "reachability",
                            "authentication",
                            "response_compatibility"
                          ],
                          "type": "object"
                        },
                        "http_status": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "HTTP status the endpoint answered with; null when no response arrived."
                        },
                        "outcome": {
                          "enum": [
                            "reachable",
                            "unreachable"
                          ],
                          "type": "string"
                        },
                        "reason_code": {
                          "anyOf": [
                            {
                              "enum": [
                                "scheme_rejected",
                                "dns_resolution_failed",
                                "private_range_rejected",
                                "probe_timeout",
                                "endpoint_unreachable",
                                "authentication_failed"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "outcome",
                        "reason_code",
                        "http_status",
                        "contract",
                        "feedback",
                        "detail",
                        "checked_at"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "ready",
                        "degraded"
                      ],
                      "type": "string"
                    },
                    "status_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "verifier_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verifier_id",
                    "status",
                    "status_reason",
                    "probe",
                    "correctness_declaration"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "On-demand probe report. The observed health is persisted: a degraded verifier heals here, a dead one degrades. Probe feedback and the declaration are separate from each other."
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Test output check",
        "tags": [
          "Output checks"
        ]
      }
    },
    "/v1/webhooks": {
      "get": {
        "description": "List webhook endpoints.",
        "operationId": "getWebhooks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "webhooks": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "events": {
                            "items": {
                              "enum": [
                                "execution.completed",
                                "execution.failed",
                                "execution.needs_review",
                                "proposal.created"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "secret_version": {
                            "type": "integer"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "disabled"
                            ],
                            "type": "string"
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "url": {
                            "format": "uri",
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "webhook_id",
                          "url",
                          "events",
                          "status",
                          "secret_version",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "webhooks"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "Register a webhook endpoint.",
        "operationId": "postWebhooks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "events": {
                    "items": {
                      "enum": [
                        "execution.completed",
                        "execution.failed",
                        "execution.needs_review",
                        "proposal.created"
                      ]
                    },
                    "minItems": 1,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "url": {
                    "format": "uri",
                    "maxLength": 2048,
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "events": {
                      "items": {
                        "enum": [
                          "execution.completed",
                          "execution.failed",
                          "execution.needs_review",
                          "proposal.created"
                        ],
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "secret_version": {
                      "type": "integer"
                    },
                    "signing_secret": {
                      "description": "The raw signing secret. Revealed exactly once, at registration or rotation; store it now.",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "type": "string"
                    },
                    "webhook_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "webhook_id",
                    "url",
                    "events",
                    "status",
                    "secret_version",
                    "created_at",
                    "updated_at",
                    "signing_secret"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Register webhook",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{webhookId}/deliveries": {
      "get": {
        "description": "List a webhook's deliveries.",
        "operationId": "getWebhooksByWebhookIdDeliveries",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "delivered",
                "dead_lettered"
              ]
            }
          },
          {
            "in": "path",
            "name": "webhookId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "deliveries": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attempts": {
                            "type": "integer"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "delivery_id": {
                            "type": "string"
                          },
                          "event": {
                            "enum": [
                              "execution.completed",
                              "execution.failed",
                              "execution.needs_review",
                              "proposal.created"
                            ],
                            "type": "string"
                          },
                          "failure_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "last_attempt_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "next_attempt_at": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "response_status": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "enum": [
                              "pending",
                              "delivered",
                              "dead_lettered"
                            ],
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "delivery_id",
                          "webhook_id",
                          "event",
                          "status",
                          "attempts",
                          "next_attempt_at",
                          "last_attempt_at",
                          "response_status",
                          "failure_reason",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "deliveries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List deliveries",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{webhookId}/rotate-secret": {
      "post": {
        "description": "Rotate a webhook's signing secret.",
        "operationId": "postWebhooksByWebhookIdRotateSecret",
        "parameters": [
          {
            "in": "path",
            "name": "webhookId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "events": {
                      "items": {
                        "enum": [
                          "execution.completed",
                          "execution.failed",
                          "execution.needs_review",
                          "proposal.created"
                        ],
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "secret_version": {
                      "type": "integer"
                    },
                    "signing_secret": {
                      "description": "The raw signing secret. Revealed exactly once, at registration or rotation; store it now.",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "disabled"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "type": "string"
                    },
                    "webhook_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "webhook_id",
                    "url",
                    "events",
                    "status",
                    "secret_version",
                    "created_at",
                    "updated_at",
                    "signing_secret"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rotate signing secret",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/deliveries/{deliveryId}/replay": {
      "post": {
        "description": "Retry a failed webhook delivery.",
        "operationId": "postWebhooksDeliveriesByDeliveryIdReplay",
        "parameters": [
          {
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "attempts": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "delivery_id": {
                      "type": "string"
                    },
                    "event": {
                      "enum": [
                        "execution.completed",
                        "execution.failed",
                        "execution.needs_review",
                        "proposal.created"
                      ],
                      "type": "string"
                    },
                    "failure_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_attempt_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_attempt_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response_status": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "delivered",
                        "dead_lettered"
                      ],
                      "type": "string"
                    },
                    "webhook_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "delivery_id",
                    "webhook_id",
                    "event",
                    "status",
                    "attempts",
                    "next_attempt_at",
                    "last_attempt_at",
                    "response_status",
                    "failure_reason",
                    "created_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Default Response"
          },
          "4XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Request failure in RFC 7807 format. The `type` field identifies the reason. Validation errors list affected fields. Rate and quota errors include `retry_after_s` and the `Retry-After` header."
          },
          "5XX": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Server failure in RFC 7807 format. The response does not include internal error details."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retry delivery",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.getmillwork.dev"
    }
  ],
  "tags": [
    {
      "description": "Submit work, check its status, cancel it, and read the result. The API calls each run an execution.",
      "name": "Runs"
    },
    {
      "description": "A record of how a run was handled, without prompt or result content.",
      "name": "Receipts"
    },
    {
      "description": "Models this organization can use now.",
      "name": "Models"
    },
    {
      "description": "Providers and sign-in methods that can be connected.",
      "name": "Available providers"
    },
    {
      "description": "Provider accounts connected to this organization.",
      "name": "Provider connections"
    },
    {
      "description": "One-time browser steps for connecting a provider without sending its secret in an API request.",
      "name": "Secure credential setup"
    },
    {
      "description": "Exact models and provider routes available through connected accounts.",
      "name": "Provider models"
    },
    {
      "description": "Create, label, list, and revoke organization API keys.",
      "name": "API keys"
    },
    {
      "description": "Organization members and invitations.",
      "name": "Members"
    },
    {
      "description": "Metered usage and quota state.",
      "name": "Usage"
    },
    {
      "description": "Account, plan and allowance snapshot.",
      "name": "Account"
    },
    {
      "description": "Checkout, billing portal and billing profile.",
      "name": "Billing"
    },
    {
      "description": "Webhook endpoints, deliveries and replay.",
      "name": "Webhooks"
    },
    {
      "description": "Organization-scoped compliance export.",
      "name": "Compliance export"
    },
    {
      "description": "Models, agents, and skills Millwork can choose for a run. The API calls each one an arm.",
      "name": "Registered options"
    },
    {
      "description": "Checks that score output and can stop, retry, or choose another option within the request policy.",
      "name": "Output checks"
    },
    {
      "description": "Routing proposals and their review lifecycle.",
      "name": "Repair proposals"
    },
    {
      "description": "Aggregate evaluation trend and repair history.",
      "name": "Evaluation"
    },
    {
      "description": "Publisher and release identity records for supported models.",
      "name": "Model definitions"
    },
    {
      "description": "Protected provider-credential references. Secret material never appears in this API.",
      "name": "Credential references"
    },
    {
      "description": "Dashboard browser sign-in, sign-up, session lookup, and sign-out.",
      "name": "Browser access"
    },
    {
      "description": "Read-only demo session setup.",
      "name": "Demo"
    },
    {
      "description": "Machine setup and the authenticated organization profile.",
      "name": "Organizations"
    },
    {
      "description": "Eligible immutable starter presets and typed blockers.",
      "name": "Tenant templates"
    },
    {
      "description": "Stateless starter plan resolution. No write and no provider call.",
      "name": "Tenant template plans"
    },
    {
      "description": "Durable starter applications that resume instead of restarting.",
      "name": "Tenant template applications"
    }
  ]
}
