Skip to content
中文

Get material

Code Mode: praxis.media.libraries.materials.retrieve

HTTP: GET /media/v1/libraries/{library_id}/materials/{asset_id}

Read one element with its body, its current version and the assets it depends on. Use library_id from creation or listing and asset_id from element creation or from an asset listing filtered by material_type. An id that is not an element of this library answers 404. Example: GET /media/v1/libraries/lib_example/materials/9dfa312ef9bc4b00816339b598b1152c.

Signature

praxis.media.libraries.materials.retrieve(args:{path:{library_id:string;asset_id:string}}):Promise<{/** Element id. */ asset_id:string;/** Always media.material. */ object:"media.material";/** Library that holds the element. */ library_id:string;/** Kind of element. */ material_type:"character"|"product"|"scene"|"brand";/** Display name of the element. */ name:string;/** Body version; every saved body bumps it, and a generation records the version it used in provenance.elements. */ version:number;/** The element body as stored. */ body:{/** What the character looks like and wears, in plain words; appended to the prompt of every generation that references the element. */ description:string;/** Pictures of the subject, 1 to 8, each an image or sticker asset of this same library, in the order a generation hands them to the model. */ references:Array<{/** Asset id of an image or sticker in this same library. */ asset_id:string;/** Optional word for what the picture shows, such as 正面 or side view; at most 20 characters. */ view?:string}>;/** fictional for an invented character. */ likeness:"real_person"|"fictional";/** Consent record that authorises a real person’s likeness; required with likeness real_person and refused with fictional. */ consent_id?:string}|{/** What the product is and how it looks; appended to the prompt of every generation that references it. */ description:string;/** Pictures of the subject, 1 to 8, each an image or sticker asset of this same library, in the order a generation hands them to the model. */ references:Array<{/** Asset id of an image or sticker in this same library. */ asset_id:string;/** Optional word for what the picture shows, such as 正面 or side view; at most 20 characters. */ view?:string}>;/** Facts such as material, size or colour as name/value pairs, at most 20; written into the prompt sorted by name. */ attributes?:{[key:string]:string};/** Details the model may not change, such as the logo position or the cap colour; at most 20 entries of up to 200 characters. */ must_keep?:Array<string>}|{/** The place, light and mood to reproduce; appended to the prompt of every generation that references it. */ description:string;/** Pictures of the subject, 1 to 8, each an image or sticker asset of this same library, in the order a generation hands them to the model. */ references:Array<{/** Asset id of an image or sticker in this same library. */ asset_id:string;/** Optional word for what the picture shows, such as 正面 or side view; at most 20 characters. */ view?:string}>}|{/** Brand tone and voice in plain words. */ description:string;/** Optional pictures that show the brand, 0 to 8 image or sticker assets of this library; kept with the brand but never expanded into a generation. */ references?:Array<{/** Asset id of an image or sticker in this same library. */ asset_id:string;/** Optional word for what the picture shows, such as 正面 or side view; at most 20 characters. */ view?:string}>;/** Logo assets of this library (images or stickers), at most 8. */ logos?:Array<string>;/** Brand colours, at most 12, written into the prompt as hex with their names. */ colors?:Array<{/** Colour as #rrggbb; stored in lower case. */ hex:string;/** Optional name of the colour, such as Praxis blue. */ name?:string}>;/** Font assets of this library, at most 8. */ fonts?:Array<string>;/** Words generated text should avoid, at most 100 entries of up to 40 characters. */ banned_words?:Array<string>};/** Every asset the body names (pictures, logos, fonts). */ depends_on:Array<string>;/** Folder the element is filed in. */ asset_folder:string;/** Console page that shows the element to a person. */ viewer_url:string;/** When the element was created. */ created_at:string;/** When the element was last saved. */ updated_at:string}>;

Parameters

NameInTypeRequiredDescription
library_idpathstringyesLibrary ID returned by creation.
asset_idpathstringyes32-character asset ID.

Responses

StatusContent typesDescription
200application/jsonSuccessful response.
400application/jsonA selector, cursor, limit or other parameter is invalid; correct the reported field before retrying.
402application/jsonRequest failed; see the error code reference.
403application/jsonThis credential has read-only access to the library; use a write-capable binding for mutations.
404application/jsonThe library or asset is missing, deleted or belongs to another tenant; verify its identifier and owner.
409application/jsonRequest failed; see the error code reference.
413application/jsonThe file exceeds an input limit; provide a smaller source file.
415application/jsonThis media format is unsupported; provide a supported format.
422application/jsonRequest failed; see the error code reference.
429application/jsonA rate limit was reached; wait before retrying.
501application/jsonThe requested operation is unsupported; choose a supported method.
502application/jsonRequest failed; see the error code reference.
503application/jsonHistorical projections are still being initialized, or library storage is temporarily unavailable; retry shortly and check failureSummary counts_complete.