Civitai ModelVersions API

Specific versions of a model with files, hashes, and AIR identifiers.

Operations 5

GET /model-versions/{id} Get Model Version #
GET /model-versions/mini/{id} Get Model Version Mini #
GET /model-versions/by-hash/{hash} Get Model Version By Hash #
POST /model-versions/by-hash Get Model Versions By Hashes #
POST /model-versions/by-hash/ids Get Model Version IDs By Hashes #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/civitai-modelversions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

civitai-modelversions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Civitai Site Model Versions API
  version: '1.0'
  description: 'Browse and search the Civitai public catalog of Stable Diffusion, SDXL, Flux, and video models.

    Exposes models, model versions, images, creators, tags, users, permissions, and the user vault.

    Public read endpoints are cached; authenticated endpoints are not. Authenticate with a personal

    API key issued at civitai.com using a Bearer token.

    '
  contact:
    name: Civitai Developer Support
    url: https://developer.civitai.com/
  termsOfService: https://civitai.com/content/tos
  license:
    name: Civitai Terms of Service
    url: https://civitai.com/content/tos
servers:
- url: https://civitai.com/api/v1
  description: Civitai Site API
security:
- BearerAuth: []
- {}
tags:
- name: ModelVersions
  description: Specific versions of a model with files, hashes, and AIR identifiers.
paths:
  /model-versions/{id}:
    get:
      operationId: getModelVersion
      summary: Get Model Version
      tags:
      - ModelVersions
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Model version detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVersion'
        '404':
          $ref: '#/components/responses/NotFound'
  /model-versions/mini/{id}:
    get:
      operationId: getModelVersionMini
      summary: Get Model Version Mini
      tags:
      - ModelVersions
      description: Lightweight model-version payload optimized for client tools.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Lightweight model version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVersionMini'
  /model-versions/by-hash/{hash}:
    get:
      operationId: getModelVersionByHash
      summary: Get Model Version By Hash
      tags:
      - ModelVersions
      parameters:
      - name: hash
        in: path
        required: true
        schema:
          type: string
        description: AutoV1, AutoV2, SHA256, CRC32, or Blake3 hash of the model file.
      responses:
        '200':
          description: Model version matching the file hash.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVersion'
        '404':
          $ref: '#/components/responses/NotFound'
  /model-versions/by-hash:
    post:
      operationId: getModelVersionsByHashes
      summary: Get Model Versions By Hashes
      tags:
      - ModelVersions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: Map of hash to model version.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelVersion'
  /model-versions/by-hash/ids:
    post:
      operationId: getModelVersionIdsByHashes
      summary: Get Model Version IDs By Hashes
      tags:
      - ModelVersions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: Map of hash to model version ID.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
components:
  schemas:
    ModelVersionMini:
      type: object
      properties:
        id:
          type: integer
        modelId:
          type: integer
        name:
          type: string
        baseModel:
          type: string
        air:
          type: string
        downloadUrl:
          type: string
          format: uri
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
    Image:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
          format: uri
        hash:
          type: string
        width:
          type: integer
        height:
          type: integer
        nsfwLevel:
          type: integer
        nsfw:
          type: boolean
        createdAt:
          type: string
          format: date-time
        postId:
          type: integer
        stats:
          $ref: '#/components/schemas/Stats'
        meta:
          type: object
          additionalProperties: true
        username:
          type: string
    Stats:
      type: object
      properties:
        downloadCount:
          type: integer
        favoriteCount:
          type: integer
        commentCount:
          type: integer
        ratingCount:
          type: integer
        rating:
          type: number
        thumbsUpCount:
          type: integer
        thumbsDownCount:
          type: integer
    ModelVersion:
      type: object
      properties:
        id:
          type: integer
        modelId:
          type: integer
        name:
          type: string
        baseModel:
          type: string
          description: e.g. SD 1.5, SDXL 1.0, Flux.1 D
        baseModelType:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        publishedAt:
          type: string
          format: date-time
        trainedWords:
          type: array
          items:
            type: string
        air:
          type: string
          description: AI Resource Identifier, e.g. urn:air:sdxl:lora:civitai:12345@67890
        downloadUrl:
          type: string
          format: uri
        files:
          type: array
          items:
            $ref: '#/components/schemas/ModelFile'
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
        stats:
          $ref: '#/components/schemas/Stats'
    ModelFile:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        sizeKB:
          type: number
        type:
          type: string
          enum:
          - Model
          - VAE
          - Config
          - Negative
          - Training Data
          - Archive
          - Other
        format:
          type: string
          enum:
          - SafeTensor
          - PickleTensor
          - Other
        pickleScanResult:
          type: string
        virusScanResult:
          type: string
        scannedAt:
          type: string
          format: date-time
        downloadUrl:
          type: string
          format: uri
        hashes:
          type: object
          properties:
            AutoV1:
              type: string
            AutoV2:
              type: string
            SHA256:
              type: string
            CRC32:
              type: string
            Blake3:
              type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: Personal API token issued at https://civitai.com/user/account.