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

# Resolve tenant-template plan

> Resolve a tenant-template plan without writing.



## OpenAPI

````yaml /openapi/solverapi.openapi.json post /v1/tenant-template-plans
openapi: 3.1.0
info:
  description: >-
    Run approved AI models under data, cost, and time limits. A cost limit can
    stop another provider call after recorded spend reaches the limit; it cannot
    reverse a call already in progress. Each finished run returns a receipt
    naming the selected model and provider without including the prompt or model
    output. Use the model catalog for what your organization can run now.
    Provider secrets never appear in API requests or responses. Retry a mutation
    with the same Idempotency-Key and the same request body.
  title: Millwork API
  version: 1.0.0
servers:
  - url: https://api.getmillwork.dev
security: []
tags:
  - description: >-
      Submit work, check its status, cancel it, and read the result. The API
      calls each run an execution.
    name: Runs
  - description: A record of how a run was handled, without prompt or result content.
    name: Receipts
  - description: Models this organization can use now.
    name: Models
  - description: Providers and sign-in methods that can be connected.
    name: Available providers
  - description: Provider accounts connected to this organization.
    name: Provider connections
  - description: >-
      One-time browser steps for connecting a provider without sending its
      secret in an API request.
    name: Secure credential setup
  - description: Exact models and provider routes available through connected accounts.
    name: Provider models
  - description: Create, label, list, and revoke organization API keys.
    name: API keys
  - description: Organization members and invitations.
    name: Members
  - description: Metered usage and quota state.
    name: Usage
  - description: Account, plan and allowance snapshot.
    name: Account
  - description: Checkout, billing portal and billing profile.
    name: Billing
  - description: Webhook endpoints, deliveries and replay.
    name: Webhooks
  - description: Organization-scoped compliance export.
    name: Compliance export
  - description: >-
      Models, agents, and skills Millwork can choose for a run. The API calls
      each one an arm.
    name: Registered options
  - description: >-
      Checks that score output and can stop, retry, or choose another option
      within the request policy.
    name: Output checks
  - description: Routing proposals and their review lifecycle.
    name: Repair proposals
  - description: Aggregate evaluation trend and repair history.
    name: Evaluation
  - description: Publisher and release identity records for supported models.
    name: Model definitions
  - description: >-
      Protected provider-credential references. Secret material never appears in
      this API.
    name: Credential references
  - description: Dashboard browser sign-in, sign-up, session lookup, and sign-out.
    name: Browser access
  - description: Read-only demo session setup.
    name: Demo
  - description: Machine setup and the authenticated organization profile.
    name: Organizations
  - description: Eligible immutable starter presets and typed blockers.
    name: Tenant templates
  - description: Stateless starter plan resolution. No write and no provider call.
    name: Tenant template plans
  - description: Durable starter applications that resume instead of restarting.
    name: Tenant template applications
paths:
  /v1/tenant-template-plans:
    post:
      tags:
        - Tenant template plans
      summary: Resolve tenant-template plan
      description: Resolve a tenant-template plan without writing.
      operationId: postTenantTemplatePlans
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                model_deployment_id:
                  minLength: 1
                  type: string
                template_id:
                  enum:
                    - starter
                    - pooled-open-model
                    - byok-open-model
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  access_lane:
                    enum:
                      - diagnostic
                      - millwork_pool
                      - byok
                    type: string
                  alternative_plans:
                    items:
                      additionalProperties: false
                      properties:
                        access_lane:
                          enum:
                            - byok
                          type: string
                        application_supported:
                          type: boolean
                        next_action:
                          additionalProperties: false
                          properties:
                            detail:
                              type: string
                            type:
                              type: string
                          required:
                            - type
                            - detail
                          type: object
                        template_id:
                          enum:
                            - byok-open-model
                          type: string
                        template_version:
                          type: string
                      required:
                        - template_id
                        - template_version
                        - access_lane
                        - application_supported
                        - next_action
                      type: object
                    type: array
                  blockers:
                    items:
                      additionalProperties: false
                      properties:
                        code:
                          type: string
                        detail:
                          type: string
                        next_action:
                          additionalProperties: false
                          properties:
                            detail:
                              type: string
                            type:
                              type: string
                          required:
                            - type
                            - detail
                          type: object
                      required:
                        - code
                        - detail
                        - next_action
                      type: object
                    type: array
                  byok_source:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          auth_scheme:
                            type: string
                          certification_id:
                            type: string
                          model_key:
                            type: string
                          served_variant_id:
                            type: string
                          source_id:
                            type: string
                        required:
                          - source_id
                          - auth_scheme
                          - model_key
                          - served_variant_id
                          - certification_id
                        type: object
                      - type: 'null'
                  catalog_row:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          arm_registration_template:
                            additionalProperties: false
                            description: >-
                              POST /v1/arms request body for this model. Send it
                              unchanged; the API rejects changes outside the
                              checked template.
                            properties:
                              capability_tags:
                                items:
                                  type: string
                                type: array
                              cost_class:
                                $ref: '#/components/schemas/CostClass'
                              data_class_grants:
                                items:
                                  $ref: '#/components/schemas/DataClass'
                                type: array
                              display_name:
                                type: string
                              kind:
                                enum:
                                  - model
                                type: string
                              model_deployment_id:
                                type: string
                            required:
                              - kind
                              - display_name
                              - model_deployment_id
                              - capability_tags
                              - data_class_grants
                              - cost_class
                            type: object
                          connection:
                            oneOf:
                              - additionalProperties: false
                                properties:
                                  access_lane:
                                    enum:
                                      - byok
                                    type: string
                                  commercial_owner:
                                    enum:
                                      - customer
                                    type: string
                                  connection_id:
                                    description: >-
                                      The calling organization's provider
                                      connection.
                                    type: string
                                required:
                                  - access_lane
                                  - commercial_owner
                                  - connection_id
                                type: object
                              - additionalProperties: false
                                properties:
                                  access_lane:
                                    enum:
                                      - millwork_pool
                                    type: string
                                  commercial_owner:
                                    enum:
                                      - millwork
                                    type: string
                                required:
                                  - access_lane
                                  - commercial_owner
                                type: object
                          deployment:
                            additionalProperties: false
                            properties:
                              assurance_evidence_ref:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              created_at:
                                format: date-time
                                type: string
                              fallback_policy:
                                enum:
                                  - none
                                  - source_controlled
                                type: string
                              last_tested_at:
                                format: date-time
                                type: string
                              location:
                                type: string
                              model_deployment_id:
                                type: string
                              model_key:
                                type: string
                              pricing_basis:
                                enum:
                                  - source_reported
                                  - estimated
                                type: string
                              protocol_profile:
                                enum:
                                  - openai_responses
                                  - openai_chat
                                  - anthropic_messages
                                  - gemini_generate_content
                                  - bedrock_converse
                                type: string
                              release_assurance:
                                enum:
                                  - unknown
                                  - family_alias
                                  - source_attested_release
                                  - exact_artifact
                                type: string
                              resolution_evidence_ref:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              resolved_upstream_ref:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              route:
                                type: string
                              served_variant_id:
                                type: string
                              source_id:
                                type: string
                              status:
                                enum:
                                  - listed
                                  - disabled
                                type: string
                              updated_at:
                                format: date-time
                                type: string
                              upstream_ref:
                                type: string
                            required:
                              - model_deployment_id
                              - source_id
                              - model_key
                              - served_variant_id
                              - upstream_ref
                              - release_assurance
                              - assurance_evidence_ref
                              - resolved_upstream_ref
                              - resolution_evidence_ref
                              - protocol_profile
                              - location
                              - route
                              - fallback_policy
                              - pricing_basis
                              - last_tested_at
                              - status
                              - created_at
                              - updated_at
                            type: object
                          model:
                            additionalProperties: false
                            properties:
                              capabilities:
                                items:
                                  type: string
                                type: array
                              family:
                                type: string
                              lifecycle:
                                enum:
                                  - preview
                                  - active
                                  - deprecated
                                  - retired
                                type: string
                              model_key:
                                type: string
                              publisher_id:
                                type: string
                              release:
                                type: string
                              release_license:
                                additionalProperties: false
                                description: >-
                                  License is release-scoped; family-wide claims
                                  are not accepted.
                                properties:
                                  commercial_use:
                                    enum:
                                      - allowed
                                      - restricted
                                      - unknown
                                    type: string
                                  evidence_ref:
                                    type: string
                                  identifier:
                                    description: >-
                                      SPDX expression or a stable source-local
                                      license id.
                                    type: string
                                required:
                                  - identifier
                                  - commercial_use
                                  - evidence_ref
                                type: object
                            required:
                              - model_key
                              - publisher_id
                              - family
                              - release
                              - capabilities
                              - lifecycle
                              - release_license
                            type: object
                          offering:
                            additionalProperties: false
                            properties:
                              auth_scheme:
                                enum:
                                  - api_key
                                  - oauth2
                                  - aws_sts_sigv4
                                type: string
                              certification:
                                additionalProperties: false
                                properties:
                                  certification_id:
                                    type: string
                                  evidence_schema_version:
                                    description: model-source-certification/v1
                                    type: string
                                  generated_at:
                                    format: date-time
                                    type: string
                                  standing:
                                    enum:
                                      - conformant
                                      - exact_artifact
                                    type: string
                                  subject:
                                    additionalProperties: false
                                    description: >-
                                      Model and provider-route facts covered by
                                      the certification. Internal evidence
                                      connection and ownership fields are not
                                      public.
                                    properties:
                                      auth_scheme:
                                        enum:
                                          - api_key
                                          - oauth2
                                          - aws_sts_sigv4
                                        type: string
                                      location:
                                        type: string
                                      model_key:
                                        type: string
                                      pricing_basis:
                                        enum:
                                          - source_reported
                                          - estimated
                                        type: string
                                      protocol_profile:
                                        enum:
                                          - openai_responses
                                          - openai_chat
                                          - anthropic_messages
                                          - gemini_generate_content
                                          - bedrock_converse
                                        type: string
                                      route:
                                        type: string
                                      served_variant_id:
                                        type: string
                                      source_id:
                                        type: string
                                    required:
                                      - model_key
                                      - served_variant_id
                                      - source_id
                                      - protocol_profile
                                      - auth_scheme
                                      - location
                                      - route
                                      - pricing_basis
                                    type: object
                                required:
                                  - certification_id
                                  - evidence_schema_version
                                  - standing
                                  - generated_at
                                  - subject
                                type: object
                              data_classes:
                                items:
                                  $ref: '#/components/schemas/DataClass'
                                type: array
                              fallback_policy:
                                enum:
                                  - none
                                  - source_controlled
                                type: string
                              location:
                                type: string
                              pricing_basis:
                                enum:
                                  - source_reported
                                  - estimated
                                type: string
                              protocol_profile:
                                enum:
                                  - openai_responses
                                  - openai_chat
                                  - anthropic_messages
                                  - gemini_generate_content
                                  - bedrock_converse
                                type: string
                              resolution_evidence_ref:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              resolved_upstream_ref:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              route:
                                type: string
                              served_variant:
                                additionalProperties: false
                                properties:
                                  assurance_evidence_ref:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  model_key:
                                    type: string
                                  release_assurance:
                                    enum:
                                      - unknown
                                      - family_alias
                                      - source_attested_release
                                      - exact_artifact
                                    type: string
                                  served_variant_id:
                                    type: string
                                  source_id:
                                    type: string
                                  upstream_ref:
                                    type: string
                                required:
                                  - served_variant_id
                                  - source_id
                                  - model_key
                                  - upstream_ref
                                  - release_assurance
                                  - assurance_evidence_ref
                                type: object
                              tested_at:
                                format: date-time
                                type: string
                            required:
                              - served_variant
                              - protocol_profile
                              - auth_scheme
                              - data_classes
                              - fallback_policy
                              - location
                              - route
                              - pricing_basis
                              - tested_at
                              - resolved_upstream_ref
                              - resolution_evidence_ref
                              - certification
                            type: object
                          provenance:
                            additionalProperties: false
                            properties:
                              deployment:
                                additionalProperties: false
                                properties:
                                  fallback_policy:
                                    enum:
                                      - none
                                      - source_controlled
                                    type: string
                                  location:
                                    type: string
                                  model_deployment_id:
                                    type: string
                                  pricing_basis:
                                    enum:
                                      - source_reported
                                      - estimated
                                    type: string
                                  protocol_profile:
                                    enum:
                                      - openai_responses
                                      - openai_chat
                                      - anthropic_messages
                                      - gemini_generate_content
                                      - bedrock_converse
                                    type: string
                                  route:
                                    type: string
                                required:
                                  - model_deployment_id
                                  - protocol_profile
                                  - location
                                  - route
                                  - pricing_basis
                                  - fallback_policy
                                type: object
                              requested:
                                additionalProperties: false
                                properties:
                                  family:
                                    type: string
                                  model_key:
                                    type: string
                                  publisher_id:
                                    type: string
                                  release:
                                    type: string
                                  served_variant_id:
                                    type: string
                                  upstream_ref:
                                    type: string
                                required:
                                  - model_key
                                  - publisher_id
                                  - family
                                  - release
                                  - served_variant_id
                                  - upstream_ref
                                type: object
                              resolved:
                                anyOf:
                                  - additionalProperties: false
                                    properties:
                                      attestation:
                                        enum:
                                          - source_response
                                          - gateway_response
                                        type: string
                                      source_request_id:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      upstream_ref:
                                        type: string
                                    required:
                                      - upstream_ref
                                      - source_request_id
                                      - attestation
                                    type: object
                                  - type: 'null'
                                description: >-
                                  The model identity reported by the provider.
                                  It is null in the catalog and filled after a
                                  model answers.
                              schema_version:
                                description: model-attempt-provenance/v1
                                type: string
                              source:
                                oneOf:
                                  - additionalProperties: false
                                    properties:
                                      access_lane:
                                        enum:
                                          - byok
                                        type: string
                                      auth_scheme:
                                        enum:
                                          - api_key
                                          - oauth2
                                          - aws_sts_sigv4
                                        type: string
                                      commercial_owner:
                                        enum:
                                          - customer
                                        type: string
                                      connection_id:
                                        description: >-
                                          The calling organization's provider
                                          connection.
                                        type: string
                                      source_id:
                                        type: string
                                      source_kind:
                                        enum:
                                          - publisher_direct
                                          - gateway
                                          - cloud
                                          - fixture
                                        type: string
                                    required:
                                      - source_id
                                      - source_kind
                                      - connection_id
                                      - access_lane
                                      - commercial_owner
                                      - auth_scheme
                                    type: object
                                  - additionalProperties: false
                                    properties:
                                      access_lane:
                                        enum:
                                          - millwork_pool
                                        type: string
                                      auth_scheme:
                                        enum:
                                          - api_key
                                          - oauth2
                                          - aws_sts_sigv4
                                        type: string
                                      commercial_owner:
                                        enum:
                                          - millwork
                                        type: string
                                      source_id:
                                        type: string
                                      source_kind:
                                        enum:
                                          - publisher_direct
                                          - gateway
                                          - cloud
                                          - fixture
                                        type: string
                                    required:
                                      - source_id
                                      - source_kind
                                      - access_lane
                                      - commercial_owner
                                      - auth_scheme
                                    type: object
                            required:
                              - schema_version
                              - requested
                              - source
                              - deployment
                              - resolved
                            type: object
                          source:
                            additionalProperties: false
                            properties:
                              source_id:
                                type: string
                              source_kind:
                                enum:
                                  - publisher_direct
                                  - gateway
                                  - cloud
                                  - fixture
                                type: string
                            required:
                              - source_id
                              - source_kind
                            type: object
                        required:
                          - model
                          - source
                          - offering
                          - connection
                          - deployment
                          - provenance
                          - arm_registration_template
                        type: object
                      - type: 'null'
                  digest:
                    pattern: ^sha256:[0-9a-f]{64}$
                    type: string
                  effects:
                    items:
                      additionalProperties: false
                      properties:
                        description:
                          type: string
                        id:
                          type: string
                      required:
                        - id
                        - description
                      type: object
                    type: array
                  expires_at:
                    format: date-time
                    type: string
                  file_manifest:
                    items:
                      additionalProperties: false
                      properties:
                        kind:
                          enum:
                            - secretless_config
                            - env_placeholders
                            - node_ts_example
                          type: string
                        path:
                          type: string
                      required:
                        - path
                        - kind
                      type: object
                    type: array
                  issued_at:
                    format: date-time
                    type: string
                  maximum_spend_usd:
                    type: number
                  qualification:
                    additionalProperties: false
                    properties:
                      next_action:
                        additionalProperties: false
                        properties:
                          detail:
                            type: string
                          type:
                            type: string
                        required:
                          - type
                          - detail
                        type: object
                      state:
                        enum:
                          - no_credential
                          - preview_pending_or_rejected
                          - tenant_not_admitted
                          - organization_invite_required
                          - role_lacks_permission
                          - approved
                        type: string
                    required:
                      - state
                      - next_action
                    type: object
                  request_policy:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          budget:
                            additionalProperties: false
                            properties:
                              max_cost_usd:
                                type: number
                              max_runtime_s:
                                type: integer
                            required:
                              - max_cost_usd
                              - max_runtime_s
                            type: object
                          data_classes:
                            items:
                              $ref: '#/components/schemas/DataClass'
                            type: array
                          fallback_policy:
                            enum:
                              - none
                            type: string
                          mode:
                            enum:
                              - echo
                              - live
                            type: string
                          verifier:
                            enum:
                              - platform.echo
                              - platform.output_presence
                            type: string
                        required:
                          - mode
                          - data_classes
                          - budget
                          - fallback_policy
                          - verifier
                        type: object
                      - type: 'null'
                  request_preset_id:
                    type: string
                  starter_credit:
                    additionalProperties: false
                    properties:
                      balance_usd:
                        type: number
                      covers_maximum_spend:
                        type: boolean
                      funded_state:
                        enum:
                          - funded
                          - sandbox
                        type: string
                    required:
                      - balance_usd
                      - funded_state
                      - covers_maximum_spend
                    type: object
                  template_id:
                    enum:
                      - starter
                      - pooled-open-model
                      - byok-open-model
                    type: string
                  template_version:
                    type: string
                required:
                  - template_id
                  - template_version
                  - request_preset_id
                  - issued_at
                  - expires_at
                  - qualification
                  - access_lane
                  - catalog_row
                  - byok_source
                  - blockers
                  - alternative_plans
                  - effects
                  - request_policy
                  - starter_credit
                  - maximum_spend_usd
                  - file_manifest
                  - digest
                type: object
          description: Default Response
        4XX:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Request failure in RFC 7807 format. The `type` field identifies the
            reason. Validation errors list affected fields. Rate and quota
            errors include `retry_after_s` and the `Retry-After` header.
        5XX:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Server failure in RFC 7807 format. The response does not include
            internal error details.
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    CostClass:
      enum:
        - economy
        - standard
        - premium
    DataClass:
      enum:
        - public
        - sandbox
        - tenant_internal
    Problem:
      additionalProperties: false
      properties:
        detail:
          description: Short, safe, occurrence-specific description. Never a stack trace.
          type: string
        errors:
          description: Per-field validation failures (validation_failed only).
          items:
            additionalProperties: false
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
            type: object
          type: array
        instance:
          description: Unique id for this occurrence, safe to quote in support requests.
          format: uuid
          type: string
        retry_after_s:
          description: >-
            Seconds to wait before retrying (rate_limited and quota_exceeded
            only; mirrored as the Retry-After header).
          type: integer
        status:
          description: HTTP status code, duplicated in the body per RFC 7807.
          type: integer
        title:
          description: Human-readable summary of the problem type.
          type: string
        type:
          description: Stable URI that identifies the error type.
          format: uri
          type: string
      required:
        - type
        - title
        - status
        - instance
      type: object
  securitySchemes:
    bearerAuth:
      description: Organization API key for application requests.
      scheme: bearer
      type: http
    sessionCookie:
      description: Dashboard browser session. Do not use this credential in an application.
      in: cookie
      name: solverapi_session
      type: apiKey

````