> ## 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.

# Get model activity

> How callers used one of your models, by its number such as router@3, over the last
`days` UTC days, today included: each day's answered calls through its family and by its
number, the calls another model answered in its place, its first and last answered call,
and the stretches it was kept warm. Evaluations aren't calls. A family's name or a base
model is refused with 422 invalid_reference, and a deleted model is gone (410).



## OpenAPI

````yaml /openapi.json get /v1/models/{model_id}/activity
openapi: 3.1.0
info:
  title: DecisionOne workbench
  description: >-
    Native decisions, versioned 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 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 their estimates
    share write_rpm. 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: Models
    description: Base models, and fine-tuned models by their numbers.
  - name: Families
    description: >-
      Lines of models trained on one dataset, and the switches that let them
      answer calls.
  - name: Datasets
    description: >-
      Validated training examples. A dataset grows in versions, and a version
      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/{model_id}/activity:
    get:
      tags:
        - Models
      summary: Get model activity
      description: >-
        How callers used one of your models, by its number such as router@3,
        over the last

        `days` UTC days, today included: each day's answered calls through its
        family and by its

        number, the calls another model answered in its place, its first and
        last answered call,

        and the stretches it was kept warm. Evaluations aren't calls. A family's
        name or a base

        model is refused with 422 invalid_reference, and a deleted model is gone
        (410).
      operationId: getModelActivity
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 90
            minimum: 1
            default: 30
            title: Days
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                description: >-
                  How callers used a model: its calls by day, through its family
                  or by its number.
                properties:
                  model:
                    description: The model by its number, such as router@4.
                    title: Model
                    type: string
                  days:
                    title: Days
                    type: integer
                  start:
                    type: string
                    title: Start
                  end:
                    type: string
                    title: End
                  requests:
                    description: Calls in the period that asked for it and it answered.
                    title: Requests
                    type: integer
                  fallbacks:
                    description: >-
                      Calls in the period that asked for it and another model
                      answered, while it couldn't.
                    title: Fallbacks
                    type: integer
                  first_call_at:
                    anyOf:
                      - type: number
                      - type: 'null'
                    description: When it first answered a call that asked for it, or null.
                    title: First Call At
                  last_call_at:
                    anyOf:
                      - type: number
                      - type: 'null'
                    description: When it last answered a call that asked for it, or null.
                    title: Last Call At
                  last_call_via:
                    anyOf:
                      - enum:
                          - family
                          - model
                        type: string
                      - type: 'null'
                    description: >-
                      Whether that last call named its family or the model
                      itself.
                    title: Last Call Via
                  daily:
                    items:
                      $ref: '#/components/schemas/ModelActivityDay'
                    title: Daily
                    type: array
                  kept_warm:
                    description: >-
                      The stretches it was kept warm, through its own keep warm
                      or its family's, as keep warm billed them in the period,
                      oldest first. Empty where keep warm is free.
                    items:
                      $ref: '#/components/schemas/KeptWarm'
                    title: Kept Warm
                    type: array
                required:
                  - model
                  - days
                  - start
                  - end
                  - requests
                  - fallbacks
                  - first_call_at
                  - last_call_at
                  - last_call_via
                  - daily
                  - kept_warm
                title: ModelActivity
                type: object
        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:
    ModelActivityDay:
      properties:
        day:
          type: string
          title: Day
          description: A UTC calendar day, such as 2026-10-09.
        family:
          type: integer
          title: Family
          description: Calls it answered that named its family.
        model:
          type: integer
          title: Model
          description: Calls it answered that named it by its number.
      type: object
      required:
        - day
        - family
        - model
      title: ModelActivityDay
    KeptWarm:
      properties:
        started_at:
          type: number
          title: Started At
        ended_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Ended At
          description: Null while it is still kept warm.
      type: object
      required:
        - started_at
        - ended_at
      title: KeptWarm
    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
    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.