Read one genre with its built-in templates
Code Mode: praxis.studio.genres.retrieve
HTTP: GET /studio/v1/genres/{genre}
Read the full rules of one genre: its unit kinds and what each may contain, the draft properties with their limits, the deterministic checks the software runs, the semantic review list, and the built-in templates that can seed a draft. Ask for this before creating a draft of that genre, and again when a write is refused for an unknown kind, a property limit or a block type the genre does not allow.
Signature
praxis.studio.genres.retrieve(args:{path:{/** e.g. "novel_long" */ genre:string}}):Promise<({/** 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"})&({/** Built-in templates that seed a draft of this genre, each with its starting node tree and guidance. */ templates?:Array<{/** Template id for a saved template, or the built-in key when builtin is true. e.g. "three-act" */ id?:string;/** Genre key whose drafts this template may seed; a template of another genre is refused. e.g. "novel_long" */ genre?:string;/** Display name of the template, shown where a draft chooses its starting structure. e.g. "三幕式" */ name?:string;/** Writing guidance the template adds to the first context pack of the draft it seeded. e.g. "第一幕建立人物与目标,第二幕升级阻碍,第三幕兑现冲突。" */ guide?:string;/** Starting node tree in draft order, each node naming the unit kind and intent it creates. */ outline?:Array<{/** Unit kind key from the genre, which must be allowed at that position of the tree. e.g. "chapter" */ kind?:string;/** Structure name for the created unit, used for management rather than as a rendition heading. e.g. "第一幕 · 建立" */ name?:string;/** Starting synopsis of the unit intent, describing what this part has to accomplish. e.g. "主角的日常被打破,目标浮出水面。" */ synopsis?:string;/** Starting intent points for the unit, called beats, arguments or selling points depending on the genre. */ points?:Array<string>;/** Nested nodes created beneath this unit, in the order they appear in the draft. */ children?:Array<unknown>}>;/** Whether this template ships with the genre instead of being saved from a work; built-in ones cannot be deleted. */ builtin?:boolean}>})>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| genre | path | string | yes | Genre key from the genre list, such as novel_long or xiaohongshu_note; pass the key exactly, never the display name. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The genre configuration together with the built-in templates that belong to it. |
| 400 | application/json | INVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call. |
| 401 | application/json | The API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header. |
| 404 | application/json | GENRE_NOT_FOUND means the key names no genre in the catalog; read the genre list and pass one of its keys exactly. |
| 500 | application/json | INTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed. |