跳转到内容
EN

Read the rules of one platform

Code Mode: praxis.studio.platforms.retrieve

HTTP: GET /studio/v1/platforms/{platform}

Read one platform in full: the format it consumes, how it receives a finished piece, the preview fidelity the Console can offer, the limits on title, body, image count and aspect, and whether a connected channel is required. Read this before creating a rendition, and again when validation reports that the piece breaks a platform limit.

签名

praxis.studio.platforms.retrieve(args:{path:{/** e.g. "x@1" */ platform:string}}):Promise<{/** Versioned platform key; the version suffix moves when that platform changes its rules. e.g. "x@1" */ key?:string;/** Display name of the platform as people know it, such as X, 小红书 or 公众号. e.g. "X" */ name?:string;/** Rendition format this platform consumes, which decides how the draft is assembled for it. */ format?:"markdown"|"text"|"docx"|"inline_html"|"card_png"|"post_text"|"thread"|"lexical_html"|"epub"|"video_meta";/** How a finished piece reaches the platform, which decides whether a connected channel is needed. */ publish?:"api"|"draft_box"|"export";/** How closely the Console preview matches the published result; an approximate preview is labelled as such. */ preview_fidelity?:"exact"|"approximate"|"none";limits?:{/** Longest allowed title in characters; absent means the platform states no title limit. e.g. 20 */ title_chars?:number;/** Longest allowed body in characters; absent means the platform states no body limit. e.g. 1000 */ body_chars?:number;/** Weighted character budget for one post, where a CJK character counts two and a URL counts as twenty-three. e.g. 280 */ weighted_per_post?:number;/** Most images one post may carry; absent means the platform states no image count. e.g. 18 */ images?:number;/** Aspect ratio the platform expects for images, which the card renderer follows. */ image_aspect?:"3:4"|"1:1"|"4:5"|"16:9";/** Image file formats the platform accepts; a card rendered in another format is converted first. */ image_formats?:Array<"jpeg"|"png"|"webp"|"gif">};/** Whether a connected channel is required before this platform can receive a rendition. */ needs_channel?:boolean;/** Channel permission tiers this platform accepts, one for staging a draft and one for publishing. */ channel_scopes?:Array<"draft"|"publish">;/** Delivery stage that opened this platform; a value other than s3 means a rendition for it is still refused. */ available_from?:"s3"|"s5"|"s7";/** Limit names still unconfirmed against the platform documentation; treat the listed values as provisional. */ unverified?:Array<string>}>;

参数

名称位置类型必填说明
platformpathstring是Versioned platform key from the platform list, such as x@1 or xiaohongshu@1; the version suffix is part of the key.

响应

状态码内容类型说明
200application/jsonThe platform configuration including its hard limits and whether it needs a connected channel.
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.
404application/jsonPLATFORM_NOT_FOUND means the key names no platform, or the version suffix is missing; read the platform list and pass one of its versioned keys.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.