{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Art Prompt & Model Trend Tracker",
    "description": "Track trending AI art models, LoRAs, and prompt engineering techniques from Civitai. Get generation parameters, trigger words, and style recipes behind popular images. SFW-only by default. Snapshot or monitor mode for new-trend alerts.",
    "version": "0.0",
    "x-build-id": "VPdf5GKh38hQXlaNa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dsh-org~ai-art-prompt-model-trend-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dsh-org-ai-art-prompt-model-trend-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dsh-org~ai-art-prompt-model-trend-tracker/runs": {
      "post": {
        "operationId": "runs-sync-dsh-org-ai-art-prompt-model-trend-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dsh-org~ai-art-prompt-model-trend-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-dsh-org-ai-art-prompt-model-trend-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "dataType": {
            "title": "Data type",
            "enum": [
              "models",
              "prompts",
              "both"
            ],
            "type": "string",
            "description": "What to pull. models = trending models & LoRAs. prompts = trending prompts (with generation parameters) from popular images. both = run both in one run.",
            "default": "both"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "monitor"
            ],
            "type": "string",
            "description": "snapshot = return the current trending results (no state). monitor = on the first run store the trending IDs, then on later runs output ONLY entries that are NEW to the trending list since the previous run (ideal for scheduled daily/weekly alerts).",
            "default": "snapshot"
          },
          "trendPeriod": {
            "title": "Trend period",
            "enum": [
              "Day",
              "Week",
              "Month"
            ],
            "type": "string",
            "description": "Time window used to rank trending results.",
            "default": "Week"
          },
          "limit": {
            "title": "Limit per data type",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of results per data type (models and prompts counted separately). Civitai caps a single page at 100 models / 200 images; higher limits are paged via cursors.",
            "default": 100
          },
          "modelTypes": {
            "title": "Model types filter",
            "type": "array",
            "description": "Restrict trending models to these Civitai model types. Leave empty for all types. (Only applies to the 'models' data type.)",
            "items": {
              "type": "string",
              "enum": [
                "Checkpoint",
                "LORA",
                "LoCon",
                "TextualInversion",
                "Hypernetwork",
                "AestheticGradient",
                "Controlnet",
                "Upscaler",
                "MotionModule",
                "VAE",
                "Poses",
                "Wildcards",
                "Workflows",
                "Other"
              ]
            },
            "default": []
          },
          "baseModels": {
            "title": "Base models filter",
            "type": "array",
            "description": "Restrict trending models to these base models, e.g. \"SDXL 1.0\", \"Flux.1 D\", \"Pony\", \"SD 1.5\". Leave empty for all. (Only applies to the 'models' data type.)",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortModels": {
            "title": "Sort models by",
            "enum": [
              "Most Downloaded",
              "Highest Rated",
              "Newest"
            ],
            "type": "string",
            "description": "Ranking used for the 'models' data type.",
            "default": "Most Downloaded"
          },
          "sortPrompts": {
            "title": "Sort prompts by",
            "enum": [
              "Most Reactions",
              "Most Comments",
              "Newest"
            ],
            "type": "string",
            "description": "Ranking used for the 'prompts' data type (based on the Civitai images endpoint).",
            "default": "Most Reactions"
          },
          "tag": {
            "title": "Tag filter (optional)",
            "type": "string",
            "description": "Optional tag to filter trending models by (e.g. \"anime\", \"photorealistic\", \"style\")."
          },
          "includeGenerationParams": {
            "title": "Include generation parameters",
            "type": "boolean",
            "description": "Include steps, sampler, CFG scale, seed and size in each trending prompt result. Turn off for a leaner prompt-text-only output.",
            "default": true
          },
          "includeNsfw": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "OFF by default — results are filtered to SFW only (server-side request filter plus a client-side safety check). Turn ON to include NSFW-tagged models and images. Default output is always SFW.",
            "default": false
          },
          "civitaiApiToken": {
            "title": "Civitai API token (optional)",
            "type": "string",
            "description": "Optional. Civitai public read endpoints generally work without a token, but some endpoints/accounts may require one. Create a token at civitai.com/user/account. Stored securely."
          },
          "requestDelayMs": {
            "title": "Delay between API requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Throttle between Civitai API requests to respect rate limits. Increase if you see HTTP 429 responses.",
            "default": 500
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}