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

# Deactivate model

> Take a named model out of service: calls to its name get 409 no_production_version
until a version is promoted. Its production version becomes the previous version, so
promoting it or rolling back serves it again, and keep warm switches off. Versions can
still be called by number, such as router@2. With `version`, only while production is
still that version; otherwise 409 production_changed.



## OpenAPI

````yaml /openapi.json post /v1/models/{name}/deactivate
openapi: 3.1.0
info:
  title: DecisionOne workbench
  description: >-
    Native decisions, immutable datasets, adaptation and shared-base deployment.
    Authenticate with `Authorization: Bearer d1_sk_...` when accounts are on. A
    short guide for coding agents is at /llms.txt. Hosted account APIs accept a
    Bearer API key or a browser session. An API key reads its account but can't
    change it: keys, billing, invitations and settings change in the console.
    Browser mutations require the configured Origin and X-CSRF-Token from
    /auth/session. Account recovery and history remain available to blocked
    accounts. Waitlisted accounts can read their account summary and model
    catalogue and request early access; private member APIs require admission.
    Money fields ending in _usd are exact decimal strings; never interpret them
    as integer cents. Authenticated customer reads and existing-operation
    replays share read_rpm, and other customer writes except decisions and
    estimates share write_rpm. Feedback has the tier's rpm to itself. Exhausted
    budgets return 429 with Retry-After; unavailable admission storage returns
    503.
  version: 0.1.0
servers:
  - url: https://console.sqwish.ai
security: []
tags:
  - name: Decisions
    description: Probabilities for questions with fixed outcomes.
  - name: Feedback
    description: Report outcomes and turn them into training data.
  - name: Models
    description: Base models, adapters and named models with versions.
  - name: Datasets
    description: Validated training examples. A dataset never changes.
  - name: Evaluations
    description: Reusable model results on a dataset's fixed evaluation rows.
  - name: Fine-tuning
    description: Training jobs, their events and held-out results.
  - name: Prompt tuning
    description: Better wording for a decision, tested on your rows. Words, not weights.
  - name: Labeling
    description: Teacher labels for real queries, reviewed by you.
  - name: Accounts
    description: Email OTP sign-in, revocable sessions, security and API keys.
  - name: Billing
    description: Exact USD balances, purchases, automatic top-ups and referrals.
  - name: Integrations
    description: Endpoints other tools call, such as Claude Code.
  - name: System
    description: Health and discovery.
paths:
  /v1/models/{name}/deactivate:
    post:
      tags:
        - Models
      summary: Deactivate model
      description: >-
        Take a named model out of service: calls to its name get 409
        no_production_version

        until a version is promoted. Its production version becomes the previous
        version, so

        promoting it or rolling back serves it again, and keep warm switches
        off. Versions can

        still be called by number, such as router@2. With `version`, only while
        production is

        still that version; otherwise 409 production_changed.
      operationId: deactivateModel
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/Deactivate'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  id:
                    type: string
                    title: Id
                  object:
                    type: string
                    const: model
                    title: Object
                  kind:
                    type: string
                    const: named
                    title: Kind
                  production:
                    anyOf:
                      - $ref: '#/components/schemas/ModelVersion'
                      - type: 'null'
                  candidate:
                    anyOf:
                      - $ref: '#/components/schemas/ModelVersion'
                      - type: 'null'
                  previous:
                    anyOf:
                      - $ref: '#/components/schemas/ModelVersion'
                      - type: 'null'
                  keep_warm:
                    type: boolean
                    title: Keep Warm
                  keep_warm_window:
                    anyOf:
                      - $ref: '#/components/schemas/KeepWarmWindow'
                      - type: 'null'
                    description: >-
                      The hour of keep warm being billed, or null when nothing
                      is billed.
                  keep_warm_stopped_at:
                    anyOf:
                      - type: number
                      - type: 'null'
                    title: Keep Warm Stopped At
                    description: >-
                      When keep warm switched off because the next hour couldn't
                      be reserved, while it stays off. Otherwise null.
                  learning:
                    $ref: '#/components/schemas/LearningState'
                  versions:
                    items:
                      $ref: '#/components/schemas/ModelVersion'
                    type: array
                    title: Versions
                  memory:
                    additionalProperties:
                      $ref: '#/components/schemas/MemoryPool'
                    type: object
                    title: Memory
                type: object
                required:
                  - id
                  - object
                  - kind
                  - production
                  - candidate
                  - previous
                  - keep_warm
                  - keep_warm_window
                  - keep_warm_stopped_at
                  - learning
                  - versions
                  - memory
                title: NamedModel
        4XX:
          description: >-
            Client error. On a 422, `error.details` lists each field that
            failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        5XX:
          description: Server error. A 503 names what is not running on this server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    Deactivate:
      properties:
        version:
          anyOf:
            - type: string
              pattern: ^\d{1,6}$
            - type: 'null'
          title: Version
      additionalProperties: false
      type: object
      title: Deactivate
    ModelVersion:
      properties:
        version:
          type: integer
          title: Version
        ref:
          type: string
          title: Ref
        adapter:
          type: string
          title: Adapter
        status:
          type: string
          title: Status
        state:
          anyOf:
            - type: string
              enum:
                - loaded
                - loading
                - asleep
            - type: 'null'
          title: State
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        created_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Created At
        gate:
          anyOf:
            - $ref: '#/components/schemas/Gate'
            - type: 'null'
        heldout:
          additionalProperties:
            type: number
          type: object
          title: Heldout
      type: object
      required:
        - version
        - ref
        - adapter
        - status
        - state
        - parent
        - created_at
        - gate
        - heldout
      title: ModelVersion
    KeepWarmWindow:
      properties:
        started_at:
          type: number
          title: Started At
        ends_at:
          type: number
          title: Ends At
          description: When this hour's hold ends and the next is reserved.
        reserved_usd:
          type: string
          title: Reserved Usd
          description: >-
            The hour's fee held, as exact USD. The minutes used are charged when
            the hour rolls over or keep warm is switched off.
      type: object
      required:
        - started_at
        - ends_at
        - reserved_usd
      title: KeepWarmWindow
    LearningState:
      properties:
        enabled:
          type: boolean
          title: Enabled
        after:
          type: integer
          title: After
        auto_promote:
          type: boolean
          title: Auto Promote
        labelled:
          type: integer
          title: Labelled
        carried:
          type: integer
          title: Carried
          description: >-
            Labelled decisions the next round trains on besides the new ones:
            the last round's, while its version hasn't reached production.
        waiting:
          anyOf:
            - type: string
            - type: 'null'
          title: Waiting
        next_round_after:
          anyOf:
            - type: number
            - type: 'null'
          title: Next Round After
        round:
          anyOf:
            - $ref: '#/components/schemas/LearningRound'
            - type: 'null'
      type: object
      required:
        - enabled
        - after
        - auto_promote
        - labelled
        - carried
        - waiting
        - next_round_after
        - round
      title: LearningState
    MemoryPool:
      properties:
        rows:
          type: integer
          title: Rows
        capacity:
          type: integer
          title: Capacity
        seen:
          type: integer
          title: Seen
        task_label_strata:
          type: integer
          title: Task Label Strata
      type: object
      required:
        - rows
        - capacity
        - seen
        - task_label_strata
      title: MemoryPool
    ErrorResponse:
      description: >-
        The body of every error. app.failure() builds it; this model documents
        it.
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorResponse
      type: object
    Gate:
      properties:
        passed:
          type: boolean
          title: Passed
        against:
          type: string
          enum:
            - parent
            - base
          title: Against
        reasons:
          items:
            type: string
          type: array
          title: Reasons
        groups:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Groups
        deltas:
          additionalProperties:
            type: number
          type: object
          title: Deltas
        ece:
          additionalProperties:
            anyOf:
              - type: number
              - type: 'null'
          type: object
          title: Ece
      type: object
      required:
        - passed
        - against
        - reasons
      title: Gate
    LearningRound:
      properties:
        job:
          anyOf:
            - type: string
            - type: 'null'
          title: Job
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        state:
          type: string
          title: State
        started_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Started At
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - job
        - version
        - state
        - started_at
        - message
      title: LearningRound
    ErrorBody:
      properties:
        code:
          description: A stable code to branch on, such as invalid_request.
          title: Code
          type: string
        message:
          description: What went wrong and what to change, in plain words.
          title: Message
          type: string
        retryable:
          description: >-
            True when another attempt may succeed; it does not prove that no
            work was done. Respect Retry-After when present. Only operations
            that support Idempotency-Key replay a prior result, including
            /v1/decide for 24 hours.
          title: Retryable
          type: boolean
        request_id:
          description: Also sent as X-Request-ID. Quote it in bug reports.
          title: Request Id
          type: string
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          default: null
          description: On validation errors, one entry for each field that failed.
          title: Details
      required:
        - code
        - message
        - retryable
        - request_id
      title: ErrorBody
      type: object
    ErrorDetail:
      properties:
        path:
          description: Where the problem is, such as ["body", "decisions", 0, "outcomes"].
          items:
            anyOf:
              - type: string
              - type: integer
          title: Path
          type: array
        message:
          title: Message
          type: string
        type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Type
      required:
        - path
        - message
      title: ErrorDetail
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: d1_sk_...
      description: Create an API key in the console. Required when accounts are enabled.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.