# Civitai model API

Look up Civitai models by ID or URL 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 identifier, source model type, creator account name, model-version identifier, and version base model for model catalogue, and version selection.

Documentation: https://openany.si/market/apis/civitai/civitai-model-api/?offering=e4cc8d3a-d19e-4019-8a04-d4a177e05dca
API ID: e4cc8d3a-d19e-4019-8a04-d4a177e05dca
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/civitai/v1/model
Page update time: 2026-12-03T02:45:54.604Z
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.158Z. 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 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 id or a civitai.com/models/<id> link."
        },
        "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."
        }
      },
      "required": [
        "id"
      ]
    },
    "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": "string"
    },
    "base_models": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cached": {
      "type": "boolean"
    },
    "creator": {
      "type": "object",
      "properties": {
        "image": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "credits_used": {
      "type": "integer"
    },
    "description": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "license": {
      "type": "object",
      "properties": {
        "allow_commercial_use": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allow_derivatives": {
          "type": "boolean"
        },
        "allow_different_license": {
          "type": "boolean"
        },
        "allow_no_credit": {
          "type": "boolean"
        }
      }
    },
    "minor": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "poi": {
      "type": "boolean"
    },
    "stats": {
      "type": "object",
      "properties": {
        "commentCount": {
          "type": "integer"
        },
        "downloadCount": {
          "type": "integer"
        },
        "thumbsDownCount": {
          "type": "integer"
        },
        "thumbsUpCount": {
          "type": "integer"
        },
        "tippedAmountCount": {
          "type": "integer"
        }
      }
    },
    "supports_generation": {
      "type": "boolean"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "type": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "versions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "availability": {
                "type": "string"
              },
              "base_model": {
                "type": "string"
              },
              "base_model_type": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "description": {
                "type": "null"
              },
              "download_url": {
                "type": "string"
              },
              "files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "download_url": {
                      "type": "string"
                    },
                    "hashes": {
                      "type": "object",
                      "properties": {
                        "…": {
                          "type": "string"
                        }
                      }
                    },
                    "id": {
                      "type": "integer"
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "…": {
                          "type": "string"
                        }
                      }
                    },
                    "name": {
                      "type": "string"
                    },
                    "primary": {
                      "type": "boolean"
                    },
                    "scan": {
                      "type": "object",
                      "properties": {
                        "…": {
                          "type": "string"
                        }
                      }
                    },
                    "size_kb": {
                      "type": "number"
                    },
                    "type": {
                      "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"
                        },
                        "page_url": {
                          "type": "null"
                        },
                        "post_id": {
                          "type": "null"
                        },
                        "type": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "username": {
                          "type": "null"
                        },
                        "width": {
                          "type": "integer"
                        }
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "model_id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "page_url": {
                "type": "string"
              },
              "published_at": {
                "type": "string"
              },
              "stats": {
                "type": "object",
                "properties": {
                  "downloadCount": {
                    "type": "integer"
                  },
                  "thumbsDownCount": {
                    "type": "integer"
                  },
                  "thumbsUpCount": {
                    "type": "integer"
                  }
                }
              },
              "status": {
                "type": "string"
              },
              "trained_words": {
                "type": "array",
                "items": {}
              },
              "updated_at": {
                "type": "null"
              }
            }
          },
          {
            "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?id=4201&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": "Public",
  "base_models": [
    "SD 1.5 Hyper",
    "SD 1.5"
  ],
  "cached": false,
  "creator": {
    "image": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/41ce091f-1006-491f-916d-873a9c80dfde/width=96/SG_161222.jpeg",
    "username": "SG_161222"
  },
  "credits_used": 1,
  "description": "<p><strong><span style=\"color:rgb(21, 170, 191)\">Check my exclusive models on Mage: </span></strong><a target=\"_blank\" rel=\"ugc\" href=\"https…",
  "id": 4201,
  "license": {
    "allow_commercial_use": [
      "Image",
      "RentCivit",
      "… 1 more"
    ],
    "allow_derivatives": true,
    "allow_different_license": false,
    "allow_no_credit": false
  },
  "minor": false,
  "name": "Realistic Vision V6.0 B1",
  "poi": false,
  "stats": {
    "commentCount": 790,
    "downloadCount": 2362462,
    "thumbsDownCount": 97,
    "thumbsUpCount": 52988,
    "tippedAmountCount": 115916
  },
  "supports_generation": true,
  "tags": [
    "photorealistic",
    "anatomical",
    "… 4 more"
  ],
  "type": "Checkpoint",
  "url": "https://civitai.com/models/4201",
  "versions": [
    {
      "availability": "Public",
      "base_model": "SD 1.5 Hyper",
      "base_model_type": "Standard",
      "created_at": "2024-05-12T06:04:22.202Z",
      "description": null,
      "download_url": "https://civitai.com/api/download/models/501240",
      "files": [
        {
          "download_url": "https://civitai.com/api/download/models/501240?fileId=418901",
          "hashes": {
            "…": "7 fields"
          },
          "id": 418901,
          "metadata": {
            "…": "3 fields"
          },
          "name": "realisticVisionV60B1_v51HyperVAE_418901.safetensors",
          "primary": true,
          "scan": {
            "…": "3 fields"
          },
          "size_kb": 2082642.474609375,
          "type": "Model"
        },
        {
          "download_url": "https://civitai.com/api/download/models/501240?fileId=418904",
          "hashes": {
            "…": "7 fields"
          },
          "id": 418904,
          "metadata": {
            "…": "3 fields"
          },
          "name": "realisticVisionV60B1_v51HyperVAE_418904.safetensors",
          "primary": false,
          "scan": {
            "…": "3 fields"
          },
          "size_kb": 4165133.80078125,
          "type": "Model"
        }
      ],
      "id": 501240,
      "images": [
        {
          "base_model": null,
          "created_at": null,
          "hash": "UADu}F9a00xb+sIW?uNG0NoL}?D*0gD*-Uxu",
          "height": 1536,
          "id": null,
          "page_url": null,
          "post_id": null,
          "type": "image",
          "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/1c65dc07-2e32-4e76-a0b7-458c450ff1ae/original=true/12221824.jpeg",
          "username": null,
          "width": 1024
        },
        {
          "base_model": null,
          "created_at": null,
          "hash": "ULC~|_~VtRt74.4oE1Vsbvf,aet8bExt%1WB",
          "height": 1536,
          "id": null,
          "page_url": null,
          "post_id": null,
          "type": "image",
          "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/9d8e6d7d-7a26-44b4-a02d-131f53fd5d77/original=true/12221845.jpeg",
          "username": null,
          "width": 1024
        },
        "… 14 more"
      ],
      "model_id": 4201,
      "name": "V5.1 Hyper (VAE)",
      "page_url": "https://civitai.com/models/4201?modelVersionId=501240",
      "published_at": "2024-05-12T06:24:13.109Z",
      "stats": {
        "downloadCount": 828312,
        "thumbsDownCount": 46,
        "thumbsUpCount": 12711
      },
      "status": "Published",
      "trained_words": [],
      "updated_at": null
    },
    {
      "availability": "Public",
      "base_model": "SD 1.5 Hyper",
      "base_model_type": "Inpainting",
      "created_at": "2024-05-12T06:48:50.525Z",
      "description": null,
      "download_url": "https://civitai.com/api/download/models/501286",
      "files": [
        {
          "download_url": "https://civitai.com/api/download/models/501286?fileId=418955",
          "hashes": {
            "…": "7 fields"
          },
          "id": 418955,
          "metadata": {
            "…": "3 fields"
          },
          "name": "realisticVisionV60B1_v51HyperInpaintVAE_418955.safetensors",
          "primary": true,
          "scan": {
            "…": "3 fields"
          },
          "size_kb": 2082695.26171875,
          "type": "Model"
        },
        {
          "download_url": "https://civitai.com/api/download/models/501286?fileId=418958",
          "hashes": {
            "…": "7 fields"
          },
          "id": 418958,
          "metadata": {
            "…": "3 fields"
          },
          "name": "realisticVisionV60B1_v51HyperInpaintVAE_418958.safetensors",
          "primary": false,
          "scan": {
            "…": "3 fields"
          },
          "size_kb": 4165238.15234375,
          "type": "Model"
        }
      ],
      "id": 501286,
      "images": [
        {
          "base_model": null,
          "created_at": null,
          "hash": "UCFYV|Ipl-9G~p.8_2-;x]s,MxRPM_MyaLM{",
          "height": 1536,
          "id": null,
          "page_url": null,
          "post_id": null,
          "type": "image",
          "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/14f129fe-ed7b-402e-be55-8a7988116a6f/original=true/12224341.jpeg",
          "username": null,
          "width": 1024
        }
      ],
      "model_id": 4201,
      "name": "V5.1 Hyper-Inpaint (VAE)",
      "page_url": "https://civitai.com/models/4201?modelVersionId=501286",
      "published_at": "2024-05-12T07:02:08.427Z",
      "stats": {
        "downloadCount": 58906,
        "thumbsDownCount": 2,
        "thumbsUpCount": 407
      },
      "status": "Published",
      "trained_words": [],
      "updated_at": null
    },
    "… 17 more"
  ]
}
```

## 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-api/?offering=e4cc8d3a-d19e-4019-8a04-d4a177e05dca

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