Civitai Model Search 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.
- Selected price
- $0.002 / billing creditPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
Civitai Model Search API
Prepare your request, then continue with your agent.
Pricing
$0.002 / billing credit
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
- Provider
- API
- Pricing
On this page
Overview
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.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Choose the lookup or search inputs described below. Optional: query, tag, username, types, sort, period, base_models, allow_commercial_use, allow_no_credit, allow_derivatives, allow_different_licenses, supports_generation, primary_file_only, ids, limit, cursor, include_nsfw. JSON output; fresh=1 bypasses cache and raw=0 omits raw source blocks. |
| Selected implementation | apish · Civitai models API |
| Billing | See the pricing area for the selected implementation and request options |
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 |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/apish/civitai/v1/models \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
--data-urlencode output=json \
--data-urlencode query=anime
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published Civitai Model Search API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
apishCurrent Civitai models API · GET · View API reference | $0.002 / billing credit | 0 | —successP50— |
- Pricing
- $0.002
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/apish/civitai/v1/models- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
query | URL query parametersquery | string | No | Keywords (model name). |
tag | URL query parametersquery | string | No | A tag, e.g. character or style. |
username | URL query parametersquery | string | No | Creator username. |
types | URL query parametersquery | string | No | One or more model types, comma-separated. |
sort | URL query parametersquery | string | No | 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 | URL query parametersquery | string | No | Day, Week, Month, Year or AllTime (for the sort). enum: "Day", "Week", "Month", "Year", "AllTime" |
base_models | URL query parametersquery | string | No | Base models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5). |
allow_commercial_use | URL query parametersquery | string | No | None, Image, RentCivit, Rent, Sell or SellMerge (comma-separated). |
allow_no_credit | URL query parametersquery | boolean | No | true/false: use without crediting the creator. |
allow_derivatives | URL query parametersquery | boolean | No | true/false: merges and derivatives allowed. |
allow_different_licenses | URL query parametersquery | boolean | No | true/false: derivatives may use another licence. |
supports_generation | URL query parametersquery | boolean | No | true/false: can be run on the site's generator. |
primary_file_only | URL query parametersquery | boolean | No | true: only each version's primary file. |
ids | URL query parametersquery | string | No | Model ids, comma-separated. |
limit | URL query parametersquery | integer | No | Models per page (1-10, default 10). |
cursor | URL query parametersquery | string | No | `next_cursor` from the previous page. |
include_nsfw | URL query parametersquery | boolean | No | Opt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off. |
raw | URL query parametersquery | string | No | 0 leaves out the bulky `raw` source blocks (often 10-30x smaller). enum: "0", "1" |
fields | URL query parametersquery | string | No | Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included. |
fresh | URL query parametersquery | string | No | 1 skips the 24-hour cache and fetches live. enum: "1" |
output | URL query parametersquery | string | No | JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed. enum: "json" |
records | URL query parametersquery | string | No | Native CSV/NDJSON record selector; it has no effect on this JSON-only product. |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
applied_filtersobjectquerystring
cachedbooleancountintegercredits_usedintegermodels(object | string)[]availabilitystringbase_modelsstring[]creatorobjectimagenullusernamestring
descriptionstringidintegerlicenseobjectallow_commercial_useunknown[]allow_derivativesbooleanallow_different_licensebooleanallow_no_creditboolean
minorbooleannamestringpoibooleanstatsobjectcommentCountintegerdownloadCountintegerthumbsDownCountintegerthumbsUpCountintegertippedAmountCountinteger
supports_generationbooleantagsstring[]typestringurlstringversions(object | string)[]availabilitystringbase_modelstringbase_model_typestringcreated_atnulldescriptionnull | stringdownload_urlstringfilesobject[]…string
idintegerimages(object | string)[]…string
model_idintegernamestringpage_urlstringpublished_atstringstatsobject…string
statusnulltrained_wordsstring[]updated_atnull
next_cursorstringquerystring
Composite rule pricing
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.
| Fee item | Price | Metering source | When | Quantity limit |
|---|---|---|---|---|
| Actual API.SH credits consumed | $0.002000 / billing credit | Response · /credits_used · Numeric value | Always | 1 billing credit · Decimal places: 0 |
Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.002000.
Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.
Pricing parameters and defaults
[]
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example · Official documentation response · Supplier-tr
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 22
Review these request fields before running. Keep the published provider and request method unchanged.
query- Keywords (model name).
tag- A tag, e.g. character or style.
username- Creator username.
types- One or more model types, comma-separated.
sort- Hot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest or Recently Added.
period- Day, Week, Month, Year or AllTime (for the sort).
base_models- Base models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5).
allow_commercial_use- None, Image, RentCivit, Rent, Sell or SellMerge (comma-separated).
allow_no_credit- true/false: use without crediting the creator.
allow_derivatives- true/false: merges and derivatives allowed.
allow_different_licenses- true/false: derivatives may use another licence.
supports_generation- true/false: can be run on the site's generator.
primary_file_only- true: only each version's primary file.
ids- Model ids, comma-separated.
limit- Models per page (1-10, default 10).
cursor- `next_cursor` from the previous page.
include_nsfw- Opt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off.
raw- 0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
fields- Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
fresh- 1 skips the 24-hour cache and fetches live.
output- JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.
records- Native CSV/NDJSON record selector; it has no effect on this JSON-only product.
Terminal · cURLcurl \ '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'Check the response
Sample response · Documented HTTP 200
Sample response{ "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" }