API Guide

Back to Gallery

Welcome to the AI Horde Styles CDN. This site automatically builds and hosts the prompt styles and preview images for the AI Horde community. Each style includes enriched metadata derived from the AI Horde model reference.

Quick Start: Lazy Loading (Recommended)

For the best performance, fetch the minimal index first, then load individual styles on demand.

Step 1 — Fetch the index

GET https://hordestyles.pages.dev/styles_min.json

Returns a sorted array of all style names. Lightweight — use this for search, filtering, and building a list UI.

["anime-portrait", "flux", "oil-painting", ...]

Step 2 — Fetch a style on demand

GET https://hordestyles.pages.dev/styles/{styleName}.json

Returns the full data for a single style. Fetch this when a user selects or hovers over a style.

// Example
GET https://hordestyles.pages.dev/styles/flux.json

Full Styles Bundle

If you need all styles at once (e.g. for server-side processing or offline use), fetch the complete bundle.

Endpoint

GET https://hordestyles.pages.dev/styles.json

Example Response

A dictionary where each key is the style name. Styles now include baseline, nsfw, and style fields derived from the AI Horde model reference.

{
  "flux": {
    "prompt": "{p}{np}",
    "model": "Flux.1-Schnell fp8 (Compact)",
    "steps": 4,
    "width": 1024,
    "height": 1024,
    "cfg_scale": 1,
    "karras": false,
    "sampler_name": "k_euler",
    "categories": [
      "featured",
      "flux-aspect-ratio"
    ],
    "baseline": "flux_1",
    "nsfw": false,
    "style": "generalist",
    "previews": {
      "person": "/images/flux_person.webp",
      "place": "/images/flux_place.webp",
      "thing": "/images/flux_thing.webp"
    }
  }
}

Style Fields

Preview Images

Inside each style, the previews object maps person, place, or thing to a relative image path. Construct the full URL by prepending the base domain:

const BASE_URL = "https://hordestyles.pages.dev";
const style = await fetch(BASE_URL + "/styles/flux.json").then(r => r.json());
const personImageUrl = BASE_URL + style.previews.person;

// Result:
// https://hordestyles.pages.dev/images/flux_person.webp

All images are highly optimized WebP files and cached heavily at the Cloudflare edge.

Other Endpoints