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

# Get complete history for a model (Admin only)

> Returns the complete history for a specific model, showing all changes over time including pricing,
context length, display name, and description.

**Note:** Model names containing forward slashes (e.g., "Qwen/Qwen3-30B-A3B-Instruct-2507") must be URL-encoded.
For example, use "Qwen%2FQwen3-30B-A3B-Instruct-2507" in the URL path.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/admin/models/{model_name}/history
openapi: 3.1.0
info:
  title: NEAR AI Cloud API
  description: >-
    NEAR AI Cloud API for private AI model inference and organization
    administration.
  contact:
    name: NEAR AI Team
    email: support@near.ai
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://cloud-api.near.ai
    description: NEAR AI Cloud
security:
  - session_token: []
  - api_key: []
tags:
  - name: Chat
    description: Chat completion endpoints for AI model inference
  - name: Images
    description: Image generation endpoints
  - name: Audio
    description: Audio transcription endpoints
  - name: Rerank
    description: Document reranking endpoints
  - name: Score
    description: Text similarity scoring endpoints
  - name: Privacy
    description: Privacy classification (PII span detection) endpoints
  - name: Models
    description: Public model catalog and information
  - name: Responses
    description: >-
      Stateless response inference (`store: false` only). Raw request/response
      content, response items, and history are not persisted. Clients must
      include any prior context in each request. Every successful Responses
      inference makes exactly one Chat Completions call. Only custom `function`
      tools are supported. They are client-managed: Cloud returns
      `function_call` items but never executes them; a later `store: false`
      request replays the individual call (the raw item from output is accepted)
      with its matching `function_call_output`, alongside caller-managed message
      history and the same function tool definitions. The minimal replay path
      also accepts assistant `message` text parts of type `output_text`, but not
      reasoning or arbitrary full `response.output` items. Server-executed tools
      (`web_search`, `web_context_search`, `file_search`, `code_interpreter`,
      `computer`, and remote `mcp`) and image-generation/editing models are
      rejected. The separate `POST /mcp` endpoint continues to expose its
      `web_search` tool independently of Responses; use `/v1/images/*` for image
      generation/editing. Existing completed-response gateway attestation is
      preserved best-effort: when the signature write succeeds, `GET
      /v1/signature/resp_*` retrieves signatures over SHA-256 request/response
      digests, never raw content. Interrupted streams create no `resp_*`
      attestation record or legacy disconnect fallback. Conversations, response
      history, and file input are rejected.
  - name: Organizations
    description: Organization management
  - name: Organization Members
    description: Organization member and invitation management
  - name: Workspaces
    description: Workspace and API key management
  - name: Users
    description: User profile and token management
  - name: Invitations
    description: Token-based invitation handling
  - name: Usage
    description: Usage tracking and billing information
  - name: Reporting
    description: Read-only customer usage reporting
  - name: Billing
    description: Billing costs endpoint (HuggingFace integration)
  - name: Staking Farm
    description: House of Stake farm credit configuration and synchronization
  - name: Health
    description: Health check endpoints
  - name: Attestation
    description: Attestation and verification endpoints
  - name: Gateway
    description: Model gateway integration endpoints
  - name: Admin
    description: Administrative endpoints (admin access required)
  - name: Services
    description: Public platform services (e.g. web_search pricing)
paths:
  /v1/admin/models/{model_name}/history:
    get:
      tags:
        - Admin
      summary: Get complete history for a model (Admin only)
      description: >-
        Returns the complete history for a specific model, showing all changes
        over time including pricing,

        context length, display name, and description.


        **Note:** Model names containing forward slashes (e.g.,
        "Qwen/Qwen3-30B-A3B-Instruct-2507") must be URL-encoded.

        For example, use "Qwen%2FQwen3-30B-A3B-Instruct-2507" in the URL path.
      operationId: get_model_history
      parameters:
        - name: model_name
          in: path
          description: >-
            Model name to get complete history for (URL-encode if it contains
            slashes)
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: 'Maximum number of history entries to return (default: 50)'
          required: false
          schema:
            type: integer
            format: int64
        - name: offset
          in: query
          description: 'Number of history entries to skip (default: 0)'
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Model history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelHistoryResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - session_token: []
components:
  schemas:
    ModelHistoryResponse:
      type: object
      description: Model history response - complete history of model changes
      required:
        - modelName
        - history
        - total
        - limit
        - offset
      properties:
        history:
          type: array
          items:
            $ref: '#/components/schemas/ModelHistoryEntry'
        limit:
          type: integer
          format: int64
        modelName:
          type: string
        offset:
          type: integer
          format: int64
        total:
          type: integer
          format: int64
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ModelHistoryEntry:
      type: object
      description: >-
        Model history entry - includes pricing, context length, and other model
        attributes
      required:
        - id
        - modelId
        - inputCostPerToken
        - outputCostPerToken
        - costPerImage
        - contextLength
        - modelName
        - modelDisplayName
        - modelDescription
        - verifiable
        - isActive
        - ownedBy
        - effectiveFrom
        - createdAt
        - allowFree
      properties:
        allowFree:
          type: boolean
          description: >-
            If true, this model was allowed to serve without pricing at this
            point in time.
        cacheReadCostPerToken:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DecimalPrice'
              description: Omitted when cache pricing was disabled at this point in time.
        changeReason:
          type:
            - string
            - 'null'
        changedByUserEmail:
          type:
            - string
            - 'null'
        changedByUserId:
          type:
            - string
            - 'null'
        contextLength:
          type: integer
          format: int32
        costPerImage:
          $ref: '#/components/schemas/DecimalPrice'
        createdAt:
          type: string
        datacenters:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Datacenter'
          description: |-
            Datacenters the model ran in (OpenRouter `datacenters`), e.g.
            `[{ "country_code": "US" }]`. Omitted when unset.
        deprecationDate:
          type:
            - string
            - 'null'
        effectiveFrom:
          type: string
        effectiveUntil:
          type:
            - string
            - 'null'
        huggingFaceId:
          type:
            - string
            - 'null'
        id:
          type: string
        inferenceUrl:
          type:
            - string
            - 'null'
          description: Base URL for the model's inference endpoint
        inputCostPerToken:
          $ref: '#/components/schemas/DecimalPrice'
        inputModalities:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Input modalities the model accepts, e.g., ["text"], ["text",
            "image"]
        isActive:
          type: boolean
        isReady:
          type:
            - boolean
            - 'null'
        maxOutputLength:
          type:
            - integer
            - 'null'
          format: int32
        modelDescription:
          type: string
        modelDisplayName:
          type: string
        modelIcon:
          type:
            - string
            - 'null'
        modelId:
          type: string
        modelName:
          type: string
        openrouterSlug:
          type:
            - string
            - 'null'
          description: >-
            OpenRouter `openrouter.slug` override the model carried at this
            point.
        outputCostPerToken:
          $ref: '#/components/schemas/DecimalPrice'
        outputModalities:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Output modalities the model produces, e.g., ["text"], ["image"]
        ownedBy:
          type: string
        quantization:
          type:
            - string
            - 'null'
        supportedFeatures:
          type: array
          items:
            type: string
        supportedSamplingParameters:
          type: array
          items:
            type: string
        verifiable:
          type: boolean
    ErrorDetail:
      type: object
      required:
        - message
        - type
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
    DecimalPrice:
      type: object
      description: >-
        Decimal price for API responses


        The system uses a fixed scale of 9 (nano-dollars = 1 billionth of a
        dollar).

        The scale field is included in responses for client convenience.
      required:
        - amount
        - scale
        - currency
      properties:
        amount:
          type: integer
          format: int64
        currency:
          type: string
        scale:
          type: integer
          format: int64
    Datacenter:
      type: object
      description: |-
        OpenRouter `datacenters` entry: a single datacenter the model runs in.

        The provider spec
        (https://openrouter.ai/docs/guides/community/for-providers) models
        `datacenters` as an array of objects, each with an ISO 3166 Alpha-2
        `country_code`. We store only the country codes (a `TEXT[]`) and
        reconstruct this object wrapper at serialization time.
      required:
        - country_code
      properties:
        country_code:
          type: string
          description: ISO 3166 Alpha-2 country code (e.g. "US"), uppercase.
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token for user authentication (Authorization: Bearer
        <jwt_token>). Create via POST /users/me/access_tokens.
    api_key:
      type: http
      scheme: bearer
      bearerFormat: api_key
      description: 'API key for programmatic access (Authorization: Bearer sk-<api_key>)'

````

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