# Civitai models API

Search Civitai models by keyword, creator, type and base model via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, query, and retrieve structured data including model identifier, source model type, version base model, source permission flags, and resolved search filters for filtered catalogue, and file selection.

Documentation: https://openany.si/civitai/civitai-models-api/7d1edd46-9956-40d4-a360-53897c353485/
API ID: 7d1edd46-9956-40d4-a360-53897c353485
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/civitai/v1/models
Page update time: 2026-12-03T02:45:54.626Z
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.
Contract update time: 2026-12-03T02:45:53.295Z. 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": []
  }
}
```

## Usage and limits
## Civitai Model Search API

Combine query, tag, username, types and base\_models with documented permission filters. limit bounds the page and cursor continues it; source license flags and supports\_generation remain metadata, not an inference or licensing service.

## What You Can Build

- **Filtered catalogue**: Retain resolved filters alongside model and version identities.
- **File selection**: Use primary\_file\_only to narrow each version's returned files when needed.

## Returned Data

| Field | Meaning |
| --- | --- |
| `models[].id` | Model identifier |
| `models[].type` | Source model type |
| `models[].versions[].base_model` | Version base model |
| `models[].license` | Source permission flags |
| `applied_filters` | Resolved search filters |
| `next_cursor` | Continuation cursor |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Civitai models 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": {
        "query": {
          "type": "string",
          "description": "Keywords (model name)."
        },
        "tag": {
          "type": "string",
          "description": "A tag, e.g. character or style."
        },
        "username": {
          "type": "string",
          "description": "Creator username."
        },
        "types": {
          "type": "string",
          "description": "One or more model types, comma-separated."
        },
        "sort": {
          "type": "string",
          "description": "Hot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest or Recently Added.",
          "enum": [
            "Hot",
            "Highest Rated",
            "Most Downloaded",
            "Most Liked",
            "Most Discussed",
            "Most Collected",
            "Most Images",
            "Newest",
            "Oldest",
            "Recently Added"
          ]
        },
        "period": {
          "type": "string",
          "description": "Day, Week, Month, Year or AllTime (for the sort).",
          "enum": [
            "Day",
            "Week",
            "Month",
            "Year",
            "AllTime"
          ]
        },
        "base_models": {
          "type": "string",
          "description": "Base models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5)."
        },
        "allow_commercial_use": {
          "type": "string",
          "description": "None, Image, RentCivit, Rent, Sell or SellMerge (comma-separated)."
        },
        "allow_no_credit": {
          "type": "boolean",
          "description": "true/false: use without crediting the creator."
        },
        "allow_derivatives": {
          "type": "boolean",
          "description": "true/false: merges and derivatives allowed."
        },
        "allow_different_licenses": {
          "type": "boolean",
          "description": "true/false: derivatives may use another licence."
        },
        "supports_generation": {
          "type": "boolean",
          "description": "true/false: can be run on the site's generator."
        },
        "primary_file_only": {
          "type": "boolean",
          "description": "true: only each version's primary file."
        },
        "ids": {
          "type": "string",
          "description": "Model ids, comma-separated."
        },
        "limit": {
          "type": "integer",
          "description": "Models per page (1-10, default 10)."
        },
        "cursor": {
          "type": "string",
          "description": "`next_cursor` from the previous page."
        },
        "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": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "models": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "availability": {
                "type": "string"
              },
              "base_models": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "creator": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "null"
                  },
                  "username": {
                    "type": "string"
                  }
                }
              },
              "description": {
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "license": {
                "type": "object",
                "properties": {
                  "allow_commercial_use": {
                    "type": "array",
                    "items": {}
                  },
                  "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": "null"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "download_url": {
                          "type": "string"
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "…": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "id": {
                          "type": "integer"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "…": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "string"
                              }
                            ]
                          }
                        },
                        "model_id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "page_url": {
                          "type": "string"
                        },
                        "published_at": {
                          "type": "string"
                        },
                        "stats": {
                          "type": "object",
                          "properties": {
                            "…": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "null"
                        },
                        "trained_words": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "updated_at": {
                          "type": "null"
                        }
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "next_cursor": {
      "type": "string"
    },
    "query": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/civitai/v1/models?output=json&query=anime' \
  -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
{
  "applied_filters": {
    "query": "anime"
  },
  "cached": false,
  "count": 10,
  "credits_used": 1,
  "models": [
    {
      "availability": "Public",
      "base_models": [
        "SD 1.5"
      ],
      "creator": {
        "image": null,
        "username": "CyberAIchemist"
      },
      "description": "<h2>Update information</h2><p></p><p>V3.0 updated. Fine-tuned LoRA to improve the effects of generating characters with complex body limbs a…",
      "id": 16014,
      "license": {
        "allow_commercial_use": [],
        "allow_derivatives": true,
        "allow_different_license": true,
        "allow_no_credit": true
      },
      "minor": false,
      "name": "Anime Lineart / Manga-like (线稿/線画/マンガ風/漫画风) Style",
      "poi": false,
      "stats": {
        "commentCount": 0,
        "downloadCount": 208327,
        "thumbsDownCount": 5,
        "thumbsUpCount": 21439,
        "tippedAmountCount": 1043
      },
      "supports_generation": false,
      "tags": [
        "lineart",
        "art style",
        "… 10 more"
      ],
      "type": "LORA",
      "url": "https://civitai.com/models/16014",
      "versions": [
        {
          "availability": "Public",
          "base_model": "SD 1.5",
          "base_model_type": "Standard",
          "created_at": null,
          "description": null,
          "download_url": "https://civitai.com/api/download/models/28907",
          "files": [
            {
              "…": "9 fields"
            }
          ],
          "id": 28907,
          "images": [
            {
              "…": "11 fields"
            },
            {
              "…": "11 fields"
            },
            "… 14 more"
          ],
          "model_id": 16014,
          "name": "v3.0 manga-like",
          "page_url": "https://civitai.com/models/16014?modelVersionId=28907",
          "published_at": "2023-03-25T13:39:23.464Z",
          "stats": {
            "…": "3 fields"
          },
          "status": null,
          "trained_words": [
            "lineart, monochrome"
          ],
          "updated_at": null
        },
        {
          "availability": "Public",
          "base_model": "SD 1.5",
          "base_model_type": "Standard",
          "created_at": null,
          "description": "<p>V2.0 is updated! Trained with offset noise, and all demos are generated with Anything V4.5 base model and orange mix VAE.</p><p>What this…",
          "download_url": "https://civitai.com/api/download/models/19075",
          "files": [
            {
              "…": "9 fields"
            }
          ],
          "id": 19075,
          "images": [
            {
              "…": "11 fields"
            },
            {
              "…": "11 fields"
            },
            "… 14 more"
          ],
          "model_id": 16014,
          "name": "v2.0 offset",
          "page_url": "https://civitai.com/models/16014?modelVersionId=19075",
          "published_at": "2023-03-05T20:00:31.679Z",
          "stats": {
            "…": "3 fields"
          },
          "status": null,
          "trained_words": [
            "monochrome",
            "lineart"
          ],
          "updated_at": null
        },
        "… 1 more"
      ]
    },
    {
      "availability": "Public",
      "base_models": [
        "SD 1.5"
      ],
      "creator": {
        "image": null,
        "username": "CyberAIchemist"
      },
      "description": "<p>Trained on Phantom Star illustrations.</p><p>V3.1 updated. Improve consistency. Support for more varied backgrounds (use <code>{} backgro…",
      "id": 11177,
      "license": {
        "allow_commercial_use": [],
        "allow_derivatives": true,
        "allow_different_license": true,
        "allow_no_credit": true
      },
      "minor": false,
      "name": "Anime Tarot Card Art Style LoRA (塔罗牌/タロットカード)",
      "poi": false,
      "stats": {
        "commentCount": 0,
        "downloadCount": 89782,
        "thumbsDownCount": 2,
        "thumbsUpCount": 13477,
        "tippedAmountCount": 524
      },
      "supports_generation": false,
      "tags": [
        "illustration",
        "style",
        "… 4 more"
      ],
      "type": "LORA",
      "url": "https://civitai.com/models/11177",
      "versions": [
        {
          "availability": "Public",
          "base_model": "SD 1.5",
          "base_model_type": "Standard",
          "created_at": null,
          "description": "<p>Improve performance</p>",
          "download_url": "https://civitai.com/api/download/models/28609",
          "files": [
            {
              "…": "9 fields"
            }
          ],
          "id": 28609,
          "images": [
            {
              "…": "11 fields"
            },
            {
              "…": "11 fields"
            },
            "… 7 more"
          ],
          "model_id": 11177,
          "name": "v3.1",
          "page_url": "https://civitai.com/models/11177?modelVersionId=28609",
          "published_at": "2023-03-24T22:12:16.903Z",
          "stats": {
            "…": "3 fields"
          },
          "status": null,
          "trained_words": [],
          "updated_at": null
        },
        {
          "availability": "Public",
          "base_model": "SD 1.5",
          "base_model_type": "Standard",
          "created_at": null,
          "description": "<p>V3.0 updated. Support for more varied backgrounds (use <code>{} background</code> to set). You can use it without any additional prompts,…",
          "download_url": "https://civitai.com/api/download/models/28248",
          "files": [
            {
              "…": "9 fields"
            }
          ],
          "id": 28248,
          "images": [
            {
              "…": "11 fields"
            },
            {
              "…": "11 fields"
            },
            "… 13 more"
          ],
          "model_id": 11177,
          "name": "v3.0",
          "page_url": "https://civitai.com/models/11177?modelVersionId=28248",
          "published_at": "2023-03-24T06:16:39.064Z",
          "stats": {
            "…": "3 fields"
          },
          "status": null,
          "trained_words": [
            "tarot"
          ],
          "updated_at": null
        },
        "… 2 more"
      ]
    },
    "… 8 more"
  ],
  "next_cursor": "10",
  "query": "anime"
}
```

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

## Common questions
### How do I paginate?
limit accepts 1–10 models, default 10. Omit cursor initially and pass next_cursor for subsequent pages.

### Can I filter base models and creator?
Yes. Use base_models with documented comma-separated values and username for a creator account.

### What do permission filters select?
They match source flags such as allow_commercial_use or allow_derivatives. Keep those flags with each result and review the exact model and base-model context.

### Does supports_generation run a model?
No. It filters source-site generation support. This implementation returns JSON metadata; include_nsfw remains off by default.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/civitai/civitai-models-api/7d1edd46-9956-40d4-a360-53897c353485/

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