Skip to content
中文

List the genres Studio can write

Code Mode: praxis.studio.genres.list

HTTP: GET /studio/v1/genres

List the genre catalog so you can choose how a piece is structured before creating a draft. Each genre names its unit kinds, draft properties, deterministic checks and writing rules, and by default only the genres open today are returned. Read the chosen genre in full with studioGenresGet before the first write, because its kinds and limits decide what that draft accepts.

Signature

praxis.studio.genres.list(args?:{query?:{/** e.g. false */ include_unavailable?:boolean}}):Promise<{/** Every genre in the catalog, each with the kinds, properties and checks that a draft of it inherits. */ items:Array<{/** Genre key used when creating a draft and when reading this genre back; it also becomes the default key of the first draft made with it. e.g. "novel_long" */ key:string;/** Configuration version of the genre; a draft records the version it was created with so later rule changes stay visible. e.g. 1 */ version:number;/** Display name in Chinese, used by the Console and by todo text. e.g. "长篇小说" */ name:string;/** How much structure a draft of this genre requires; a free space genre only enforces what publishing needs. */ mode:"skeleton"|"space";/** Unit kinds the draft tree may use, each naming the kinds allowed directly beneath it. */ kinds:Array<{/** Kind key passed to units.create and used in template nodes. e.g. "chapter" */ key?:string;/** Display name of this level in Chinese, such as volume, chapter or scene. e.g. "章" */ label?:string;/** Kinds allowed directly beneath this one; an empty list makes it a leaf of the tree. */ children?:Array<string>;target_chars?:{/** Lower bound in characters; absent means no lower bound applies. e.g. 3000 */ min?:number;/** Upper bound in characters; absent means no upper bound applies. e.g. 5000 */ max?:number};target_seconds?:{/** Shortest allowed duration in whole seconds for one unit of this kind. e.g. 2 */ min?:number;/** Longest allowed duration in whole seconds for one unit of this kind. e.g. 15 */ max?:number};/** Whether the finished piece needs a heading for a unit of this kind; a required heading that is empty is reported as a warning. */ heading_in_rendition?:"required"|"optional"|"never"}>;/** Unit kinds allowed at the top level of a draft tree of this genre. */ top_kinds:Array<string>;/** What the points inside a unit intent are called here, such as beats, arguments, selling points or shot notes. e.g. "节拍" */ point_label:string;/** Draft properties this genre defines, such as a title with a length limit or a list of images. */ props:Array<{/** Property key written into the draft props object, such as title, tags or cover. e.g. "title" */ key?:string;/** Display name of the property in Chinese, shown in the Console editor. e.g. "书名" */ label?:string;/** Value shape of the property, which decides how the Console edits it and how the limit checks read it. */ type?:"text"|"tags"|"images"|"file"|"duration";/** Whether a rendition is refused while this property is empty; a missing required property is a todo of kind prop_missing. */ required?:boolean;/** Longest allowed text length in characters; absent means the genre sets no limit here. e.g. 30 */ max_chars?:number;/** Most allowed list entries for a tags or images property; absent means no count limit. e.g. 5 */ max_items?:number;/** Writing hint for the property, handed to the writer in the context pack rather than kept in a prompt. e.g. "痛点或结果 + emoji,带搜索关键词" */ hint?:string}>;/** Reference entry types this genre draws on, taken from the shared entry vocabulary. */ entry_types:Array<string>;/** Roles a unit link may carry in this genre, such as point-of-view character or main product. */ link_roles:Array<string>;/** Block types a unit body of this genre may contain. */ blocks:Array<string>;/** Human description of the expected length, such as the size of one chapter and of the whole piece. e.g. "章 3–5 千字;全书 20–100 万字" */ length:string;total_chars?:{/** Lower bound in characters; absent means no lower bound applies. e.g. 3000 */ min?:number;/** Upper bound in characters; absent means no upper bound applies. e.g. 5000 */ max?:number};total_seconds?:{/** Shortest allowed duration in whole seconds for one unit of this kind. e.g. 2 */ min?:number;/** Longest allowed duration in whole seconds for one unit of this kind. e.g. 15 */ max?:number};/** Deterministic checks the software runs for this genre, each reporting against a unit or a block. */ checks:Array<string>;/** Semantic review questions only a reader can answer; an agent writes its findings as review comments on the units. */ review:Array<string>;/** The writing guidance for this genre, kept short and paired with its reason, handed to the writer in the context pack. e.g. "用场景写,不用概述写。" */ writing_rules:string;/** Named banned-word lists the banned_words check applies, such as the Chinese advertising law list. */ banned_word_lists?:Array<string>;/** Platform keys this genre produces by default; passing this genre to the platform list returns exactly these. */ default_platforms:Array<string>;/** Theme key a new rendition of this genre starts with when the caller names no theme. e.g. "song-book" */ default_theme?:string;/** Keys of the built-in templates that can seed a draft of this genre. */ builtin_templates?:Array<string>;/** Console views this genre opens with, such as a tree or an outline table. */ default_views:Array<string>;/** Delivery stage that opened this genre; a value other than s3 means it is catalogued but a draft of it is still refused. */ available_from:"s3"|"s5"|"s7"}>}>;

Parameters

NameInTypeRequiredDescription
include_unavailablequerybooleannoSet to true to also list genres that are catalogued but not open yet; their available_from field says which delivery stage opens them. Leave it false to see only the genres a draft can be created with today.

Responses

StatusContent typesDescription
200application/jsonEvery selectable genre, each with its unit kinds, draft properties, checks and writing rules.
400application/jsonINVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call.
401application/jsonThe API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.