{
  "openapi": "3.1.0",
  "info": {
    "title": "Immiscible decision API",
    "version": "2530cb491bcc",
    "summary": "Ask before an agent pays, shares data or acts; follow the decision; record what happened.",
    "description": "Call requestDecision before any consequential action and follow the answer: allow (proceed, with a signed receipt), deny (stop, and tell the person why) or approval_required (a person has been asked). For approval_required, either poll getDecision, or call notifyWhenDecided with a URL that should be called once a person decides, then read getDecision. After an allowed action, call recordOutcome with what actually happened. Authenticate with an agent key from the console (Agents, Add an agent, then Collect the agent's key on its setup page), sent as Authorization: Bearer or as the x-api-key header. Every response carries an x-request-id header; quote it when asking for help with a request. Versioning: every response carries an immiscible-version header naming the API version that answered, a date (2026-10-01 today). There is one version; changes within it only add (new operations, new optional fields, new values a client should ignore when it does not know them). A change that removes or renames anything would come under a new date.",
    "license": {
      "name": "Immiscible terms of service",
      "url": "https://immiscible.fly.dev/legal/terms"
    },
    "termsOfService": "https://immiscible.fly.dev/legal/terms"
  },
  "servers": [
    {
      "url": "https://immiscible.fly.dev"
    }
  ],
  "security": [
    {
      "agentKey": []
    },
    {
      "agentKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Decisions",
      "description": "Ask before an agent pays, shares data or acts; follow the answer; record what happened. Agent key."
    },
    {
      "name": "Receipts",
      "description": "Check a receipt an agent handed you. No key."
    },
    {
      "name": "Gateway",
      "description": "Model traffic, OpenAI and Anthropic shaped: metered, routed under policy, checked against budgets before the call and recorded. Any workspace key, including an agent key."
    },
    {
      "name": "Admin",
      "description": "The machine admin API for SOAR, CI and Terraform: register agents from templates, freeze, drill, read approvals and evidence. A service token (ims_...) with the scope each operation names; keys, budgets and model availability take an admin-scoped key."
    },
    {
      "name": "Actions and receipts",
      "description": "Actions and receipts: generated from the server's routes. Each operation links to its page in the API reference."
    },
    {
      "name": "MCP",
      "description": "MCP: generated from the server's routes. Each operation links to its page in the API reference."
    },
    {
      "name": "Developer CLI",
      "description": "Developer CLI: generated from the server's routes. Each operation links to its page in the API reference."
    },
    {
      "name": "OAuth for MCP clients",
      "description": "OAuth for MCP clients: generated from the server's routes. Each operation links to its page in the API reference."
    },
    {
      "name": "Health",
      "description": "Health: generated from the server's routes. Each operation links to its page in the API reference."
    },
    {
      "name": "Other",
      "description": "Other: generated from the server's routes. Each operation links to its page in the API reference."
    }
  ],
  "paths": {
    "/v1/actions/authorize": {
      "post": {
        "operationId": "requestDecision",
        "tags": [
          "Decisions"
        ],
        "summary": "Ask Immiscible before acting",
        "description": "Ask whether the agent may take one consequential action. Returns allow with a receipt, deny with reasons, or approval_required while a person decides.",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "description": "Same as idempotencyKey in the body."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionRequest"
              },
              "example": {
                "type": "payment",
                "summary": "Pay the March invoice from Northwind Supplies",
                "payment": {
                  "amount": 4200,
                  "currency": "GBP",
                  "merchant": {
                    "name": "Northwind Supplies",
                    "domain": "northwind.example"
                  }
                },
                "provenance": [
                  {
                    "source": "user",
                    "detail": "Approved invoice in the finance inbox"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The decision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The key is not an agent key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "The action is not in a state that allows this.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/actions/{id}": {
      "get": {
        "operationId": "getDecision",
        "tags": [
          "Decisions"
        ],
        "summary": "Check a decision",
        "description": "The current state of an action this agent asked about. After approval_required it becomes allow (with a receipt) when a person approves, or deny.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ActionId"
          }
        ],
        "responses": {
          "200": {
            "description": "The decision as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The key is not an agent key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "No such action for this agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/actions/{id}/callback": {
      "post": {
        "operationId": "notifyWhenDecided",
        "tags": [
          "Decisions"
        ],
        "summary": "Call a URL when a person decides",
        "description": "Register one https URL to be called with a POST once the action is decided (at once if it already is). The call carries the action id, decision and status, never the receipt; read getDecision for that. One URL per action: a second call replaces the first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ActionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallbackRequest"
              },
              "example": {
                "url": "https://hooks.example.com/resume/123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Callback"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The key is not an agent key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "No such action for this agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/actions/{id}/settle": {
      "post": {
        "operationId": "recordOutcome",
        "tags": [
          "Decisions"
        ],
        "summary": "Record what happened",
        "description": "After an allowed action: completed, failed or cancelled, with the final amount for payments. Settling above what was allowed is an incident and freezes the agent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ActionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Outcome"
              },
              "example": {
                "status": "completed",
                "amount": 4200
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The settled action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The key is not an agent key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "No such action for this agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "The action is not in a state that allows this.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/verify": {
      "post": {
        "operationId": "verifyReceipt",
        "tags": [
          "Receipts"
        ],
        "summary": "Verify a receipt",
        "description": "For whoever receives a receipt: is it genuine, unexpired, unrevoked and does it cover this charge? Receipts are single use, so verifying one consumes it. Needs no key.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The verdict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "chatCompletions",
        "summary": "Call a model (OpenAI shaped)",
        "description": "An OpenAI chat completions request through the gateway. In shadow mode it goes to the model it named; in enforce mode it is routed under policy and checked against budgets first. The x-immiscible-* response headers repeat the immiscible field.",
        "tags": [
          "Gateway"
        ],
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/TaskClass"
          },
          {
            "$ref": "#/components/parameters/TaskId"
          },
          {
            "$ref": "#/components/parameters/Objective"
          },
          {
            "$ref": "#/components/parameters/ClientSession"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              },
              "example": {
                "model": "gpt-5.5",
                "messages": [
                  {
                    "role": "user",
                    "content": "Categorise: card declined."
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The completion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletion"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "Not a valid request: an unknown task class, a bad task or session id, or (enforce mode) unclassified_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "402": {
            "description": "approval_required: the budget is at its allocation; the answer names the owner who can approve more.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "policy_conflict: no model satisfies the policy; the answer names the binding constraint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "budget_exhausted past the hard ceiling, or rate limited; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/anthropic/v1/messages": {
      "post": {
        "operationId": "messages",
        "summary": "Call a model (Anthropic shaped)",
        "description": "An Anthropic Messages request through the gateway: what Claude Code and the Anthropic SDKs send with their base URL set to /anthropic.",
        "tags": [
          "Gateway"
        ],
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/TaskClass"
          },
          {
            "$ref": "#/components/parameters/TaskId"
          },
          {
            "$ref": "#/components/parameters/Objective"
          },
          {
            "$ref": "#/components/parameters/ClientSession"
          },
          {
            "name": "anthropic-version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "Not a valid request: an unknown task class, a bad task or session id, or (enforce mode) unclassified_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "402": {
            "description": "approval_required: the budget is at its allocation; the answer names the owner who can approve more.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "policy_conflict: no model satisfies the policy; the answer names the binding constraint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "budget_exhausted past the hard ceiling, or rate limited; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/outcomes": {
      "post": {
        "operationId": "reportOutcome",
        "summary": "Report how a task ended",
        "description": "Accepted, rejected, partial or abandoned: what turns spend into yield. A key that is not admin-scoped may report only its own principal's tasks.",
        "tags": [
          "Gateway"
        ],
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutcomeReport"
              },
              "example": {
                "taskId": "tsk_b5f8c335e4a6",
                "status": "accepted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutcomeRecorded"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "An unknown status or a bad task id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The task belongs to someone else.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "unknown_task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/route/preview": {
      "post": {
        "operationId": "previewRoute",
        "summary": "Preview a route",
        "description": "Which model the router would choose for this class of work, and why, without calling one.",
        "tags": [
          "Gateway"
        ],
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutePreviewRequest"
              },
              "example": {
                "taskClass": "support.triage",
                "objective": "cost"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The choice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutePreview"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "unknown_task_class.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No key, or an unknown or revoked one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "No model qualifies (ok false).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutePreview"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/agents": {
      "get": {
        "operationId": "adminListAgents",
        "summary": "List agents",
        "description": "The fleet a page at a time, with each agent's standing. Needs a service token with agents:read.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "agents:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next of the page before."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of agents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPage"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "adminCreateAgent",
        "summary": "Register an agent from a blueprint",
        "description": "One agent with mandates from templates, all or nothing. A token cannot set a tier, a sponsor or a kill owner. Needs a service token with agents:write.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "agents:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentBlueprint"
              },
              "example": {
                "name": "Expenses bot",
                "principalEmail": "jules@example.com",
                "mandates": [
                  {
                    "template": "groceries"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCreated"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/agents/{aid}/freeze": {
      "post": {
        "operationId": "adminFreezeAgent",
        "summary": "Freeze one agent",
        "description": "Every request from it is refused from this moment, including ones waiting for approval and its model traffic. A machine stops agents; a person starts them again. Needs a service token with agents:freeze.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "agents:freeze",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreezeOne"
              },
              "example": {
                "reason": "SOAR playbook 14: credential leak"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The frozen agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "202": {
            "description": "Past the token's hourly freeze ceiling: pending a person.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetFreezeResult"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "No such agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/freeze": {
      "post": {
        "operationId": "adminFreezeFleet",
        "summary": "Freeze a fleet",
        "description": "Freeze every agent a selector matches. dryRun counts first. Needs a service token with agents:freeze.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "agents:freeze",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FleetFreeze"
              },
              "example": {
                "selector": {
                  "all": true
                },
                "dryRun": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Frozen, or the dry run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetFreezeResult"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "202": {
            "description": "Past the freeze ceiling: pending a person.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetFreezeResult"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "409": {
            "description": "confirm_count_required: send confirmCount equal to the count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/drills": {
      "post": {
        "operationId": "adminDrill",
        "summary": "Run a kill-switch drill",
        "description": "Freeze the selection, check every path refuses, restore, and return a signed report. Needs a service token with agents:freeze.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "agents:freeze",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selector": {
                    "$ref": "#/components/schemas/Selector"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The signed report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DrillReport"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/approvals": {
      "get": {
        "operationId": "adminListApprovals",
        "summary": "Read approvals",
        "description": "Approvals by status, never decided here: a machine approving is not a person approving. Needs a service token with approvals:read.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "approvals:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "denied",
                "expired",
                "cancelled"
              ],
              "default": "pending"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Approvals, and rule suggestions from what people keep approving.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalList"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/scorecard": {
      "get": {
        "operationId": "adminScorecard",
        "summary": "Read the scorecard",
        "description": "The workspace's controls, scored, with the obligations each gives evidence towards. Needs a service token with evidence:read.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "evidence:read",
        "responses": {
          "200": {
            "description": "The scorecard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scorecard"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/evidence/bundle": {
      "get": {
        "operationId": "adminEvidenceBundle",
        "summary": "Download the evidence bundle",
        "description": "The ledger, checkpoints and keys, verifiable offline. Needs a service token with evidence:read.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "serviceToken": []
          }
        ],
        "x-immiscible-scope": "evidence:read",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "First record (sequence number)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Up to, not including, this record."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The bundle.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceBundle"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "429": {
            "description": "Rate limited (600 calls a minute per token); retry after Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/keys": {
      "post": {
        "operationId": "adminIssueKey",
        "summary": "Issue a gateway key",
        "description": "A key bound to a principal, a team and optionally a default task class. Needs an admin-scoped key.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "adminKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The key, shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyIssued"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "The request is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/budgets": {
      "get": {
        "operationId": "adminListBudgets",
        "summary": "List budgets",
        "description": "Every budget in the workspace with what is spent and committed. Needs an admin-scoped key.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "adminKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Budgets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Budget"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "adminSetBudget",
        "summary": "Set a budget",
        "description": "Create or replace the budget for one scope and period (this calendar month unless both ends are given). Every invalid field is listed in errors. Needs an admin-scoped key.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "adminKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetRequest"
              },
              "example": {
                "scope": "team",
                "scopeId": "team_default",
                "baseAllocation": 250000000,
                "hardCeiling": 400000000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The budget.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Budget"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "400": {
            "description": "invalid_budget, with errors: [{ field, message }].",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/admin/availability": {
      "post": {
        "operationId": "adminModelAvailability",
        "summary": "Withdraw or restore a model",
        "description": "Take a model out of routing for this workspace, or put it back. The change is a ledger record. Needs an admin-scoped key.",
        "tags": [
          "Admin"
        ],
        "security": [
          {
            "adminKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailabilityChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "evidenceRecord": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "evidenceRecord"
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "401": {
            "description": "No token, or an unknown, revoked or expired one, or one not accepted from this address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "403": {
            "description": "The token does not have this scope (missing_scope), or the key is not admin-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "404": {
            "description": "unknown_model.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/anthropic/v1/messages/count_tokens": {
      "post": {
        "operationId": "postAnthropicV1MessagesCountTokens",
        "tags": [
          "Gateway"
        ],
        "summary": "Count tokens (Anthropic shape)",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-anthropic-v1-messages-count-tokens"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "getV1Models",
        "tags": [
          "Gateway"
        ],
        "summary": "List models",
        "description": "Authentication: Workspace key. Answers without a key too, with the catalogue as it stands for nobody in particular.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-models"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string"
                          },
                          "owned_by": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "tier": {
                            "type": "string"
                          },
                          "price": {
                            "type": "object",
                            "properties": {
                              "inputPerMTok": {
                                "type": "integer"
                              },
                              "outputPerMTok": {
                                "type": "integer"
                              },
                              "cachedInputPerMTok": {
                                "type": "number"
                              }
                            }
                          },
                          "capability": {
                            "type": "object",
                            "properties": {
                              "swebenchPro": {
                                "type": "integer"
                              },
                              "gpqa": {
                                "type": "integer"
                              },
                              "ifeval": {
                                "type": "integer"
                              },
                              "reasoning": {
                                "type": "integer"
                              },
                              "toolUse": {
                                "type": "integer"
                              },
                              "contextWindow": {
                                "type": "integer"
                              },
                              "multilingual": {
                                "type": "integer"
                              }
                            }
                          },
                          "jurisdiction": {
                            "type": "object",
                            "properties": {
                              "weightsOrigin": {
                                "type": "string"
                              },
                              "weightsClass": {
                                "type": "string"
                              },
                              "servingDomicile": {
                                "type": "string"
                              },
                              "servingEntity": {
                                "type": "string"
                              },
                              "dataRegions": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "cloudActExposed": {
                                "type": "boolean"
                              }
                            }
                          },
                          "compliance": {
                            "type": "object",
                            "properties": {
                              "soc2TypeII": {
                                "type": "boolean"
                              },
                              "iso27001": {
                                "type": "boolean"
                              },
                              "hipaaEligible": {
                                "type": "boolean"
                              },
                              "zeroDataRetention": {
                                "type": "boolean"
                              },
                              "gpaiCodeOfPractice": {
                                "type": "boolean"
                              },
                              "euRepresentative": {
                                "type": "boolean"
                              }
                            }
                          },
                          "availability": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              },
                              "reason": {},
                              "since": {}
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "anthropic/claude-opus-4.8",
                      "object": "model",
                      "owned_by": "anthropic",
                      "displayName": "Claude Opus 4.8",
                      "tier": "frontier",
                      "price": {
                        "inputPerMTok": 15,
                        "outputPerMTok": 75,
                        "cachedInputPerMTok": 1.5
                      },
                      "capability": {
                        "swebenchPro": 78,
                        "gpqa": 84,
                        "ifeval": 93,
                        "reasoning": 96,
                        "toolUse": 95,
                        "contextWindow": 1000000,
                        "multilingual": 88
                      },
                      "jurisdiction": {
                        "weightsOrigin": "US",
                        "weightsClass": "closed",
                        "servingDomicile": "US",
                        "servingEntity": "Anthropic PBC",
                        "dataRegions": [
                          "us-east"
                        ],
                        "cloudActExposed": true
                      },
                      "compliance": {
                        "soc2TypeII": true,
                        "iso27001": true,
                        "hipaaEligible": true,
                        "zeroDataRetention": true,
                        "gpaiCodeOfPractice": true,
                        "euRepresentative": true
                      },
                      "availability": {
                        "status": "available",
                        "reason": null,
                        "since": null
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/clients": {
      "get": {
        "operationId": "getV1Clients",
        "tags": [
          "Gateway"
        ],
        "summary": "List recognised clients",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-clients"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "inline": {
                          "type": "integer"
                        },
                        "hybrid": {
                          "type": "integer"
                        },
                        "ingest": {
                          "type": "integer"
                        },
                        "statement": {
                          "type": "string"
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string"
                          },
                          "protocol": {
                            "type": "string"
                          },
                          "endpoint": {
                            "type": "string"
                          },
                          "defaultTaskClass": {
                            "type": "string"
                          },
                          "sessionConcept": {
                            "type": "string"
                          },
                          "outcomeSignal": {
                            "type": "string"
                          },
                          "config": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "notes": {
                            "type": "string"
                          },
                          "capabilities": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "routing": {
                                "type": "boolean"
                              },
                              "preflightEnforcement": {
                                "type": "boolean"
                              },
                              "evidence": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "coverage": {
                    "total": 14,
                    "inline": 11,
                    "hybrid": 1,
                    "ingest": 2,
                    "statement": "11 of 14 supported clients can be governed in path; 1 partially; 2 are hosted services where Immiscible reconciles usage but cannot enforce before the spend."
                  },
                  "data": [
                    {
                      "id": "claude-code",
                      "name": "Claude Code",
                      "vendor": "Anthropic",
                      "category": "coding agent",
                      "mode": "inline",
                      "protocol": "anthropic",
                      "endpoint": "/anthropic/v1/messages",
                      "defaultTaskClass": "code.feature",
                      "sessionConcept": "session",
                      "outcomeSignal": "commit or merged PR in the session working tree",
                      "config": [
                        "export ANTHROPIC_BASE_URL=https://immiscible.internal/anthropic"
                      ],
                      "notes": "Long sessions, heavy caching. Cache-read tokens are reported separately by the Messages API and Immiscible bills them at the cache rate, so the numbers reconcil",
                      "capabilities": {
                        "id": "inline",
                        "label": "In path",
                        "routing": true,
                        "preflightEnforcement": true,
                        "evidence": "full Art. 12 record per inference"
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/task-classes": {
      "get": {
        "operationId": "getV1TaskClasses",
        "tags": [
          "Gateway"
        ],
        "summary": "List task classes",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-task-classes"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "floor": {
                            "type": "object",
                            "properties": {
                              "swebenchPro": {
                                "type": "integer"
                              },
                              "toolUse": {
                                "type": "integer"
                              },
                              "contextWindow": {
                                "type": "integer"
                              }
                            }
                          },
                          "dataClass": {
                            "type": "string"
                          },
                          "riskTier": {
                            "type": "string"
                          },
                          "outcomeUnit": {
                            "type": "string"
                          },
                          "expectedTokens": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "code.feature",
                      "name": "Feature implementation",
                      "floor": {
                        "swebenchPro": 60,
                        "toolUse": 75,
                        "contextWindow": 128000
                      },
                      "dataClass": "confidential",
                      "riskTier": "limited",
                      "outcomeUnit": "merged PR",
                      "expectedTokens": 48000
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/policy-profiles": {
      "get": {
        "operationId": "getV1PolicyProfiles",
        "tags": [
          "Gateway"
        ],
        "summary": "List policy profiles",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-policy-profiles"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "pragmatic": {
                          "type": "object",
                          "properties": {}
                        },
                        "eu-sovereign": {
                          "type": "object",
                          "properties": {
                            "allowedDataRegions": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "allowedServingDomiciles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cloudActMaxDataClass": {
                              "type": "string"
                            },
                            "zeroRetentionMinDataClass": {
                              "type": "string"
                            },
                            "preferredDataRegions": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "maxSubprocessors": {
                              "type": "integer"
                            },
                            "aggregatorMaxDataClass": {
                              "type": "string"
                            },
                            "approvedSubprocessors": {
                              "type": "array",
                              "items": {}
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "pragmatic": {},
                    "eu-sovereign": {
                      "allowedDataRegions": [
                        "eu-west"
                      ],
                      "allowedServingDomiciles": [
                        "DE"
                      ],
                      "cloudActMaxDataClass": "confidential",
                      "zeroRetentionMinDataClass": "internal",
                      "preferredDataRegions": [
                        "eu-central"
                      ],
                      "maxSubprocessors": 1,
                      "aggregatorMaxDataClass": "internal",
                      "approvedSubprocessors": []
                    }
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/upstreams": {
      "get": {
        "operationId": "getV1Upstreams",
        "tags": [
          "Gateway"
        ],
        "summary": "Upstream status",
        "description": "Authentication: Workspace key, admin scope.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-upstreams"
        },
        "security": [
          {
            "adminKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "base": {
                            "type": "string"
                          },
                          "envKey": {
                            "type": "string"
                          },
                          "configured": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "provider": "openai",
                      "kind": "openai",
                      "base": "https://api.openai.com/v1",
                      "envKey": "OPENAI_API_KEY",
                      "configured": false
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/reports/{kind}": {
      "get": {
        "operationId": "getV1ReportsKind",
        "tags": [
          "Gateway"
        ],
        "summary": "Read a report",
        "description": "Authentication: Workspace key, admin scope.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-reports-kind"
        },
        "security": [
          {
            "adminKey": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Report kind: `finance`, `engineering`, `compliance`, `org` or `assessment`",
            "example": "finance"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "headline": {
                      "type": "object",
                      "properties": {
                        "spend": {
                          "type": "integer"
                        },
                        "spendUsd": {
                          "type": "number"
                        },
                        "realisedWaste": {
                          "type": "integer"
                        },
                        "realisedWasteUsd": {
                          "type": "number"
                        },
                        "wasteShare": {
                          "type": "number"
                        },
                        "routingOpportunity": {
                          "type": "integer"
                        },
                        "routingOpportunityUsd": {
                          "type": "integer"
                        },
                        "totalRecoverable": {
                          "type": "integer"
                        }
                      }
                    },
                    "costPerOutcome": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "taskClassId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "unit": {
                            "type": "string"
                          },
                          "costPerOutcome": {
                            "type": "integer"
                          },
                          "costPerOutcomeUsd": {
                            "type": "number"
                          },
                          "outcomes": {
                            "type": "integer"
                          },
                          "spend": {
                            "type": "integer"
                          },
                          "yieldRate": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "wasteByMechanism": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "mechanism": {
                            "type": "string"
                          },
                          "tokens": {
                            "type": "integer"
                          },
                          "cost": {
                            "type": "integer"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "share": {
                            "type": "number"
                          },
                          "usd": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "budgetPositions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string"
                          },
                          "scopeId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string"
                          },
                          "relativeYield": {
                            "type": "number"
                          },
                          "multiplier": {
                            "type": "integer"
                          },
                          "baseAllocation": {
                            "type": "integer"
                          },
                          "effectiveAllocation": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "teamId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "note": {},
                          "headcount": {
                            "type": "integer"
                          },
                          "tasks": {
                            "type": "integer"
                          },
                          "openTasks": {
                            "type": "integer"
                          },
                          "consumedTokens": {
                            "type": "integer"
                          },
                          "yieldTokens": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "modelId": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "tier": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "servingDomicile": {
                            "type": "string"
                          },
                          "cloudActExposed": {
                            "type": "boolean"
                          },
                          "accessPath": {
                            "type": "string"
                          },
                          "readers": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "headline": {
                    "spend": 6382052885,
                    "spendUsd": 6382.052885,
                    "realisedWaste": 737047887,
                    "realisedWasteUsd": 737.047887,
                    "wasteShare": 0.1154875867970812,
                    "routingOpportunity": 0,
                    "routingOpportunityUsd": 0,
                    "totalRecoverable": 737047887
                  },
                  "costPerOutcome": [
                    {
                      "taskClassId": "code.feature",
                      "name": "Feature implementation",
                      "unit": "merged PR",
                      "costPerOutcome": 4670551,
                      "costPerOutcomeUsd": 4.670551,
                      "outcomes": 339,
                      "spend": 1583316809,
                      "yieldRate": 0.8751203763953684
                    }
                  ],
                  "wasteByMechanism": [
                    {
                      "mechanism": "rejection",
                      "tokens": 113341696,
                      "cost": 736531990,
                      "kind": "realised",
                      "share": 0.1154067512087061,
                      "usd": 736.53199
                    }
                  ],
                  "budgetPositions": [
                    {
                      "scope": "team",
                      "scopeId": "team_548f6f10",
                      "name": "Research",
                      "owner": "priya@amethyst.example",
                      "relativeYield": 1.0070445502670404,
                      "multiplier": 1,
                      "baseAllocation": 661240000,
                      "effectiveAllocation": 661240000
                    }
                  ],
                  "teams": [
                    {
                      "teamId": "team_d7c3f3f6",
                      "name": "Engineering",
                      "note": null,
                      "headcount": 6,
                      "tasks": 794,
                      "openTasks": 0,
                      "consumedTokens": 550180837,
                      "yieldTokens": 478592439
                    }
                  ],
                  "models": [
                    {
                      "modelId": "anthropic/claude-opus-4.8",
                      "displayName": "Claude Opus 4.8",
                      "tier": "frontier",
                      "provider": "anthropic",
                      "servingDomicile": "US",
                      "cloudActExposed": true,
                      "accessPath": "direct",
                      "readers": 1
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/evidence/pack": {
      "get": {
        "operationId": "getV1EvidencePack",
        "tags": [
          "Gateway"
        ],
        "summary": "Evidence pack",
        "description": "Authentication: Workspace key, admin scope.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-evidence-pack"
        },
        "security": [
          {
            "adminKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string"
                    },
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "since": {},
                        "until": {}
                      }
                    },
                    "riskTier": {
                      "type": "string"
                    },
                    "integrity": {
                      "type": "object",
                      "properties": {
                        "chainVerified": {
                          "type": "boolean"
                        },
                        "detail": {},
                        "head": {
                          "type": "string"
                        },
                        "totalRecords": {
                          "type": "integer"
                        }
                      }
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "inferences": {
                          "type": "integer"
                        },
                        "policyActions": {
                          "type": "integer"
                        },
                        "outcomes": {
                          "type": "integer"
                        },
                        "availabilityChanges": {
                          "type": "integer"
                        },
                        "individualAccessEvents": {
                          "type": "integer"
                        }
                      }
                    },
                    "modelsUsed": {
                      "type": "array",
                      "items": {}
                    },
                    "transfers": {
                      "type": "object",
                      "properties": {
                        "byServingDomicile": {
                          "type": "array",
                          "items": {}
                        },
                        "thirdCountryTransfers": {
                          "type": "integer"
                        },
                        "statement": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "schema": "assay.evidencepack.v1",
                  "generatedAt": "2026-10-06T12:47:47.496Z",
                  "period": {
                    "since": null,
                    "until": null
                  },
                  "riskTier": "high",
                  "integrity": {
                    "chainVerified": true,
                    "detail": null,
                    "head": "da9beefc29f9ef029a33edb0ac048c081d4fa67754c1d75b6fe5ec605b75e0b3",
                    "totalRecords": 200
                  },
                  "coverage": {
                    "inferences": 0,
                    "policyActions": 6,
                    "outcomes": 0,
                    "availabilityChanges": 0,
                    "individualAccessEvents": 0
                  },
                  "modelsUsed": [],
                  "transfers": {
                    "byServingDomicile": [],
                    "thirdCountryTransfers": 0,
                    "statement": "No inference in this period was served by an entity domiciled outside the EU/UK."
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/evidence/verify": {
      "get": {
        "operationId": "getV1EvidenceVerify",
        "tags": [
          "Gateway"
        ],
        "summary": "Verify the ledger",
        "description": "Authentication: Workspace key, admin scope.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-evidence-verify"
        },
        "security": [
          {
            "adminKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "length": {
                      "type": "integer"
                    },
                    "head": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "length": 200,
                  "head": "da9beefc29f9ef029a33edb0ac048c081d4fa67754c1d75b6fe5ec605b75e0b3"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/ingest/devin": {
      "post": {
        "operationId": "postV1IngestDevin",
        "tags": [
          "Gateway"
        ],
        "summary": "Ingest Devin usage",
        "description": "Authentication: Workspace key, admin scope.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-ingest-devin"
        },
        "security": [
          {
            "adminKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "since": {
                    "type": "string"
                  },
                  "acuUsd": {
                    "type": "number"
                  }
                }
              },
              "example": {
                "token": "devin_...",
                "since": "2026-09-01",
                "acuUsd": 2.25
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/actions/{id}/explain": {
      "get": {
        "operationId": "getV1ActionsIdExplain",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "Explain a decision",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-actions-id-explain"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Action id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "headline": {
                      "type": "string"
                    },
                    "why": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "effect": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "next": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "decision": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "decision": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "mandateId": {
                          "type": "string"
                        },
                        "risk": {
                          "type": "object",
                          "properties": {
                            "score": {
                              "type": "integer"
                            },
                            "signals": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "act_Vd1x0a9e",
                  "headline": "Your request \"Buy this week's groceries from Ocado\" for £95.00 to ocado.com is waiting for a person to decide.",
                  "why": [
                    "£95.00 is above the £80.00 that Weekly groceries lets the agent spend without asking."
                  ],
                  "signals": [
                    {
                      "id": "approve_above",
                      "label": "Above what it may spend without asking",
                      "effect": "approval",
                      "detail": "£95.00 is above the £80.00 that Weekly groceries lets the agent spend without asking."
                    }
                  ],
                  "next": "Do not act yet. Tell the person you act for that a person has been asked, then poll check_action_status (or GET /v1/actions/:id) every five seconds for a minute and every thirty after. ...",
                  "text": "Your request ... is waiting for a person to decide.\nIt was judged under the rule \"Weekly groceries\" (payment, active).\n...",
                  "decision": {
                    "id": "act_Vd1x0a9e",
                    "decision": "approval_required",
                    "status": "pending_approval",
                    "reasons": [
                      "..."
                    ],
                    "mandateId": "mdt_91c3e0b2",
                    "risk": {
                      "score": 20,
                      "signals": [
                        "..."
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/immiscible-keys.json": {
      "get": {
        "operationId": "getWellKnownImmiscibleKeysJson",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "Signing keys (JWKS)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-immiscible-keys-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kty": {
                            "type": "string"
                          },
                          "crv": {
                            "type": "string"
                          },
                          "kid": {
                            "type": "string"
                          },
                          "x": {
                            "type": "string"
                          },
                          "alg": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "keys": [
                    {
                      "kty": "OKP",
                      "crv": "Ed25519",
                      "kid": "k_2026_09",
                      "x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo",
                      "alg": "EdDSA"
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/downloads/claude-code-hook.mjs": {
      "get": {
        "operationId": "getDownloadsClaudeCodeHookMjs",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "Download the Claude Code hook",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-downloads-claude-code-hook-mjs"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: the file itself.",
            "content": {
              "text/javascript": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/downloads/immiscible-openapi-3.0.json": {
      "get": {
        "operationId": "getDownloadsImmiscibleOpenapi30Json",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "OpenAPI (3.0)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-downloads-immiscible-openapi-3-0-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/downloads/immiscible-power-platform.swagger.json": {
      "get": {
        "operationId": "getDownloadsImmisciblePowerPlatformSwaggerJson",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "Power Platform connector",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-downloads-immiscible-power-platform-swagger-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/downloads/n8n-ask-immiscible.json": {
      "get": {
        "operationId": "getDownloadsN8nAskImmiscibleJson",
        "tags": [
          "Actions and receipts"
        ],
        "summary": "n8n workflow",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-downloads-n8n-ask-immiscible-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "operationId": "getMcp",
        "tags": [
          "MCP"
        ],
        "summary": "MCP server (no streams)",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-mcp"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMcp",
        "tags": [
          "MCP"
        ],
        "summary": "MCP server (no sessions)",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-mcp"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postMcp",
        "tags": [
          "MCP"
        ],
        "summary": "MCP server",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-mcp"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string"
                  },
                  "id": {
                    "type": "integer"
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "arguments": {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "merchant": {
                            "type": "object",
                            "properties": {
                              "domain": {
                                "type": "string"
                              }
                            }
                          },
                          "summary": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "request_payment",
                  "arguments": {
                    "amount": 4200,
                    "currency": "GBP",
                    "merchant": {
                      "domain": "grocer.example"
                    },
                    "summary": "Weekly shop"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC 2.0 response (Model Context Protocol, Streamable HTTP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jsonrpc"
                  ],
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "const": "2.0"
                    },
                    "id": {
                      "type": [
                        "string",
                        "integer",
                        "null"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "data": {}
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/mcp/proxy/{uid}": {
      "get": {
        "operationId": "getMcpProxyUid",
        "tags": [
          "MCP"
        ],
        "summary": "MCP proxy (no streams)",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-mcp-proxy-uid"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "MCP upstream id",
            "example": "mcu_6c1d0e"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMcpProxyUid",
        "tags": [
          "MCP"
        ],
        "summary": "MCP proxy (no sessions)",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-mcp-proxy-uid"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "MCP upstream id",
            "example": "mcu_6c1d0e"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postMcpProxyUid",
        "tags": [
          "MCP"
        ],
        "summary": "MCP proxy",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-mcp-proxy-uid"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "MCP upstream id",
            "example": "mcu_6c1d0e"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string"
                  },
                  "id": {
                    "type": "integer"
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "arguments": {
                        "type": "object",
                        "properties": {
                          "owner": {
                            "type": "string"
                          },
                          "repo": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 7,
                "method": "tools/call",
                "params": {
                  "name": "create_pull_request",
                  "arguments": {
                    "owner": "acme",
                    "repo": "api",
                    "title": "Fix retry"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC 2.0 response (Model Context Protocol, Streamable HTTP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jsonrpc"
                  ],
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "const": "2.0"
                    },
                    "id": {
                      "type": [
                        "string",
                        "integer",
                        "null"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "data": {}
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/mcp/server-card": {
      "get": {
        "operationId": "getMcpServerCard",
        "tags": [
          "MCP"
        ],
        "summary": "MCP server card",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-mcp-server-card"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/oauth/device": {
      "post": {
        "operationId": "postOauthDevice",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Start a CLI sign-in",
        "description": "Authentication: Public. The first step of the developer CLI's sign-in (RFC 8628 device authorization). Rate limited per address.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-oauth-device"
        },
        "security": [],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "code_challenge": {
                    "type": "string"
                  },
                  "code_challenge_method": {
                    "type": "string"
                  },
                  "client_name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "client_id": "immiscible-cli",
                "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
                "code_challenge_method": "S256",
                "client_name": "Immiscible CLI on laptop"
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "code_challenge": {
                    "type": "string"
                  },
                  "code_challenge_method": {
                    "type": "string"
                  },
                  "client_name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "client_id": "immiscible-cli",
                "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
                "code_challenge_method": "S256",
                "client_name": "Immiscible CLI on laptop"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "device_code": {
                      "type": "string"
                    },
                    "user_code": {
                      "type": "string"
                    },
                    "verification_uri": {
                      "type": "string"
                    },
                    "verification_uri_complete": {
                      "type": "string"
                    },
                    "expires_in": {
                      "type": "integer"
                    },
                    "interval": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "device_code": "Jx3v0yQk2m4W8rT1b9Lh6Zc5sN7pD0aEfGuIoKjYlMn",
                  "user_code": "BCDF-GHJK",
                  "verification_uri": "https://immiscible.fly.dev/app/device",
                  "verification_uri_complete": "https://immiscible.fly.dev/app/device?code=BCDF-GHJK",
                  "expires_in": 600,
                  "interval": 5
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/whoami": {
      "get": {
        "operationId": "getV1CliWhoami",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Who the CLI token acts for",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-whoami"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    },
                    "token": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "can": {
                      "type": "object",
                      "properties": {
                        "addAgents": {
                          "type": "boolean"
                        }
                      }
                    },
                    "server": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "time": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": "usr_d253e4892f3a4c5d",
                    "email": "jules@amethyst.example",
                    "name": "Jules Moreau"
                  },
                  "workspace": {
                    "id": "ws_12832a06f3134d5f",
                    "name": "Amethyst",
                    "role": "owner",
                    "currency": "GBP"
                  },
                  "token": {
                    "id": "clt_b11e4ffb3aeb0179",
                    "name": "docs",
                    "scopes": [
                      "agents:read"
                    ],
                    "createdAt": "2026-10-06T12:47:41.518Z",
                    "expiresAt": "2027-01-04T12:47:41.518Z"
                  },
                  "can": {
                    "addAgents": true
                  },
                  "server": {
                    "url": "https://immiscible.fly.dev",
                    "version": "1.0.0",
                    "time": "2026-10-06T12:47:47.522Z"
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/purposes": {
      "get": {
        "operationId": "getV1CliPurposes",
        "tags": [
          "Developer CLI"
        ],
        "summary": "What an agent can be for",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-purposes"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "rule": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "pays_invoices",
                      "label": "Pays invoices",
                      "kind": "payment",
                      "rule": "Pays up to £10,000 at a time and £50,000 a month. Payments above £5,000 need a person. A supplier it has not paid before needs a person."
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/agents": {
      "get": {
        "operationId": "getV1CliAgents",
        "tags": [
          "Developer CLI"
        ],
        "summary": "List agents",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-agents"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "tier": {
                            "type": "string"
                          },
                          "lastActionAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "canManage": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "agt_dd6dc371218b0efb975711eb",
                      "name": "Procurement",
                      "vendor": "openai",
                      "status": "active",
                      "tier": "junior",
                      "lastActionAt": "2026-09-29T12:44:07.002Z",
                      "canManage": true,
                      "url": "https://immiscible.fly.dev/app/agents/agt_dd6dc371218b0efb975711eb?w=ws_12832a06f3134d5f"
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1CliAgents",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Add an agent with its rule and key",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-cli-agents"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "purpose": {
                    "type": "string"
                  },
                  "vendor": {
                    "type": "string"
                  },
                  "reuse": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "name": "Invoice agent",
                "purpose": "pays_invoices",
                "vendor": "openai",
                "reuse": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reused": {
                      "type": "boolean"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "vendor": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "tier": {
                          "type": "string"
                        },
                        "lastActionAt": {},
                        "canManage": {
                          "type": "boolean"
                        },
                        "url": {
                          "type": "string"
                        }
                      }
                    },
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    },
                    "key": {
                      "type": "string"
                    },
                    "keyId": {
                      "type": "string"
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "actions": {},
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "pending": {},
                    "binding": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "prefix": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "scope": {
                          "type": "string"
                        },
                        "principalId": {
                          "type": "string"
                        },
                        "teamId": {
                          "type": "string"
                        },
                        "taskClassId": {
                          "type": "string"
                        },
                        "policyProfile": {},
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdBy": {
                          "type": "string"
                        },
                        "lastUsedAt": {},
                        "revokedAt": {},
                        "calls": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "reused": false,
                  "agent": {
                    "id": "agt_cd450fd54a34e55e8a8d08d3",
                    "name": "Travel desk",
                    "vendor": "openai",
                    "status": "active",
                    "tier": "intern",
                    "lastActionAt": null,
                    "canManage": true,
                    "url": "https://immiscible.fly.dev/app/agents/agt_cd450fd54a34e55e8a8d08d3?w=ws_fa833074ebeb45e8"
                  },
                  "workspace": {
                    "id": "ws_fa833074ebeb45e8",
                    "name": "Quayside",
                    "role": "owner",
                    "currency": "GBP"
                  },
                  "key": "ask_...",
                  "keyId": "key_128433ca90d2",
                  "rules": [
                    {
                      "id": "mdt_08dc6567eac6b6c1aed35fe4",
                      "title": "Books travel",
                      "kind": "payment",
                      "actions": null,
                      "description": "Pays up to £1,500 at a time and £10,000 a month. A supplier it has not paid before needs a person."
                    }
                  ],
                  "pending": null,
                  "binding": {
                    "id": "key_128433ca90d2",
                    "prefix": "ask_...",
                    "label": "agent: Travel desk",
                    "scope": "agent",
                    "principalId": "p_548c20992826",
                    "teamId": "team_default",
                    "taskClassId": "agent.orchestration",
                    "policyProfile": null,
                    "createdAt": "2026-10-06T12:48:18.383Z",
                    "createdBy": "sam@quayside.example",
                    "lastUsedAt": null,
                    "revokedAt": null,
                    "calls": 0
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/status": {
      "get": {
        "operationId": "getV1CliStatus",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Waiting approvals, today, this month",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-status"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    },
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "waiting": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "agentId": {
                                "type": "string"
                              },
                              "agentName": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "amountText": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "expiresAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "url": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "today": {
                      "type": "object",
                      "properties": {
                        "since": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "allowed": {
                          "type": "integer"
                        },
                        "refused": {
                          "type": "integer"
                        },
                        "asked": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    },
                    "month": {
                      "type": "object",
                      "properties": {
                        "month": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "ai": {
                          "type": "object",
                          "properties": {
                            "minor": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            },
                            "requests": {
                              "type": "integer"
                            },
                            "usdMicros": {
                              "type": "integer"
                            }
                          }
                        },
                        "payments": {
                          "type": "object",
                          "properties": {
                            "minor": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            },
                            "count": {
                              "type": "integer"
                            },
                            "unconverted": {
                              "type": "array",
                              "items": {}
                            }
                          }
                        },
                        "rate": {
                          "type": "object",
                          "properties": {
                            "perUsd": {
                              "type": "number"
                            },
                            "day": {
                              "type": "string"
                            },
                            "source": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "workspace": {
                    "id": "ws_12832a06f3134d5f",
                    "name": "Amethyst",
                    "role": "owner",
                    "currency": "GBP"
                  },
                  "generatedAt": "2026-10-06T12:47:47.555Z",
                  "waiting": {
                    "count": 3,
                    "items": [
                      {
                        "id": "apr_174974d88fb7e09461b72aa5",
                        "agentId": "agt_b85c6ccee4e02157a00cd278",
                        "agentName": "Finance ops",
                        "summary": "Pay Kings Cross Couriers invoice 0931 to the updated bank account",
                        "type": "payment",
                        "amountText": "£18,400.00",
                        "createdAt": "2026-10-06T12:34:17.227Z",
                        "expiresAt": "2026-10-07T12:34:17.227Z",
                        "url": "https://immiscible.fly.dev/app/approvals/apr_174974d88fb7e09461b72aa5?w=ws_12832a06f3134d5f"
                      }
                    ]
                  },
                  "today": {
                    "since": "2026-10-06T00:00:00.000Z",
                    "allowed": 0,
                    "refused": 0,
                    "asked": 3,
                    "total": 3
                  },
                  "month": {
                    "month": "2026-10",
                    "currency": "GBP",
                    "ai": {
                      "minor": 0,
                      "text": "£0.00",
                      "requests": 0,
                      "usdMicros": 0
                    },
                    "payments": {
                      "minor": 166300,
                      "text": "£1,663.00",
                      "count": 6,
                      "unconverted": []
                    },
                    "rate": {
                      "perUsd": 0.756159,
                      "day": "2026-10-05",
                      "source": "European Central Bank reference rate"
                    }
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/evidence/ai-act": {
      "get": {
        "operationId": "getV1CliEvidenceAiAct",
        "tags": [
          "Developer CLI"
        ],
        "summary": "EU AI Act deployer evidence pack",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-evidence-ai-act"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/tokens": {
      "post": {
        "operationId": "postV1CliTokens",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Make a CI token",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-cli-tokens"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "readOnly": {
                    "type": "boolean"
                  },
                  "expiresInDays": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "name": "ci",
                "readOnly": true,
                "expiresInDays": 30
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "workspaceId": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "clt_ef9160fc75835d11",
                  "name": "github-actions",
                  "token": "imc_...",
                  "scopes": [
                    "agents:read"
                  ],
                  "expiresAt": "2027-01-04T12:48:18.393Z",
                  "workspaceId": "ws_fa833074ebeb45e8",
                  "note": "This is the only time the token is shown."
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getV1CliTokens",
        "tags": [
          "Developer CLI"
        ],
        "summary": "List your CLI tokens",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-tokens"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastIp": {
                            "type": "string"
                          },
                          "revokedAt": {},
                          "revokedReason": {},
                          "current": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "clt_b11e4ffb3aeb0179",
                      "name": "docs",
                      "kind": "cli",
                      "userId": "usr_d253e4892f3a4c5d",
                      "workspaceId": "ws_12832a06f3134d5f",
                      "scopes": [
                        "agents:read"
                      ],
                      "createdAt": "2026-10-06T12:47:41.518Z",
                      "expiresAt": "2027-01-04T12:47:41.518Z",
                      "lastUsedAt": "2026-10-06T12:47:47.521Z",
                      "lastIp": "127.0.0.1",
                      "revokedAt": null,
                      "revokedReason": null,
                      "current": true
                    }
                  ]
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/tokens/{tid}": {
      "delete": {
        "operationId": "deleteV1CliTokensTid",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Revoke one of your CLI tokens",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-v1-cli-tokens-tid"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [
          {
            "name": "tid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id, or for service tokens the token id",
            "example": "team_platform"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "revoked": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "revoked": "clt_ef9160fc75835d11"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/token": {
      "delete": {
        "operationId": "deleteV1CliToken",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Revoke this CLI token",
        "description": "Authentication: CLI token.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-v1-cli-token"
        },
        "security": [
          {
            "cliToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "revoked": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "revoked": "clt_d865091d43eb3619"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/agent-key": {
      "get": {
        "operationId": "getV1CliAgentKey",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Check an agent key",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-cli-agent-key"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "tier": {
                          "type": "string"
                        }
                      }
                    },
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "key": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "rules": {
                      "type": "integer"
                    },
                    "waitingForSecondOwner": {
                      "type": "integer"
                    },
                    "covers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "actions": {}
                        }
                      }
                    },
                    "pending": {},
                    "canAct": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "agent": {
                    "id": "agt_15cf4adcf8235ff0b0100202",
                    "name": "Invoice agent",
                    "status": "active",
                    "tier": "intern"
                  },
                  "workspace": {
                    "id": "ws_fa833074ebeb45e8",
                    "name": "Quayside"
                  },
                  "key": {
                    "id": "key_24c6dfd580ab",
                    "createdAt": "2026-10-06T12:43:22.870Z"
                  },
                  "rules": 1,
                  "waitingForSecondOwner": 0,
                  "covers": [
                    {
                      "kind": "payment",
                      "actions": null
                    }
                  ],
                  "pending": null,
                  "canAct": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/cli/test": {
      "post": {
        "operationId": "postV1CliTest",
        "tags": [
          "Developer CLI"
        ],
        "summary": "Make the setup test call",
        "description": "Authentication: Agent key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-cli-test"
        },
        "security": [
          {
            "agentKey": []
          },
          {
            "agentKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "governed": {
                      "type": "boolean"
                    },
                    "decision": {
                      "type": "string"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "actionId": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "tidied": {
                      "type": "string"
                    },
                    "replay": {
                      "type": "boolean"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "governed": true,
                  "decision": "approval_required",
                  "reasons": [
                    "This agent has not paid example.com before. A person must approve new merchants."
                  ],
                  "actionId": "act_fb509fba037d83dcc80898b4",
                  "kind": "payment",
                  "tidied": "earlier",
                  "replay": true,
                  "agent": {
                    "id": "agt_15cf4adcf8235ff0b0100202",
                    "name": "Invoice agent",
                    "status": "active"
                  },
                  "workspace": {
                    "id": "ws_fa833074ebeb45e8",
                    "name": "Quayside"
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "operationId": "getWellKnownOauthAuthorizationServer",
        "tags": [
          "OAuth for MCP clients"
        ],
        "summary": "OAuth server metadata",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-oauth-authorization-server"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server/mcp": {
      "get": {
        "operationId": "getWellKnownOauthAuthorizationServerMcp",
        "tags": [
          "OAuth for MCP clients"
        ],
        "summary": "OAuth server metadata (MCP path)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-oauth-authorization-server-mcp"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/openid-configuration/mcp": {
      "get": {
        "operationId": "getWellKnownOpenidConfigurationMcp",
        "tags": [
          "OAuth for MCP clients"
        ],
        "summary": "OpenID configuration (MCP path)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-openid-configuration-mcp"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "operationId": "getWellKnownOauthProtectedResource",
        "tags": [
          "OAuth for MCP clients"
        ],
        "summary": "Protected resource metadata",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-oauth-protected-resource"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "operationId": "getWellKnownOauthProtectedResourceMcp",
        "tags": [
          "OAuth for MCP clients"
        ],
        "summary": "Protected resource metadata (MCP path)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-oauth-protected-resource-mcp"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getHealthz",
        "tags": [
          "Health"
        ],
        "summary": "Liveness",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-healthz"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "string"
                    },
                    "uptimeSec": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "version": "1.0.0",
                  "uptimeSec": 86400
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/readyz": {
      "get": {
        "operationId": "getReadyz",
        "tags": [
          "Health"
        ],
        "summary": "Readiness",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-readyz"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "schema": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "schema": 42
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/hooks/claude-code": {
      "post": {
        "operationId": "postV1HooksClaudeCode",
        "tags": [
          "Other"
        ],
        "summary": "Claude Code http hook",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-hooks-claude-code"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hook_event_name": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "cwd": {
                    "type": "string"
                  },
                  "tool_name": {
                    "type": "string"
                  },
                  "tool_input": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      }
                    }
                  },
                  "tool_use_id": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "hook_event_name": "PreToolUse",
                "session_id": "9f1c2e",
                "cwd": "/Users/dev/acme",
                "tool_name": "Bash",
                "tool_input": {
                  "command": "git push --force origin main"
                },
                "tool_use_id": "toolu_01"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. The schema is read from the documented example.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hookSpecificOutput": {
                      "type": "object",
                      "properties": {
                        "hookEventName": {
                          "type": "string"
                        },
                        "permissionDecision": {
                          "type": "string"
                        },
                        "permissionDecisionReason": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "hookSpecificOutput": {
                    "hookEventName": "PreToolUse",
                    "permissionDecision": "deny",
                    "permissionDecisionReason": "Immiscible refused: Coding agent baseline refuses a force push to main, master or a release branch, which rewrites history others share."
                  }
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/assay-keys.json": {
      "get": {
        "operationId": "getWellKnownAssayKeysJson",
        "tags": [
          "Other"
        ],
        "summary": "List assay keys (json)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-assay-keys-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Users": {
      "get": {
        "operationId": "getScimV2Users",
        "tags": [
          "Other"
        ],
        "summary": "List Users",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-users"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postScimV2Users",
        "tags": [
          "Other"
        ],
        "summary": "Create User",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-scim-v2-users"
        },
        "security": [],
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Users/{id}": {
      "get": {
        "operationId": "getScimV2UsersId",
        "tags": [
          "Other"
        ],
        "summary": "Retrieve User",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-users-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putScimV2UsersId",
        "tags": [
          "Other"
        ],
        "summary": "Set User",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/put-scim-v2-users-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchScimV2UsersId",
        "tags": [
          "Other"
        ],
        "summary": "Update User",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/patch-scim-v2-users-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteScimV2UsersId",
        "tags": [
          "Other"
        ],
        "summary": "Delete User",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-scim-v2-users-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Groups": {
      "get": {
        "operationId": "getScimV2Groups",
        "tags": [
          "Other"
        ],
        "summary": "List Groups",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-groups"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postScimV2Groups",
        "tags": [
          "Other"
        ],
        "summary": "Create Group",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-scim-v2-groups"
        },
        "security": [],
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Groups/{id}": {
      "get": {
        "operationId": "getScimV2GroupsId",
        "tags": [
          "Other"
        ],
        "summary": "Retrieve Group",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-groups-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putScimV2GroupsId",
        "tags": [
          "Other"
        ],
        "summary": "Set Group",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/put-scim-v2-groups-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchScimV2GroupsId",
        "tags": [
          "Other"
        ],
        "summary": "Update Group",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/patch-scim-v2-groups-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "No body is needed, or the fields are listed on the reference page."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteScimV2GroupsId",
        "tags": [
          "Other"
        ],
        "summary": "Delete Group",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/delete-scim-v2-groups-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/ServiceProviderConfig": {
      "get": {
        "operationId": "getScimV2Serviceproviderconfig",
        "tags": [
          "Other"
        ],
        "summary": "Get ServiceProviderConfig",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-serviceproviderconfig"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/ResourceTypes": {
      "get": {
        "operationId": "getScimV2Resourcetypes",
        "tags": [
          "Other"
        ],
        "summary": "List ResourceTypes",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-resourcetypes"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/ResourceTypes/{id}": {
      "get": {
        "operationId": "getScimV2ResourcetypesId",
        "tags": [
          "Other"
        ],
        "summary": "Retrieve ResourceType",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-resourcetypes-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Schemas": {
      "get": {
        "operationId": "getScimV2Schemas",
        "tags": [
          "Other"
        ],
        "summary": "List Schemas",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-schemas"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/scim/v2/Schemas/{id}": {
      "get": {
        "operationId": "getScimV2SchemasId",
        "tags": [
          "Other"
        ],
        "summary": "Retrieve Schema",
        "description": "Authentication: Public. Not classified by the reference generator: read the description, and treat it as needing a credential until it says otherwise.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-scim-v2-schemas-id"
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Object id",
            "example": "act_7Qm2c1f0"
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM 2.0 resource or ListResponse, as RFC 7644 defines (https://www.rfc-editor.org/rfc/rfc7644).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "Resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/platform/workspace": {
      "get": {
        "operationId": "getV1PlatformWorkspace",
        "tags": [
          "Other"
        ],
        "summary": "Get workspace",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-platform-workspace"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/platform/purposes": {
      "get": {
        "operationId": "getV1PlatformPurposes",
        "tags": [
          "Other"
        ],
        "summary": "List purposes",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-platform-purposes"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/v1/platform/agents": {
      "get": {
        "operationId": "getV1PlatformAgents",
        "tags": [
          "Other"
        ],
        "summary": "List agents",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-v1-platform-agents"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1PlatformAgents",
        "tags": [
          "Other"
        ],
        "summary": "Create agent",
        "description": "Authentication: Workspace key.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/post-v1-platform-agents"
        },
        "security": [
          {
            "gatewayKey": []
          },
          {
            "gatewayKeyHeader": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "purpose"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "A name the customer will recognise, such as Invoice agent. The same name returns the same agent (reused: true)."
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "pays_invoices",
                      "books_travel",
                      "handles_refunds",
                      "buys_software",
                      "answers_customers",
                      "other"
                    ],
                    "description": "What the agent is for; GET /v1/platform/purposes gives each one's rule in words."
                  },
                  "vendor": {
                    "type": "string",
                    "enum": [
                      "anthropic",
                      "openai",
                      "google",
                      "meta",
                      "custom"
                    ],
                    "default": "custom"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "operationId": "getWellKnownMcpServerCardJson",
        "tags": [
          "Other"
        ],
        "summary": "MCP server card (well-known)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-mcp-server-card-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "operationId": "getWellKnownMcpJson",
        "tags": [
          "Other"
        ],
        "summary": "MCP server card (older path)",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-mcp-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/ai-catalog.json": {
      "get": {
        "operationId": "getWellKnownAiCatalogJson",
        "tags": [
          "Other"
        ],
        "summary": "AI catalog",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-ai-catalog-json"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp-registry-auth": {
      "get": {
        "operationId": "getWellKnownMcpRegistryAuth",
        "tags": [
          "Other"
        ],
        "summary": "MCP Registry domain proof",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-mcp-registry-auth"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    },
    "/.well-known/openai-apps-challenge": {
      "get": {
        "operationId": "getWellKnownOpenaiAppsChallenge",
        "tags": [
          "Other"
        ],
        "summary": "OpenAI app review domain token",
        "description": "Authentication: Public.",
        "externalDocs": {
          "url": "https://immiscible.fly.dev/docs/api/get-well-known-openai-apps-challenge"
        },
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: a JSON object, described on the reference page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "4XX": {
            "description": "A client error: the request, the key or the state of the object. The body says which, how to fix it and where the docs are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          },
          "default": {
            "description": "An error, in the shared error shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              },
              "traceparent": {
                "$ref": "#/components/headers/Traceparent"
              },
              "immiscible-version": {
                "$ref": "#/components/headers/ImmiscibleVersion"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RequestId": {
        "description": "This request's id in our logs; quote it when asking for help.",
        "schema": {
          "type": "string"
        }
      },
      "Traceparent": {
        "description": "The W3C trace this request ran in; join your own spans to it.",
        "schema": {
          "type": "string"
        }
      },
      "ImmiscibleVersion": {
        "description": "The API version that answered, as a date. See Versioning in the description.",
        "schema": {
          "type": "string",
          "example": "2026-10-01"
        }
      }
    },
    "securitySchemes": {
      "agentKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An agent key (ask_...) from the console."
      },
      "agentKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "The same agent key, for tools that can only set a named header."
      },
      "gatewayKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Any key in the workspace: a gateway key from Keys, or an agent key."
      },
      "gatewayKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "The same key as a named header (what the Anthropic SDKs send)."
      },
      "serviceToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A service token (ims_...) from Settings, Service tokens, with the scope the operation names. Every token expires."
      },
      "adminKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An admin-scoped workspace key."
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-sid",
        "description": "A signed-in person's session cookie (sid on a local http server). Every write also sends x-immiscible-csrf: 1."
      },
      "cliToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A token (`imc_...`) the developer CLI gets by signing in through the browser (`immiscible login`, the OAuth device grant), sent as `Authorization: Bearer`. It acts for one person in one workspace: it reads agents and status, and registers an agent with a rule from the same purposes as the console's \"Add an agent\". It never approves anything or changes an existing rule. Every use re-checks the person's membership and the workspace's sign-in rules; it lasts 90 days and ends from the console's sessions."
      },
      "deviceToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A bearer token issued to one phone after its owner signs in through the browser, sent as `Authorization: Bearer`. The rules are the console's rules; approving above a line needs a fresh step-up proof from the device. Writes carry `x-immiscible-csrf: 1`."
      }
    },
    "parameters": {
      "ActionId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 64
        },
        "description": "The id requestDecision returned."
      },
      "AgentId": {
        "name": "aid",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 64
        },
        "description": "An agent id (agt_...)."
      },
      "TaskClass": {
        "name": "x-immiscible-task-class",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "The class of work, such as support.triage (GET /v1/task-classes lists them)."
      },
      "TaskId": {
        "name": "x-immiscible-task-id",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 128
        },
        "description": "Groups calls into one unit of work."
      },
      "Objective": {
        "name": "x-immiscible-objective",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "balanced",
            "cost",
            "quality",
            "latency",
            "sovereign"
          ]
        }
      },
      "WorkspaceId": {
        "name": "wid",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 64
        },
        "description": "Your workspace id (GET /api/me lists them)."
      },
      "Csrf": {
        "name": "x-immiscible-csrf",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "1"
          ]
        },
        "description": "Every console write sends it."
      },
      "ClientSession": {
        "name": "x-immiscible-client-session",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 128
        },
        "description": "Your session id, the same one your agent sends as session.id on action requests."
      }
    },
    "schemas": {
      "ActionRequest": {
        "type": "object",
        "description": "One consequential action the agent is about to take.",
        "properties": {
          "type": {
            "type": "string",
            "maxLength": 80,
            "description": "payment, data.release, email.send, calendar.write, account.change, tool.<name> or another dotted action type."
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "One sentence a person can read: what the agent is about to do and why."
          },
          "payment": {
            "type": "object",
            "description": "For type payment.",
            "properties": {
              "amount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000000,
                "description": "Whole minor units: 6420 means 64.20."
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$",
                "description": "ISO 4217 code, for example GBP."
              },
              "merchant": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "domain": {
                    "type": "string",
                    "maxLength": 253,
                    "description": "The merchant website, for example ocado.com."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40
                  }
                },
                "required": [
                  "domain"
                ]
              }
            },
            "required": [
              "amount",
              "currency",
              "merchant"
            ]
          },
          "data": {
            "type": "object",
            "description": "For type data.release: vault fields to release to one recipient.",
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "maxItems": 30
              },
              "recipient": {
                "type": "string",
                "maxLength": 253
              },
              "purpose": {
                "type": "string",
                "maxLength": 60
              }
            },
            "required": [
              "fields",
              "recipient"
            ]
          },
          "target": {
            "type": "object",
            "description": "For other actions: where the action lands.",
            "properties": {
              "domain": {
                "type": "string",
                "maxLength": 253
              },
              "recipient": {
                "type": "string",
                "maxLength": 253
              }
            }
          },
          "provenance": {
            "type": "array",
            "description": "What influenced this request: \"user\" for the person's own instruction, \"agent\" for your own reasoning, and \"web\", \"email\", \"document\" or \"tool\" for anything third parties wrote. Missing provenance is treated as untrusted.",
            "maxItems": 20,
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "user",
                    "agent",
                    "web",
                    "email",
                    "document",
                    "tool"
                  ]
                },
                "detail": {
                  "type": "string",
                  "maxLength": 500
                },
                "url": {
                  "type": "string",
                  "maxLength": 500
                }
              },
              "required": [
                "source"
              ]
            }
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Send the same key when retrying the same request; you get the first answer back."
          }
        },
        "required": [
          "type",
          "summary"
        ]
      },
      "Decision": {
        "type": "object",
        "description": "The decision. Proceed only on allow.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The action id: check it, be called back about it and settle it with this."
          },
          "decision": {
            "type": "string",
            "enum": [
              "allow",
              "deny",
              "approval_required"
            ]
          },
          "status": {
            "type": "string",
            "description": "allowed, denied, pending_approval, expired, revoked, completed, failed or cancelled."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Plain-English reasons a person can read."
          },
          "mandateId": {
            "type": [
              "string",
              "null"
            ]
          },
          "risk": {
            "type": "object",
            "properties": {
              "score": {
                "type": "integer",
                "description": "For display only: the decision is the strictest signal, never the score."
              },
              "signals": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Signal"
                }
              }
            }
          },
          "receipt": {
            "type": "string",
            "description": "On allow: a signed, single-use receipt (compact JWS). Pass it to whoever receives the action."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "human": {
            "type": "boolean",
            "description": "True when a person approved it."
          },
          "approval": {
            "type": "object",
            "description": "On approval_required: where the person decides, and by when.",
            "properties": {
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "settlement": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "amount": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "at": {
                "type": "string"
              },
              "incident": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "id",
          "decision",
          "status",
          "reasons"
        ]
      },
      "CallbackRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "description": "An https URL that accepts a POST."
          }
        },
        "required": [
          "url"
        ]
      },
      "Callback": {
        "type": "object",
        "properties": {
          "actionId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "delivered",
              "failed"
            ]
          },
          "decision": {
            "type": "string"
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Outcome": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000,
            "description": "Final amount in whole minor units."
          },
          "records": {
            "type": "integer",
            "minimum": 0,
            "description": "How many records the action moved, for data actions."
          }
        },
        "required": [
          "status"
        ]
      },
      "VerifyRequest": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "string",
            "description": "The compact JWS the agent passed you."
          },
          "expect": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              },
              "merchant": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "receipt"
        ]
      },
      "Verification": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "description": "Why it is not valid; absent on a valid receipt."
          },
          "claims": {
            "type": "object"
          },
          "revoked": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean"
          },
          "expired": {
            "type": "boolean"
          },
          "mismatch": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "A stable code, such as invalid_request or agent_key_required."
              },
              "message": {
                "type": "string",
                "description": "What went wrong, for a person. Validation failures join every problem with \"; \"."
              },
              "errors": {
                "type": "array",
                "description": "On invalid_request, invalid_mandate, invalid_budget and the other validation types: each problem on its own, with the field it is about (null when it is about the whole body).",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field",
                    "message"
                  ]
                }
              }
            },
            "required": [
              "type"
            ]
          }
        }
      },
      "Signal": {
        "type": "object",
        "description": "One reason the decision is what it is. Every signal, from the mandates or from the agent's standing, has this shape.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A stable code such as approve_above, lookalike_domain or tier_intern."
          },
          "severity": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "effect": {
            "type": "string",
            "enum": [
              "deny",
              "approval",
              "info"
            ],
            "description": "What the signal does to the decision."
          },
          "detail": {
            "type": "string",
            "description": "A sentence a person can read."
          }
        },
        "required": [
          "id",
          "severity",
          "effect",
          "detail"
        ]
      },
      "GatewayMeta": {
        "type": "object",
        "description": "What Immiscible added to the provider's own response: the task, the cost, where it went and why.",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "callId": {
            "type": "string"
          },
          "costMicros": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Cost in millionths of a US dollar, from the provider's reported usage."
          },
          "routedTo": {
            "type": "string",
            "description": "The model that served the call."
          },
          "requestedModel": {
            "type": [
              "string",
              "null"
            ]
          },
          "client": {
            "type": [
              "string",
              "null"
            ],
            "description": "The recognised client, from its User-Agent."
          },
          "taskClass": {
            "type": [
              "string",
              "null"
            ]
          },
          "taskClassSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which rule set the class: header, key-binding, client-default:<client> or unclassified."
          },
          "taskSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "savingsVsRequestedMicros": {
            "type": [
              "integer",
              "null"
            ]
          },
          "savingsVsCeilingMicros": {
            "type": [
              "integer",
              "null"
            ]
          },
          "enforcement": {
            "type": "string",
            "description": "shadow, or the budget ladder's step: observe, nudge or downgrade."
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ]
          },
          "shadow": {
            "type": [
              "object",
              "null"
            ],
            "description": "Shadow mode only: what Immiscible would have done.",
            "properties": {
              "wouldRoute": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "wouldBlockReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "wouldBudgetAction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "wouldBudgetMessage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "counterfactualCost": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Millionths of a US dollar."
              }
            }
          },
          "failover": {
            "type": [
              "object",
              "null"
            ]
          },
          "mocked": {
            "type": "boolean",
            "description": "True when the labelled mock answered (no provider key configured)."
          },
          "elapsedMs": {
            "type": "integer"
          }
        },
        "required": [
          "taskId",
          "callId",
          "routedTo",
          "enforcement"
        ]
      },
      "ChatCompletionRequest": {
        "type": "object",
        "description": "An OpenAI chat completions request, passed through. An optional `immiscible` object ({ taskClass, taskId, objective, dryRun, meta }) is read and removed before the provider sees the body.",
        "properties": {
          "model": {
            "type": "string",
            "description": "A catalogue id such as openai/gpt-5.5, or the provider's own name (gpt-5.5)."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stream": {
            "type": "boolean"
          },
          "immiscible": {
            "type": "object",
            "properties": {
              "taskClass": {
                "type": "string"
              },
              "taskId": {
                "type": "string"
              },
              "objective": {
                "type": "string"
              },
              "dryRun": {
                "type": "boolean"
              },
              "meta": {
                "type": "object"
              }
            }
          }
        },
        "required": [
          "messages"
        ]
      },
      "ChatCompletion": {
        "type": "object",
        "description": "The provider's chat completion (or, with stream, server-sent events), plus `immiscible`.",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "usage": {
            "type": "object"
          },
          "immiscible": {
            "$ref": "#/components/schemas/GatewayMeta"
          }
        },
        "required": [
          "choices",
          "immiscible"
        ]
      },
      "MessagesRequest": {
        "type": "object",
        "description": "An Anthropic Messages request, passed through.",
        "properties": {
          "model": {
            "type": "string"
          },
          "max_tokens": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "system": {},
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stream": {
            "type": "boolean"
          }
        },
        "required": [
          "messages"
        ]
      },
      "Message": {
        "type": "object",
        "description": "The provider's message (or, with stream, server-sent events), plus `immiscible`.",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "type": "object"
          },
          "immiscible": {
            "$ref": "#/components/schemas/GatewayMeta"
          }
        },
        "required": [
          "content"
        ]
      },
      "OutcomeReport": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "maxLength": 128,
            "description": "The x-immiscible-task-id of the work, from a response."
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "partial",
              "abandoned"
            ]
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the work was worth, if you know."
          },
          "evidence": {
            "description": "A link or note that backs the outcome."
          },
          "acceptedCallIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reportedBy": {
            "type": "string"
          }
        },
        "required": [
          "taskId",
          "status"
        ]
      },
      "OutcomeRecorded": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "yield": {
            "type": "object",
            "description": "The task's yield: accepted work against tokens and cost."
          }
        },
        "required": [
          "taskId",
          "status",
          "yield"
        ]
      },
      "RoutePreviewRequest": {
        "type": "object",
        "properties": {
          "taskClass": {
            "type": "string",
            "description": "A task class id from GET /v1/task-classes."
          },
          "estimate": {
            "type": "object",
            "description": "{ inputTokens, outputTokens }; the class's typical size if left out."
          },
          "objective": {
            "type": "string",
            "enum": [
              "balanced",
              "cost",
              "quality",
              "latency",
              "sovereign"
            ]
          },
          "policy": {
            "type": "object",
            "description": "Overrides on the policy profile, for this preview only."
          },
          "requestedModel": {
            "type": "string"
          }
        },
        "required": [
          "taskClass"
        ]
      },
      "RoutePreview": {
        "type": "object",
        "description": "ok true: the choice and why. ok false (409): no model qualifies, with the binding constraint and what relaxing it would admit.",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "taskClass": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "chosen": {
            "type": "object",
            "properties": {
              "modelId": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "projectedCost": {
                "type": "integer"
              },
              "score": {
                "type": "number"
              },
              "headroom": {
                "type": "number"
              },
              "axes": {
                "type": "object"
              }
            }
          },
          "alternatives": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "excluded": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "axis": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              }
            }
          },
          "explanation": {
            "type": "string"
          },
          "catalogVersion": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "description": "ok false: no_eligible_model."
          },
          "message": {
            "type": "string"
          },
          "relaxations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "taskClass"
        ]
      },
      "Agent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "principalId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "frozen"
            ]
          },
          "tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastActionAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "frozenAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "frozenBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "frozenReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "freezeHold": {
            "type": [
              "string",
              "null"
            ]
          },
          "sponsor": {
            "type": [
              "string",
              "null"
            ]
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "killOwner": {
            "type": [
              "string",
              "null"
            ]
          },
          "assignmentEndsAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "orphanedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "orphanedReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "standing": {
            "$ref": "#/components/schemas/Standing"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ]
      },
      "Standing": {
        "type": "object",
        "description": "Where the agent stands: its tier, its record, and what it needs for the next one.",
        "properties": {
          "agentId": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "tierLabel": {
            "type": "string"
          },
          "tierSays": {
            "type": "string"
          },
          "tierSince": {
            "type": [
              "string",
              "null"
            ]
          },
          "sponsor": {
            "type": [
              "string",
              "null"
            ]
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "killOwner": {
            "type": [
              "string",
              "null"
            ]
          },
          "assignmentEndsAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "assignmentEnded": {
            "type": "boolean"
          },
          "stats": {
            "type": "object",
            "properties": {
              "clean": {
                "type": "integer"
              },
              "incidents": {
                "type": "integer"
              },
              "denied": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "consequential": {
                "type": "integer"
              }
            }
          },
          "signoffs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "readiness": {
            "type": "object",
            "properties": {
              "tier": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ready": {
                "type": "boolean"
              },
              "missing": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "says": {
                "type": "string"
              }
            }
          }
        }
      },
      "AgentPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Agent"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as ?cursor= for the next page; null on the last."
          },
          "limit": {
            "type": "integer"
          }
        },
        "required": [
          "data",
          "next",
          "limit"
        ]
      },
      "AgentBlueprint": {
        "type": "object",
        "description": "Everything an agent needs on day one. Mandates come from templates only; a person writes custom ones in the console. The agent starts at the workspace's starting tier.",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "vendor": {
            "type": "string",
            "enum": [
              "meta",
              "openai",
              "anthropic",
              "google",
              "custom"
            ]
          },
          "principalEmail": {
            "type": "string",
            "description": "The member the agent acts for."
          },
          "purpose": {
            "type": "string"
          },
          "assignmentEndsAt": {
            "type": "string",
            "format": "date-time"
          },
          "mandates": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "properties": {
                "template": {
                  "type": "string",
                  "enum": [
                    "groceries",
                    "bills",
                    "travel",
                    "data_sharing",
                    "work_email",
                    "crypto_payments",
                    "coding_tools"
                  ]
                }
              },
              "required": [
                "template"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "name",
          "principalEmail"
        ]
      },
      "AgentCreated": {
        "type": "object",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/Agent"
          },
          "standing": {
            "$ref": "#/components/schemas/Standing"
          },
          "mandates": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "agent",
          "standing",
          "mandates"
        ]
      },
      "FreezeOne": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "description": "Recorded with the freeze."
          },
          "hold": {
            "type": "string",
            "enum": [
              "security",
              "incident"
            ],
            "default": "security"
          }
        },
        "required": [
          "reason"
        ]
      },
      "Selector": {
        "type": "object",
        "description": "Which agents: { all: true }, { agentIds: [...] }, or any of principalId, vendor, tier and upstreamId.",
        "properties": {
          "all": {
            "type": "boolean",
            "const": true
          },
          "agentIds": {
            "type": "array",
            "maxItems": 10000,
            "items": {
              "type": "string"
            }
          },
          "principalId": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "upstreamId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FleetFreeze": {
        "type": "object",
        "properties": {
          "selector": {
            "$ref": "#/components/schemas/Selector"
          },
          "reason": {
            "type": "string",
            "description": "Required unless dryRun."
          },
          "hold": {
            "type": "string",
            "enum": [
              "security",
              "incident"
            ]
          },
          "dryRun": {
            "type": "boolean",
            "description": "Count and digest the selection; freeze nothing."
          },
          "confirmCount": {
            "type": "integer",
            "description": "The count you expect. Required for { all: true } and above the workspace's bulkFreezeConfirmAbove."
          }
        },
        "required": [
          "selector"
        ]
      },
      "FleetFreezeResult": {
        "type": "object",
        "description": "A dry run: { dryRun, count, agentsDigest }. Done: { batchId, frozen, count, agentsDigest, agentIds, receiptsRevoked, approvalsCancelled, connectorsRevoked }. Past the freeze ceiling (202): the pending freeze a person confirms.",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "count": {
            "type": "integer"
          },
          "agentsDigest": {
            "type": "string"
          },
          "batchId": {
            "type": "string"
          },
          "frozen": {
            "type": "integer"
          },
          "agentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "receiptsRevoked": {
            "type": "integer"
          },
          "approvalsCancelled": {
            "type": "integer"
          },
          "connectorsRevoked": {
            "type": "integer"
          },
          "pendingId": {
            "type": "string"
          }
        }
      },
      "DrillReport": {
        "type": "object",
        "description": "A kill-switch drill: the selection frozen, every path checked, and restored. Signed (signed is a compact JWS of the report).",
        "properties": {
          "typ": {
            "type": "string",
            "const": "immiscible.drill.v1"
          },
          "drillId": {
            "type": "string"
          },
          "agents": {
            "type": "integer"
          },
          "passed": {
            "type": "boolean"
          },
          "frozenMs": {
            "type": "integer"
          },
          "containedMs": {
            "type": "integer"
          },
          "restoredMs": {
            "type": "integer"
          },
          "restored": {
            "type": "integer"
          },
          "failures": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "signed": {
            "type": "string"
          }
        },
        "required": [
          "typ",
          "drillId",
          "passed",
          "signed"
        ]
      },
      "ApprovalList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Scorecard": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "max": {
            "type": "integer"
          },
          "band": {
            "type": "string"
          },
          "controls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "group": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "score": {
                  "type": "integer"
                },
                "evidence": {
                  "type": "string"
                },
                "next": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "total",
          "max",
          "band",
          "controls"
        ]
      },
      "EvidenceBundle": {
        "type": "object",
        "description": "The ledger with its checkpoints and public keys, checkable offline with scripts/verify-evidence.mjs. ?format=ndjson gives one record per line.",
        "properties": {
          "format": {
            "type": "string",
            "const": "immiscible.evidence-bundle.v1"
          },
          "workspace": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "checkpoints": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "keys": {
            "type": "object"
          }
        },
        "required": [
          "format",
          "records"
        ]
      },
      "KeyRequest": {
        "type": "object",
        "properties": {
          "principalId": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "taskClassId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "policyProfile": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "inference",
              "admin"
            ]
          }
        },
        "required": [
          "principalId"
        ]
      },
      "KeyIssued": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Shown once."
          },
          "binding": {
            "type": "object"
          }
        },
        "required": [
          "key",
          "binding"
        ]
      },
      "Budget": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "principal",
              "team",
              "org"
            ]
          },
          "scopeId": {
            "type": "string"
          },
          "periodStart": {
            "type": "string"
          },
          "periodEnd": {
            "type": "string"
          },
          "baseAllocation": {
            "type": "integer",
            "description": "Millionths of a US dollar."
          },
          "hardCeiling": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ownerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "ladder": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "spent": {
            "type": "integer"
          },
          "committed": {
            "type": "integer"
          }
        }
      },
      "BudgetRequest": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "principal",
              "team",
              "org"
            ]
          },
          "scopeId": {
            "type": "string",
            "description": "A team or principal id; for org, the workspace id or left out."
          },
          "baseAllocation": {
            "type": "integer",
            "minimum": 1,
            "description": "Millionths of a US dollar."
          },
          "hardCeiling": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Millionths of a US dollar; at least baseAllocation."
          },
          "ownerId": {
            "type": "string",
            "description": "The person who approves more."
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "ladder": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "object",
              "properties": {
                "atUtilisation": {
                  "type": "number",
                  "minimum": 0
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "observe",
                    "nudge",
                    "downgrade",
                    "require_approval",
                    "block"
                  ]
                }
              },
              "required": [
                "atUtilisation",
                "action"
              ]
            }
          }
        },
        "required": [
          "scope",
          "baseAllocation"
        ]
      },
      "AvailabilityChange": {
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "disabled"
            ]
          },
          "reason": {
            "type": "string"
          },
          "documentedFallback": {
            "type": "string"
          }
        },
        "required": [
          "modelId"
        ]
      }
    }
  }
}