# Civitai model version API

Resolve Civitai model versions by version ID, URL or file hash via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as id, output, and retrieve structured data including model-version identifier, version base model, file identifier, source file hashes, and source scan metadata for artifact matching, and file index.

Documentation: https://openany.si/market/apis/civitai/civitai-model-version-api/?offering=eb283232-ff11-448c-a840-334710d6fd64
API ID: eb283232-ff11-448c-a840-334710d6fd64
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/civitai/v1/model-version
Page update time: 2026-12-03T02:45:54.615Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:45:53.225Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Civitai model version API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Model version id, or a civitai.com link with ?modelVersionId=."
        },
        "hash": {
          "type": "string",
          "description": "A model file hash (finds the version a downloaded file belongs to)."
        },
        "include_nsfw": {
          "type": "boolean",
          "description": "Opt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "availability": {
      "type": "null"
    },
    "base_model": {
      "type": "string"
    },
    "base_model_type": {
      "type": "string"
    },
    "cached": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string"
    },
    "credits_used": {
      "type": "integer"
    },
    "description": {
      "type": "string"
    },
    "download_url": {
      "type": "string"
    },
    "files": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "download_url": {
                "type": "string"
              },
              "hashes": {
                "type": "object",
                "properties": {
                  "AutoV1": {
                    "type": "string"
                  },
                  "AutoV2": {
                    "type": "string"
                  },
                  "BLAKE3": {
                    "type": "string"
                  },
                  "CRC32": {
                    "type": "string"
                  },
                  "SHA256": {
                    "type": "string"
                  },
                  "SHA256_12": {
                    "type": "string"
                  }
                }
              },
              "id": {
                "type": "integer"
              },
              "metadata": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string"
                  },
                  "fp": {
                    "type": "string"
                  },
                  "size": {
                    "type": "string"
                  }
                }
              },
              "name": {
                "type": "string"
              },
              "primary": {
                "type": "boolean"
              },
              "scan": {
                "type": "object",
                "properties": {
                  "pickle": {
                    "type": "string"
                  },
                  "scanned_at": {
                    "type": "string"
                  },
                  "virus": {
                    "type": "string"
                  }
                }
              },
              "size_kb": {
                "type": "number"
              },
              "type": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "id": {
      "type": "integer"
    },
    "images": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "base_model": {
                "type": "null"
              },
              "created_at": {
                "type": "null"
              },
              "hash": {
                "type": "string"
              },
              "height": {
                "type": "integer"
              },
              "id": {
                "type": "null"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "Model": {
                    "type": "string"
                  },
                  "Model hash": {
                    "type": "string"
                  },
                  "Size": {
                    "type": "string"
                  },
                  "VAE": {
                    "type": "string"
                  },
                  "VAE hash": {
                    "type": "string"
                  },
                  "Version": {
                    "type": "string"
                  },
                  "cfgScale": {
                    "type": "integer"
                  },
                  "hashes": {
                    "type": "object",
                    "properties": {
                      "model": {
                        "type": "string"
                      }
                    }
                  },
                  "negativePrompt": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "resources": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "…": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "sampler": {
                    "type": "string"
                  },
                  "seed": {
                    "type": "integer"
                  },
                  "steps": {
                    "type": "integer"
                  }
                }
              },
              "page_url": {
                "type": "null"
              },
              "post_id": {
                "type": "null"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "username": {
                "type": "null"
              },
              "width": {
                "type": "integer"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "model": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "poi": {
          "type": "boolean"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "model_id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "page_url": {
      "type": "string"
    },
    "published_at": {
      "type": "string"
    },
    "stats": {
      "type": "object",
      "properties": {
        "downloadCount": {
          "type": "integer"
        },
        "thumbsUpCount": {
          "type": "integer"
        }
      }
    },
    "status": {
      "type": "string"
    },
    "trained_words": {
      "type": "array",
      "items": {}
    },
    "updated_at": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/civitai/v1/model-version?id=130072&output=json' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "availability": null,
  "base_model": "SD 1.5",
  "base_model_type": "Standard",
  "cached": false,
  "created_at": "2023-07-31T08:00:27.426Z",
  "credits_used": 1,
  "description": "<p>The required VAE is already baked into the model.<br /><br />This version (Code_1284) is a fix for many issues of 5.0 (<u>artifacts, ugly…",
  "download_url": "https://civitai.com/api/download/models/130072",
  "files": [
    {
      "download_url": "https://civitai.com/api/download/models/130072?fileId=94300",
      "hashes": {
        "AutoV1": "F95D2E44",
        "AutoV2": "139AC005D4",
        "BLAKE3": "205A6ADCDEA77D98089653AA3372FB30EC38E93C46B79B0A9B00B2A07A704B7C",
        "CRC32": "38FEBCD3",
        "SHA256": "139AC005D4D1E33C6335F5651ABB3D2E4654DC0520AEDFEA07909BDD20435518",
        "SHA256_12": "139AC005D4D1"
      },
      "id": 94300,
      "metadata": {
        "format": "PickleTensor",
        "fp": "fp16",
        "size": "full"
      },
      "name": "realisticVisionV60B1_v51VAE_94300.ckpt",
      "primary": false,
      "scan": {
        "pickle": "Success",
        "scanned_at": "2023-07-31T08:27:30.586",
        "virus": "Success"
      },
      "size_kb": 4165379.6484375,
      "type": "Model"
    },
    {
      "download_url": "https://civitai.com/api/download/models/130072?fileId=94298",
      "hashes": {
        "AutoV1": "A0F13C83",
        "AutoV2": "15012C538F",
        "BLAKE3": "013543ADE69517662AC86E97A113B994679F33CD69B573D68C4D51F5457C9528",
        "CRC32": "FFE8B9E1",
        "SHA256": "15012C538F503CE2EBFC2C8547B268C75CCDAFF7A281DB55399940FF1D70E21D",
        "SHA256_12": "15012C538F50"
      },
      "id": 94298,
      "metadata": {
        "format": "SafeTensor",
        "fp": "fp16",
        "size": "pruned"
      },
      "name": "realisticVisionV60B1_v51VAE_94298.safetensors",
      "primary": true,
      "scan": {
        "pickle": "Success",
        "scanned_at": "2023-07-31T08:16:29.099",
        "virus": "Success"
      },
      "size_kb": 2082642.474609375,
      "type": "Model"
    },
    "… 2 more"
  ],
  "id": 130072,
  "images": [
    {
      "base_model": null,
      "created_at": null,
      "hash": "UMD+l7~qAcpJI;tR?a%M9aM{w]xFWBt6xuof",
      "height": 960,
      "id": null,
      "meta": {
        "Model": "realisticVisionV51",
        "Model hash": "ef76aa2332",
        "Size": "640x960",
        "VAE": "vae-ft-mse-840000-ema-pruned.safetensors",
        "VAE hash": "551eac7037",
        "Version": "v1.6.0",
        "cfgScale": 7,
        "hashes": {
          "model": "ef76aa2332"
        },
        "negativePrompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed…",
        "prompt": "RAW photo, face portrait photo of beautiful 26 y.o woman, cute face, wearing black dress, happy face, hard shadows, cinematic shot, dramatic…",
        "resources": [
          {
            "…": "3 fields"
          }
        ],
        "sampler": "DPM++ SDE Karras",
        "seed": 3898569358,
        "steps": 25
      },
      "page_url": null,
      "post_id": null,
      "type": "image",
      "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0dcee20e-415c-42c3-92bc-d596f9b45289/original=true/2375288.jpeg",
      "username": null,
      "width": 640
    },
    {
      "base_model": null,
      "created_at": null,
      "hash": "UEB{ie~V0L0L^*t79ZM{NGWqxaoMELR%xaoL",
      "height": 768,
      "id": null,
      "meta": {
        "Model": "Realistic_Vision_V5.1",
        "Model hash": "ef76aa2332",
        "Size": "640x768",
        "Version": "v1.5.1",
        "cfgScale": 7,
        "hashes": {
          "model": "ef76aa2332"
        },
        "negativePrompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed…",
        "prompt": "high quality, face portrait photo of 30 y.o european man, wearing black shirt, serious face, detailed face, skin pores, cinematic shot, dram…",
        "resources": [
          {
            "…": "3 fields"
          }
        ],
        "sampler": "DPM++ SDE Karras",
        "seed": 3776793451,
        "steps": 25
      },
      "page_url": null,
      "post_id": null,
      "type": "image",
      "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7052f043-d0ac-4893-936c-e07a62948726/original=true/2023636.jpeg",
      "username": null,
      "width": 640
    },
    "… 6 more"
  ],
  "model": {
    "name": "Realistic Vision V6.0 B1",
    "poi": false,
    "type": "Checkpoint"
  },
  "model_id": 4201,
  "name": "V5.1 (VAE)",
  "page_url": "https://civitai.com/models/4201?modelVersionId=130072",
  "published_at": "2023-07-31T08:27:16.052Z",
  "stats": {
    "downloadCount": 498415,
    "thumbsUpCount": 4626
  },
  "status": "Published",
  "trained_words": [],
  "updated_at": "2025-02-14T21:40:35.698Z"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/civitai/civitai-model-version-api/?offering=eb283232-ff11-448c-a840-334710d6fd64

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
