> ## Documentation Index
> Fetch the complete documentation index at: https://vaquill.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a draft

> Queue a generation. 202 with an operation to poll.

A retry carrying the same `Idempotency-Key` returns the original operation
and starts nothing. That is what makes a client timeout free rather than a
second billed generation, and it matters more here than anywhere else on
this surface: `run_draft_generation_task` has `max_retries=0` precisely
because the pipeline is not idempotent.



## OpenAPI

````yaml https://api.vaquill.ai/workspace/openapi/v1.json post /v1/matters/{matterId}/drafts
openapi: 3.1.0
info:
  title: Vaquill Legal Workspace API
  description: >-
    Organization-scoped API for driving your legal workspace from your own
    backend: matters, documents, drafting, review, compare and matrices.


    **Authentication**: `Authorization: Bearer vq_ws_...`. Credentials are
    issued by an organization owner from the automation console at `/automation`
    and are shown once. The organization is resolved from the credential and can
    never be named in a request, so there is no `organizationId` field anywhere
    in this API and sending one is refused.


    This is NOT the Vaquill Data API. That one holds a `vq_key_` credential and
    serves the public legal corpus; the two share no credential, host or
    endpoint, and sending a `vq_key_` here is refused with an error naming the
    other product.


    ## Long-running work


    Anything that costs real work answers `202` with an **operation**. Poll `GET
    /v1/operations/{operationId}` until `status` is `succeeded`, `failed` or
    `cancelled`, honouring `Retry-After` between polls. There are no webhooks,
    so polling is the only completion signal. The five statuses are `queued`,
    `running`, `succeeded`, `failed`, `cancelled`, and there is no sixth: every
    capability reports through the same envelope.


    Send an `Idempotency-Key` on any launch. A retry with the same key and the
    same body returns the FIRST operation rather than starting a second billable
    job, which is what makes recovering from a timeout free.


    ## Identifiers


    Every public id is `<prefix>_<32 lowercase hex>`, for example
    `mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6`. The prefix names the resource type.
    Ids are opaque: take them from responses rather than building them, and
    never pass a bare database uuid.


    ## Lists


    Every collection answers `{data, pagination}`, never a bare array. Page with
    `limit` and `offset`, and read `pagination.total` to size a job before
    running it. `pagination.hasMore` is the reliable signal that rows remain.


    ## Errors


    Errors are RFC 9457 problem documents (`application/problem+json`),
    including for a wrong path and a wrong method. Branch on `type`; it is the
    stable identifier and it resolves to a page describing the failure. `title`
    and `detail` are written for people and may be reworded at any time. Every
    response carries `X-Request-ID`, and every error repeats it as `requestId`:
    quote it when contacting support.


    A `404` is returned identically for a resource that does not exist, one
    belonging to another organization, and one outside your installation's
    matter allowlist. That is deliberate, so the status code cannot be used to
    discover which ids exist elsewhere.


    ## Rate limits


    Limits are per credential and are set by what an operation COSTS rather than
    by its HTTP method, so a `GET` that runs a retrieval is not a read. Each
    operation's tier is fixed; a `429` carries `Retry-After`.


    | Tier | Per minute | Per hour | Per day |

    |---|---|---|---|

    | `poll` | 120 | 3000 | 30000 |

    | `read` | 60 | 1200 | 15000 |

    | `write` | 30 | 600 | 5000 |

    | `launch` | 10 | 200 | 2000 |

    | `download` | 20 | 300 | 3000 |

    | `upload` | 5 | 100 | 500 |


    ## Scopes


    A credential carries an explicit scope set, chosen when it is issued. A call
    outside them is `403` with `insufficient-scope`, naming the scopes the
    operation needed. Read and run are separate throughout, so a credential can
    be allowed to read results without being allowed to spend money producing
    them.


    `chronology:read`, `chronology:write`, `clients:read`, `clients:write`,
    `compare:read`, `compare:run`, `compliance:read`, `compliance:run`,
    `credentials:rotate`, `documents:download`, `documents:read`,
    `documents:write`, `drafting:read`, `drafting:run`, `exports:create`,
    `exports:read`, `facts:read`, `facts:run`, `matrices:read`, `matrices:run`,
    `matrices:write`, `matters:read`, `matters:write`, `nda:read`, `nda:run`,
    `operations:read`, `playbooks:read`, `playbooks:run`, `playbooks:write`,
    `research:read`, `research:run`, `review:read`, `review:run`,
    `summaries:read`, `summaries:run`, `webhooks:read`, `webhooks:write`,
    `workflows:read`, `workflows:run`, `workflows:write`
  version: 1.0.0
servers:
  - url: https://api.vaquill.ai/workspace
    description: Vaquill Legal Workspace API (production)
  - url: /workspace
    description: Vaquill Legal Workspace API (relative to the mount)
security:
  - WorkspaceAuth: []
tags:
  - name: Operations
    description: >-
      The one job envelope. Every long-running call answers `202` with an
      operation, and polling this resource is the only way to learn it finished:
      there are no webhooks. Five statuses, no synonyms.
  - name: Clients
    description: The people and companies matters are filed under. Synchronous CRUD.
  - name: Matters
    description: >-
      The unit of work everything else hangs off. A matter scopes documents,
      drafts, reviews, comparisons and matrices, and it is what a credential's
      access is checked against.
  - name: Folders
    description: >-
      Organization inside and across matters. The same folders the web app
      shows, so one created here appears in the customer's browser.
  - name: Documents
    description: >-
      Files in a matter: their metadata, their ingested text, and the original
      bytes. A document is only usable by retrieval, drafting and review once
      its status is `succeeded`.
  - name: Uploads
    description: >-
      Getting files in. One presigned multipart flow at every size, with the
      bytes going straight to storage and never through this API. Initiate, PUT
      each part, then complete.
  - name: Research
    description: >-
      Asking legal questions and getting grounded, cited answers. This API does
      NOT stream: an ask answers `202` and you poll the operation, then read the
      answer off the message it points at. Conversation state is kept here, so
      you hold a chat id rather than replaying a transcript. Also covers the
      matter settings behind an answer, the skills you can ask through, and the
      standalone web-research tools.
  - name: Drafting
    description: >-
      Generating, revising and exporting draft documents. Bodies come out as
      sections and go in as markdown; the editor's own format is never on the
      wire. Rendered files come from the export route.
  - name: Playbooks
    description: >-
      The organization's negotiating positions, per contract type, and the
      starter templates to build them from. A playbook is the input a contract
      review is measured against.
  - name: Reviews
    description: >-
      Reviewing one contract against a playbook: clause analysis, redlines,
      flags, liability exposure and a reported sign-off gate. Export applies the
      redlines as native Word tracked changes.
  - name: Facts
    description: >-
      The cross-document fact ledger for a matter: what every document in it
      asserts, coalesced and cited back to its source passages.
  - name: Matter summary
    description: >-
      A citation-backed summary of everything filed to a matter, generated on
      demand and readable claim by claim.
  - name: Chronology
    description: >-
      The dated events across a matter's documents, as one timeline, with
      duplicate and date-conflict flags.
  - name: NDA triage
    description: >-
      Screening one inbound NDA against ten standard criteria and, where you
      name one, your own NDA playbook. Answers `green`, `yellow` or `red` with
      the reasoning per criterion, plus a report you can forward.
  - name: Compliance
    description: >-
      Checking one document against one regulation's requirement checklist: a
      verdict per requirement with the article it comes from, the gaps, and what
      to do about them. Only regulations with a real checklist behind them are
      accepted.
  - name: Comparisons
    description: >-
      Diffing two documents in a matter into structural changes, with a
      substantive-versus-cosmetic judgment and a downloadable redline.
  - name: Matrices
    description: >-
      Spreadsheet-style extraction across many documents: rows are documents,
      columns are questions, cells are answers with verified citations. Building
      a grid is free; running it is what costs.
  - name: Workflows
    description: >-
      Multi-step analyses from a fixed catalogue. Read a definition to learn
      what documents and inputs it takes, launch a run inside a matter, then
      download the artifacts it produces.
externalDocs:
  description: Getting started guide and error reference
  url: https://vaquill.ai/docs/workspace-api
paths:
  /v1/matters/{matterId}/drafts:
    post:
      tags:
        - Drafting
      summary: Generate a draft
      description: >-
        Queue a generation. 202 with an operation to poll.


        A retry carrying the same `Idempotency-Key` returns the original
        operation

        and starts nothing. That is what makes a client timeout free rather than
        a

        second billed generation, and it matters more here than anywhere else on

        this surface: `run_draft_generation_task` has `max_retries=0` precisely

        because the pipeline is not idempotent.
      operationId: drafts.generate
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
            title: Matterid
          description: >-
            `mat_` identifier of the matter to work inside. Everything in this
            API hangs off a matter, and the matter in the path is what the
            authorization boundary is checked against. Take it from `GET
            /v1/matters`.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
          description: >-
            A unique value of your choosing, so a retried launch returns the
            FIRST operation instead of starting a second billable job. Reusing
            one with a different body is refused. Retrying with the same key and
            the same body is free and is the intended way to recover from a
            timeout.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DraftCreateRequest'
            example:
              category: commercial
              title: Master Services Agreement
              governingLawState: ca
              tone: protective
              specialInstructions: Two-year term, mutual, governed by California law.
              variables:
                party_a_name: value
              practiceArea: commercial
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
              example:
                id: op_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
                type: matrix.run
                status: succeeded
                createdAt: '2026-08-19T14:32:10Z'
                completedAt: '2026-08-19T14:32:10Z'
                matterId: mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
                resource:
                  kind: matrix
                  id: mtx_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
                  url: >-
                    https://storage.vaquill.ai/exports/msa-acme-v3-redline.docx?signature=...
                progress:
                  done: 24
                  total: 128
                  unit: cells
                requestId: req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        '401':
          description: >-
            The credential is missing, malformed, unknown, revoked or expired.
            `type` is `invalid-credential`, or `wrong-product-credential` when a
            `vq_key_` Data API key was sent to this API.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
            WWW-Authenticate:
              description: RFC 9110 authentication challenge.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: >-
            The credential does not carry a scope this operation requires
            (`insufficient-scope`), or the organization's installation is
            suspended (`installation-inactive`).
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
            WWW-Authenticate:
              description: RFC 9110 authentication challenge.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: >-
            The resource does not exist, is not this organization's, or is
            outside this installation's matter allowlist. The three are
            deliberately indistinguishable, so the status code cannot be used to
            discover which ids exist in another organization. Each resource has
            its own `type`.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: >-
            The request does not match the published schema. `errors` names each
            rejected field and why. The submitted value is never echoed back.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
        '429':
          description: Too many requests for this credential's tier. Honour `Retry-After`.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: >-
            An unexpected error on our side. The body carries a stable `type`
            and the request id and nothing else; the cause is in our logs.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: >-
            A dependency this request needs is unavailable, so nothing was done.
            Retryable. Authentication fails closed rather than admitting the
            request, so this is never a statement about your credential.
          headers:
            X-Request-ID:
              description: >-
                The id of this request. The same value appears as `requestId` in
                the body. Quote it when contacting support.
              schema:
                type: string
                examples:
                  - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    DraftCreateRequest:
      properties:
        category:
          type: string
          maxLength: 64
          minLength: 1
          title: Category
          description: >-
            What kind of document to generate, as a category slug. Validated
            against the live vocabulary when the generation starts.
          examples:
            - commercial
        title:
          type: string
          maxLength: 200
          minLength: 1
          title: Title
          description: Title for the generated draft.
          examples:
            - Master Services Agreement
        governingLawState:
          type: string
          maxLength: 80
          minLength: 1
          title: Governinglawstate
          description: >-
            Governing law to pin. Accepts a code (`ca`), a name (`California`)
            or the sentinel `federal`. Required: a US draft with no pinned
            governing law cites nothing.
          examples:
            - ca
        tone:
          type: string
          enum:
            - protective
            - balanced
            - permissive
          title: Tone
          description: >-
            How protective the generated language should be: `protective`,
            `balanced` or `permissive`.
          default: balanced
          examples:
            - protective
        specialInstructions:
          anyOf:
            - type: string
              maxLength: 40000
            - type: 'null'
          title: Specialinstructions
          description: Anything specific this draft needs, in your own words.
          examples:
            - Two-year term, mutual, governed by California law.
        variables:
          additionalProperties:
            type: string
          type: object
          title: Variables
          description: >-
            Template variable values, for example `{"party_a_name": "Acme
            Corp"}`. Which keys mean anything is a property of the category, so
            this is deliberately free-form. Unfilled placeholders are counted on
            export.
        practiceArea:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Practicearea
          description: >-
            Practice area for the draft. Inferred from the category when
            omitted.
          examples:
            - commercial
      additionalProperties: false
      type: object
      required:
        - category
        - title
        - governingLawState
      title: DraftCreateRequest
      description: >-
        Start a generation. There is no synchronous create.


        `jurisdiction` is deliberately absent and fixed at US: this is a US-only

        product (OPINIONS.md), and a field whose only accepted value is the
        default

        is a field a customer has to discover before they can ignore it.

        `governingLawState` is required for the same reason it is required

        internally: a US draft with no pinned governing law cites nothing.
    Operation:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Public identifier, `op_` followed by 32 hex characters. Poll `GET
            /v1/operations/{operationId}` with it.
          examples:
            - op_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        type:
          type: string
          title: Type
          description: >-
            What kind of work this is, for example `matrix.run` or
            `draft.generate`.
          examples:
            - matrix.run
        status:
          $ref: '#/components/schemas/OperationStatus'
          description: >-
            One of five values: `queued`, `running`, `succeeded`, `failed`,
            `cancelled`. There is no sixth and there are no synonyms. Stop
            polling once it is `succeeded`, `failed` or `cancelled`.
          examples:
            - succeeded
        createdAt:
          type: string
          format: date-time
          title: Createdat
          description: When the operation was accepted (RFC 3339).
          examples:
            - '2026-08-19T14:32:10Z'
        completedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completedat
          description: >-
            When the operation reached a terminal status (RFC 3339). Present if
            and only if the status is terminal.
          examples:
            - '2026-08-19T14:32:10Z'
        matterId:
          anyOf:
            - type: string
            - type: 'null'
          title: Matterid
          description: >-
            `mat_` identifier of the matter this work belongs to, when it
            belongs to one.
          examples:
            - mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        resource:
          anyOf:
            - $ref: '#/components/schemas/OperationResource'
            - type: 'null'
          description: >-
            What the operation produced. Absent until the underlying job row
            exists, which an idempotent replay can briefly observe, so treat
            absence as 'not yet' rather than 'never'.
        error:
          anyOf:
            - $ref: '#/components/schemas/OperationError'
            - type: 'null'
          description: >-
            Why the work failed. Present only when `status` is `failed`. Partial
            success is `succeeded` with `progress.done < progress.total`, never
            an error.
        progress:
          anyOf:
            - $ref: '#/components/schemas/OperationProgress'
            - type: 'null'
          description: >-
            How far along the work is, when the underlying job reports it.
            Absent does not mean no progress.
        requestId:
          anyOf:
            - type: string
            - type: 'null'
          title: Requestid
          description: >-
            The `X-Request-ID` of the request that created this operation. Quote
            it in a support ticket.
          examples:
            - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
      additionalProperties: false
      type: object
      required:
        - id
        - type
        - status
        - createdAt
      title: Operation
      description: |-
        One long-running operation, whatever kind of work it is.

        Readable for `OPERATION_RETENTION_DAYS` after creation, per AIP-151.
    Problem:
      type: object
      title: Problem
      description: >-
        An RFC 9457 problem document. Branch on `type`, which is stable; `title`
        and `detail` are written for people and may be reworded. Some problems
        carry extra members (`requiredScopes`, `limit`, `expectedVersion`),
        which is why this object is open.
      required:
        - type
        - title
        - status
        - detail
        - instance
      properties:
        type:
          type: string
          format: uri
          description: >-
            The stable identifier for this error, and the one field to branch
            on. Resolves to a page describing it.
          examples:
            - https://vaquill.ai/docs/workspace-api/errors/insufficient-scope
        title:
          type: string
          description: A short human-readable summary.
          examples:
            - Insufficient scope
        status:
          type: integer
          description: The HTTP status code, repeated.
          examples:
            - 403
        detail:
          type: string
          description: >-
            What went wrong on this specific request. May be reworded at any
            time.
          examples:
            - >-
              This credential carries matters:read. This operation needs
              matters:write.
        instance:
          type: string
          description: The path this problem occurred on.
          examples:
            - /workspace/v1/matters/mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        requestId:
          type: string
          description: >-
            The id of this request, identical to the `X-Request-ID` response
            header. Quote it when contacting support.
          examples:
            - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
      additionalProperties: true
    ValidationProblem:
      type: object
      title: ValidationProblem
      description: >-
        A problem document for a schema rejection. `errors` lists the fields
        that were refused. The value you submitted is deliberately not echoed,
        so a validation failure cannot copy your content into an error response
        or into either side's logs.
      required:
        - type
        - title
        - status
        - detail
        - instance
        - errors
      properties:
        type:
          type: string
          format: uri
          description: >-
            The stable identifier for this error, and the one field to branch
            on. Resolves to a page describing it.
          examples:
            - https://vaquill.ai/docs/workspace-api/errors/insufficient-scope
        title:
          type: string
          description: A short human-readable summary.
          examples:
            - Insufficient scope
        status:
          type: integer
          description: The HTTP status code, repeated.
          examples:
            - 403
        detail:
          type: string
          description: >-
            What went wrong on this specific request. May be reworded at any
            time.
          examples:
            - >-
              This credential carries matters:read. This operation needs
              matters:write.
        instance:
          type: string
          description: The path this problem occurred on.
          examples:
            - /workspace/v1/matters/mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        requestId:
          type: string
          description: >-
            The id of this request, identical to the `X-Request-ID` response
            header. Quote it when contacting support.
          examples:
            - req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        errors:
          type: array
          description: One entry per rejected field.
          items:
            type: object
            required:
              - location
              - message
              - type
            properties:
              location:
                type: string
                description: >-
                  Dotted path to the rejected field, for example
                  `body.contentMarkdown`.
              message:
                type: string
                description: Why it was rejected.
              type:
                type: string
                description: The validation rule that failed.
      additionalProperties: true
    OperationStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
        - cancelled
      title: OperationStatus
      description: >-
        The public five. There is no sixth, and there are no synonyms.


        Internal vocabularies spell terminal success `completed`, `ready`,

        `extracted`, `succeeded` and `fresh`; terminal failure `failed` and
        `error`;

        queued `pending`, `queued` and `draft`. All of that is collapsed here by

        `app.workspace_api.adapters.status_map`, which refuses to guess.
    OperationResource:
      properties:
        kind:
          type: string
          title: Kind
          description: What sort of thing was produced, for example `matrix` or `document`.
          examples:
            - matrix
        id:
          type: string
          title: Id
          description: >-
            Public identifier of the produced resource, carrying its own type
            prefix, for example `mtx_` for a matrix.
          examples:
            - mtx_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: >-
            Path on this API where the resource can be read, RELATIVE to the API
            root and never absolute. Absent when the resource has no addressable
            path, which happens for work started outside a matter. Absent means
            the id is real and there is nowhere to GET it; it is not an error.
          examples:
            - >-
              https://storage.vaquill.ai/exports/msa-acme-v3-redline.docx?signature=...
      additionalProperties: false
      type: object
      required:
        - kind
        - id
      title: OperationResource
      description: >-
        What the operation produced, or is producing.


        `url` is a path on this API rather than an absolute URL, because the
        service

        is mounted today and gets its own hostname later (docs 07.5). A relative

        path survives that move; a baked-in host does not.
    OperationError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable, machine-readable failure code. Branch on this, never on
            `message`.
          examples:
            - EXTRACTION_FAILED
        message:
          type: string
          title: Message
          description: >-
            Human-readable explanation, sanitized of internal paths and stack
            frames. Wording may change; do not parse it.
          examples:
            - The upstream extraction did not finish.
      additionalProperties: false
      type: object
      required:
        - code
        - message
      title: OperationError
      description: >-
        Why a failed operation failed, in terms a customer can act on.


        `code` is stable and machine-readable. `message` is sanitized: the
        internal

        job tables store stack traces and file paths in their `error_message`

        columns, and forwarding those verbatim leaks our internals into a
        customer's

        logs.
    OperationProgress:
      properties:
        done:
          type: integer
          minimum: 0
          title: Done
          description: How many units are finished.
          examples:
            - 24
        total:
          type: integer
          minimum: 0
          title: Total
          description: >-
            How many units there are in total. Can legitimately be zero for an
            empty run.
          examples:
            - 128
        unit:
          type: string
          enum:
            - cells
            - steps
            - documents
            - files
            - rows
            - percent
          title: Unit
          description: >-
            What `done` and `total` are counting. Always read it: a workflow run
            counts `percent` while a matrix run counts `cells`, so `{done: 43,
            total: 100}` alone is ambiguous.
          examples:
            - cells
      additionalProperties: false
      type: object
      required:
        - done
        - total
        - unit
      title: OperationProgress
      description: >-
        How far along, and in what units.


        The unit is not decoration. A workflow run stores only a percentage
        while a

        matrix run stores cell counts, so `{done: 43, total: 100}` with no unit
        reads

        as 43 of 100 documents and a client builds a wrong estimate from it.
  securitySchemes:
    WorkspaceAuth:
      type: http
      scheme: bearer
      bearerFormat: vq_ws_*
      description: >-
        Workspace credential issued from the automation console at
        `/automation`. Send it as `Authorization: Bearer vq_ws_...`. This is NOT
        a Data API key: a `vq_key_` credential is refused here and names the
        other product in the error.

````