# Civitai AI Models API
> Live data from Civitai, the largest community for sharing AI image-generation models — Stable Diffusion checkpoints, LoRAs, embeddings, VAEs and more — served from the public Civitai API, no key, nothing stored. This is the AI-art creator-platform cut: which models the community is downloading and rating, who makes them and how each one is engaged with. The models endpoint lists and searches models by name, type and base model, sorted by downloads, rating, likes or newest, each with its creator, tags and engagement (downloads, thumbs-up, comments). The model endpoint returns a single model in full — its description, full stats, tags, base models, version count and commercial-use permissions. The creators endpoint lists the platform's model creators with their model counts. By default only safe-for-work models are returned; pass nsfw=true to include adult content. Track the AI-art model meta — what the community is building and downloading right now — as live JSON. This is the AI-model-community cut — distinct from the general ML-model-hub, the image-generation and the price/market APIs in the catalogue.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/civitai-api/..."
```

## Pricing
- **Free** (Free) — 25,000 calls/Mo, 3 req/s
- **Creator** ($7/Mo) — 275,000 calls/Mo, 10 req/s
- **Pro** ($21/Mo) — 1,100,000 calls/Mo, 28 req/s
- **Scale** ($49/Mo) — 3,600,000 calls/Mo, 60 req/s

## Endpoints

### Models

#### `GET /v1/models` — List and search AI models with engagement

**Parameters:**
- `query` (query, optional, string) — Search term Example: `realistic`
- `type` (query, optional, string) — Model type (Checkpoint, LORA, …) Example: `Checkpoint`
- `sort` (query, optional, string) — downloads, rating, newest or likes Example: `downloads`
- `limit` (query, optional, string) — Max results (1-50) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/civitai-api/v1/models?query=realistic&type=Checkpoint&sort=downloads&limit=20"
```

### Model

#### `GET /v1/model` — A single model in full

**Parameters:**
- `id` (query, required, string) — Model id Example: `4201`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/civitai-api/v1/model?id=4201"
```

### Creators

#### `GET /v1/creators` — Model creators with model counts

**Parameters:**
- `query` (query, optional, string) — Search creators
- `limit` (query, optional, string) — Max results (1-50) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/civitai-api/v1/creators?limit=25"
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/civitai-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/civitai-api
OpenAPI spec: https://www.oanor.com/api/civitai-api/openapi.json
