Developers
Research API
The prompt generator, tag suggestions and prompt linting are all HTTP endpoints. No key required.
Generate a prompt
Deterministic: the same query always returns the same JSON, which is why a generated prompt is shareable as a URL. This is the exact endpoint the generator page calls.
GET
/api/generatePublic- seed
- Integer. The same seed with the same slots and pins reproduces a result exactly.
- pins
- Comma-separated tags always included, in order. Up to 50.
- slots
- Enabled slots as id:lo-hi, comma-separated. Omitted slots are disabled. Counts are capped at 5. Slot ids: count · character · copyright · artist · creature · composition · pose · action · expression · hair · eyes · attire · accessories · props · background · setting · lighting · style · quality
- slotpins
- Per-slot pins as id~name|name, comma-separated. They count toward that slot's target and are never dropped.
- preview
- A model family. Biases sampling toward tags that family already has pictures for. A nudge, never a filter — coverage records what has been uploaded, not what a model can draw.
- lang
- Adds a `localized` field to each tag, carrying its name in that language. `zh-CN` or `ja`; anything else is ignored. The prompt itself stays in canonical Danbooru names.
curl "https://tags.latent.moe/api/generate\
?seed=123\
&pins=1girl,hatsune_miku\
&slots=composition:1-1,pose:1-2,expression:1-1,attire:1-3\
&slotpins=attire~school_uniform|gloves,pose~sitting"Returns seed, entries (each tag with its category) and slotOf, which maps every tag back to the slot that produced it — that is what lets a client group the output the way this site does.
Other endpoints
Used by the Latent gallery for prompt assistance; all are same-origin friendly and need no key.
- GET /api/v1/tags/suggest
- Danbooru tag autocomplete, optionally filtered by category and localized.
- POST /api/v1/prompts/lint
- Prompt diagnostics: unknown, deprecated and conflicting tags.
- GET /api/v1/groups
- The curated tag-group tree.
- GET /api/v1/coverage
- Which tags Latent can already show a picture for.