Skip to content
中文

Create a writing style

Code Mode: praxis.studio.styles.create

HTTP: POST /studio/v1/styles

Create a style: the voice a piece is written in, held as samples rather than as adjectives. Samples matter more than a description, so paste one to five paragraphs of writing the piece should sound like, and put the words to avoid into avoid so the banned-word check uses them. A style belongs to the work you name in work, and a work may only attach its own styles, so create the style with the work it will be used in. Attach a style to a work, or to one draft of it, and its samples then reach every context pack.

Signature

praxis.studio.styles.create(args:{body:{/** Name of the style, written so a person can tell it apart from the organization's other styles. e.g. "克制的白描" */ name:string;/** Short description of the voice, shown wherever a style is chosen. e.g. "短句为主,少形容词,情绪靠动作带出。" */ description?:string;/** One to five paragraphs of writing in the intended voice; these paragraphs are what reach a writer, so choose them carefully. */ samples?:Array<string>;/** Picture samples to store with the style, in the order you send them; a bare file identifier is stored as a picture with no name and no description. */ pictures?:Array<string|{/** Identifier of the uploaded file, from the file service; the bytes stay there and the gallery only references them, so attaching the same file to several entries e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ file:string;/** Short name shown under the picture, such as a view or a costume; at most 40 characters after trimming. e.g. "定妆 · 正面" */ name:string;/** What this particular picture shows and why it was chosen, such as the lighting or the angle; at most 200 characters, and an empty string means no description. e.g. "冷光,半身,衣领扣到最上面一颗。" */ description:string}>;/** Work this style should belong to, by its wk_ identifier; pass it so the work can attach the style later, since a work may only use its own styles. e.g. "wk_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ work?:string;/** Wording and habits to keep, stated as instructions a writer can follow rather than as adjectives. */ use?:Array<string>;/** Words and stock phrases to avoid, which also become the banned-word check for drafts that use this style. */ avoid?:Array<string>;/** Terms mapped from a wrong spelling to the right one; each pair becomes a deterministic check on the text. e.g. {"沙盒":"沙箱"} */ glossary?:{[key:string]:string}}}):Promise<{/** Style identifier; a style has no name-based address, so this is what the style path takes. e.g. "sty_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Resource kind marker, always studio.style for this shape. e.g. "studio.style" */ object:string;/** Creation time in RFC 3339 UTC. e.g. "2026-11-04T09:40:00Z" */ create_time?:string;/** Time of the last change to this style in RFC 3339 UTC. e.g. "2026-11-04T10:11:20Z" */ update_time?:string;/** Console address that opens this style, where its samples can be read beside a piece written with it. e.g. "https://console.deepraxis.com/studio/styles/sty_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ viewer_url:string;/** Name of the style, used by people to pick it when attaching it to a work or a draft. e.g. "克制的白描" */ name:string;/** Short description of the voice; the samples do the real work, so this is a label rather than an instruction. e.g. "短句为主,少形容词,情绪靠动作带出。" */ description:string;/** One to five paragraphs of writing the piece should sound like; these paragraphs reach the context pack, so they carry the style. */ samples:Array<string>;/** Picture samples of this style, in the order they were written; they show what the voice looks like on the page and are not sent to a writer. */ pictures:Array<{/** Identifier of the uploaded file, from the file service; the bytes stay there and the gallery only references them, so attaching the same file to several entries e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ file:string;/** Short name shown under the picture, such as a view or a costume; at most 40 characters after trimming. e.g. "定妆 · 正面" */ name:string;/** What this particular picture shows and why it was chosen, such as the lighting or the angle; at most 200 characters, and an empty string means no description. e.g. "冷光,半身,衣领扣到最上面一颗。" */ description:string}>;/** Work this style belongs to, or null for a style that belongs to no single work; a work may only use its own styles, so attaching a style of another work is refu e.g. "wk_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ work:string;/** Wording and habits to keep, such as a preferred term or a sentence rhythm, stated as instructions a writer can follow. */ use:Array<string>;/** Words and stock phrases to avoid; they also become the banned-word check for any draft that uses this style. */ avoid:Array<string>;/** Terms mapped from a wrong spelling to the right one; the glossary check flags the wrong spelling wherever it appears. e.g. {"沙盒":"沙箱"} */ glossary:{[key:string]:string}}>;

Request body

RequiredContent typesDescription
yesapplication/jsonThe style to create: its name, its sample paragraphs, the wording to use and to avoid, and its glossary.

Responses

StatusContent typesDescription
201application/jsonThe new style with its samples and glossary; keep its identifier to attach it to a work or a draft.
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.