APIDataDeveloper

Civitai models API

Use the Civitai models API to retrieve model or version metadata and published resource information. Choose the documented selection using search terms (query), topic tag (tag); refine the result with source account username (username), model type filters (types). Inspect model versions and file metadata, compare base-model compatibility and locate published download references. Results are model-resource metadata and version references. Generation support flags describe the source model and do not execute inference, training or image generation. The detail page provides the supported parameters, request examples, available response examples and usage pricing for this operation.

Selected price
$0.002 / billing creditPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

Civitai models 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
Pricing
Connect your agent
On this page

Overview

Overview

Civitai models API

Use the Civitai models API to retrieve model or version metadata and published resource information. Choose the documented selection using search terms (query), topic tag (tag); refine the result with source account username (username), model type filters (types). Inspect model versions and file metadata, compare base-model compatibility and locate published download references. Results are model-resource metadata and version references. Generation support flags describe the source model and do not execute inference, training or image generation. The detail page provides the supported parameters, request examples, available response examples and usage pricing for this operation.

Civitai models API

Purpose and returned data

Use the Civitai models API to retrieve model or version metadata and published resource information.

Inspect model versions and file metadata, compare base-model compatibility and locate published download references.

Returned field references: models.

Input selection and parameters

Choose the documented selection using search terms (query), topic tag (tag); refine the result with source account username (username), model type filters (types).

The table preserves the source’s parameter wording in English; names and wire values retain their native spelling. Product-specific output restrictions are included.

ParameterTypeRequiredMeaning and constraints
querystringNoKeywords (model name).
tagstringNoA tag, e.g. character or style.
usernamestringNoCreator username.
typesstringNoOne or more model types, comma-separated.
sortstringNoHot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest or Recently Added. Allowed: Hot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest, Recently Added.
periodstringNoDay, Week, Month, Year or AllTime (for the sort). Allowed: Day, Week, Month, Year, AllTime.
base_modelsstringNoBase models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5).
allow_commercial_usestringNoNone, Image, RentCivit, Rent, Sell or SellMerge (comma-separated).
allow_no_creditbooleanNotrue/false: use without crediting the creator.
allow_derivativesbooleanNotrue/false: merges and derivatives allowed.
allow_different_licensesbooleanNotrue/false: derivatives may use another licence.
supports_generationbooleanNotrue/false: can be run on the site's generator.
primary_file_onlybooleanNotrue: only each version's primary file.
idsstringNoModel ids, comma-separated.
limitintegerNoModels per page (1-10, default 10).
cursorstringNonext_cursor from the previous page.
include_nsfwbooleanNoOpt in to adult content: true also returns adult models and images, each with its content rating (nsfw, nsfw_level). Default off.
rawstringNo0 leaves out the bulky raw source blocks (often 10-30x smaller). Allowed: 0, 1.
fieldsstringNoComma-separated fields to return, e.g. posts.id,posts.title. Call metadata is always included.
freshstringNo1 skips the 24-hour cache and fetches live. Allowed: 1.
outputstringNoJSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed. Allowed: json.
recordsstringNoNative CSV/NDJSON record selector; it has no effect on this JSON-only product.

Using OpenAny

Send this request to the OpenAny gateway with your OpenAny API key in the Authorization header. The query values below match the paired request example.

OpenAny request example

bash
curl "https://api.openany.si/v1/agent-apis/apish/civitai/v1/models?query=anime&output=json" \
  -H "Authorization: Bearer <OPENANY_API_KEY>"

This command illustrates the OpenAny request format. The response example below retains its stated provenance; it is not evidence that this gateway request was executed.

Response example

The supplier publishes a shortened response: lists and long text may be truncated, and raw blocks are omitted. The example panel preserves that published payload exactly; it is not a complete response or a verified OpenAny call.

Inspect the paired request and response in the Examples panel; that request fixes the filters, selected fields and pagination used for its response.

Usage and price

The price is USD 0.002 per actual credit reported in credits_used, with no fixed call fee. A zero-credit response has zero usage cost. This operation currently lists 1 credit(s) per call; up to USD 0.002 is reserved, and the final cost follows reported credits within that limit. Valid empty results, cache hits and lookups that return no match may still consume credits. Calls refused before running and supplier-side failures are free according to the source billing guide.

Coverage and limits

Results are model-resource metadata and version references. Generation support flags describe the source model and do not execute inference, training or image generation.

Continue with the returned continuation value using these declared inputs: cursor. Stop when the corresponding continuation is null; each subsequent page is a separate request.

Requests have a 120-second time budget and an 8 MiB response limit. raw=0 omits bulky raw blocks; fields selects fields while retaining call metadata; fresh=1 bypasses the usual 24-hour cache. This product accepts only JSON output; CSV and NDJSON are not exposed.

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Optional parameters (22)
Keywords (model name).
A tag, e.g. character or style.
Creator username.
One or more model types, comma-separated.
Hot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest or Recently Added.
Day, Week, Month, Year or AllTime (for the sort).
Base models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5).
None, Image, RentCivit, Rent, Sell or SellMerge (comma-separated).
true/false: use without crediting the creator.
true/false: merges and derivatives allowed.
true/false: derivatives may use another licence.
true/false: can be run on the site's generator.
true: only each version's primary file.
Model ids, comma-separated.
Models per page (1-10, default 10).
`next_cursor` from the previous page.
Opt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off.
0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
1 skips the 24-hour cache and fetches live.
JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.
Native CSV/NDJSON record selector; it has no effect on this JSON-only product.

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"
}

Response result

Response structure

Inferred from examples
  • applied_filtersobject
    • querystring
  • cachedboolean
  • countinteger
  • credits_usedinteger
  • models(object | string)[]
    • availabilitystring
    • base_modelsstring[]
    • creatorobject
      • imagenull
      • usernamestring
    • descriptionstring
    • idinteger
    • licenseobject
      • allow_commercial_useunknown[]
      • allow_derivativesboolean
      • allow_different_licenseboolean
      • allow_no_creditboolean
    • minorboolean
    • namestring
    • poiboolean
    • statsobject
      • commentCountinteger
      • downloadCountinteger
      • thumbsDownCountinteger
      • thumbsUpCountinteger
      • tippedAmountCountinteger
    • supports_generationboolean
    • tagsstring[]
    • typestring
    • urlstring
    • versions(object | string)[]
      • availabilitystring
      • base_modelstring
      • base_model_typestring
      • created_atnull
      • descriptionnull | string
      • download_urlstring
      • filesobject[]
        • …string
      • idinteger
      • images(object | string)[]
        • …string
      • model_idinteger
      • namestring
      • page_urlstring
      • published_atstring
      • statsobject
        • …string
      • statusnull
      • trained_wordsstring[]
      • updated_atnull
  • next_cursorstring
  • querystring

Sellers

SellerPricingRequests · 30dPerformanceAccess
apishCurrent
Civitai models API · GET · View API reference
$0.002 / billing credit—
—successP50—
Loading...
Selected pricing · apishUSD / billing credit
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: 2. 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
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'

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
queryURL query parametersquerystringNoKeywords (model name).
tagURL query parametersquerystringNoA tag, e.g. character or style.
usernameURL query parametersquerystringNoCreator username.
typesURL query parametersquerystringNoOne or more model types, comma-separated.
sortURL query parametersquerystringNoHot, 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"

periodURL query parametersquerystringNoDay, Week, Month, Year or AllTime (for the sort).

enum: "Day", "Week", "Month", "Year", "AllTime"

base_modelsURL query parametersquerystringNoBase models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5).
allow_commercial_useURL query parametersquerystringNoNone, Image, RentCivit, Rent, Sell or SellMerge (comma-separated).
allow_no_creditURL query parametersquerybooleanNotrue/false: use without crediting the creator.
allow_derivativesURL query parametersquerybooleanNotrue/false: merges and derivatives allowed.
allow_different_licensesURL query parametersquerybooleanNotrue/false: derivatives may use another licence.
supports_generationURL query parametersquerybooleanNotrue/false: can be run on the site's generator.
primary_file_onlyURL query parametersquerybooleanNotrue: only each version's primary file.
idsURL query parametersquerystringNoModel ids, comma-separated.
limitURL query parametersqueryintegerNoModels per page (1-10, default 10).
cursorURL query parametersquerystringNo`next_cursor` from the previous page.
include_nsfwURL query parametersquerybooleanNoOpt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off.
rawURL query parametersquerystringNo0 leaves out the bulky `raw` source blocks (often 10-30x smaller).

enum: "0", "1"

fieldsURL query parametersquerystringNoComma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
freshURL query parametersquerystringNo1 skips the 24-hour cache and fetches live.

enum: "1"

outputURL query parametersquerystringNoJSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.

enum: "json"

recordsURL query parametersquerystringNoNative 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.

Sample response

Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.

Official example · Official documentation response · Supplier-tr
{
  "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"
}

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 itemPriceMetering sourceWhenQuantity limit
Actual API.SH credits consumed$0.002000 / billing creditResponse · /credits_used · Numeric valueAlways1 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.

View API Markdown
API Markdown
# Civitai models API

Use the Civitai models API to retrieve model or version metadata and published resource information. Choose the documented selection using search terms (query), topic tag (tag); refine the result with source account username (username), model type filters (types). Inspect model versions and file metadata, compare base-model compatibility and locate published download references. Results are model-resource metadata and version references. Generation support flags describe the source model and do not execute inference, training or image generation. The detail page provides the supported parameters, request examples, available response examples and usage pricing for this operation.
## Available implementations
apish · Civitai models API: https://openany.si/markets/apis/capabilities/civitai-models-api?offering=7d1edd46-9956-40d4-a360-53897c353485 · $0.002 / billing credit

## Selected API contract
Documentation: https://openany.si/apis/7d1edd46-9956-40d4-a360-53897c353485
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/civitai/v1/models
Price: $0.002 / billing credit
Provider: apish
Contract revision: 2
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.

Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.

## Prepared request
```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'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "Civitai models API",
  "endpoint": "https://api.openany.si/v1/agent-apis/apish/civitai/v1/models",
  "method": "GET",
  "content_type": "none",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "description": "Keywords (model name).",
      "location": "query",
      "name": "query",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "A tag, e.g. character or style.",
      "location": "query",
      "name": "tag",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Creator username.",
      "location": "query",
      "name": "username",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "One or more model types, comma-separated.",
      "location": "query",
      "name": "types",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Hot, Highest Rated, Most Downloaded, Most Liked, Most Discussed, Most Collected, Most Images, Newest, Oldest or Recently Added.",
      "enum_values": [
        "Hot",
        "Highest Rated",
        "Most Downloaded",
        "Most Liked",
        "Most Discussed",
        "Most Collected",
        "Most Images",
        "Newest",
        "Oldest",
        "Recently Added"
      ],
      "location": "query",
      "name": "sort",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Day, Week, Month, Year or AllTime (for the sort).",
      "enum_values": [
        "Day",
        "Week",
        "Month",
        "Year",
        "AllTime"
      ],
      "location": "query",
      "name": "period",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Base models, comma-separated (e.g. SDXL 1.0, Pony, Flux.1 D, SD 1.5).",
      "location": "query",
      "name": "base_models",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "None, Image, RentCivit, Rent, Sell or SellMerge (comma-separated).",
      "location": "query",
      "name": "allow_commercial_use",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "true/false: use without crediting the creator.",
      "location": "query",
      "name": "allow_no_credit",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "true/false: merges and derivatives allowed.",
      "location": "query",
      "name": "allow_derivatives",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "true/false: derivatives may use another licence.",
      "location": "query",
      "name": "allow_different_licenses",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "true/false: can be run on the site's generator.",
      "location": "query",
      "name": "supports_generation",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "true: only each version's primary file.",
      "location": "query",
      "name": "primary_file_only",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "Model ids, comma-separated.",
      "location": "query",
      "name": "ids",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Models per page (1-10, default 10).",
      "location": "query",
      "name": "limit",
      "nullable": false,
      "required": false,
      "type": "integer"
    },
    {
      "description": "`next_cursor` from the previous page.",
      "location": "query",
      "name": "cursor",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Opt in to adult content: `true` also returns adult models and images, each with its content rating (`nsfw`, `nsfw_level`). Default off.",
      "location": "query",
      "name": "include_nsfw",
      "nullable": false,
      "required": false,
      "type": "boolean"
    },
    {
      "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
      "enum_values": [
        "0",
        "1"
      ],
      "location": "query",
      "name": "raw",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.",
      "location": "query",
      "name": "fields",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "1 skips the 24-hour cache and fetches live.",
      "enum_values": [
        "1"
      ],
      "location": "query",
      "name": "fresh",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
      "enum_values": [
        "json"
      ],
      "location": "query",
      "name": "output",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product.",
      "location": "query",
      "name": "records",
      "nullable": false,
      "required": false,
      "type": "string"
    }
  ],
  "billing": {
    "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": []
    }
  },
  "examples": [
    {
      "http_status": 200,
      "name": "Official example · Official documentation response · Supplier-tr",
      "request": {
        "body": null,
        "headers": {},
        "path": {},
        "query": {
          "output": "json",
          "query": "anime"
        }
      },
      "response_body": {
        "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

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. 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 · cURL
    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'
  3. 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"
    }

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use Civitai models API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.