import { APIResource } from "../../core/resource.js"; import * as DownloadAPI from "./download.js"; import { Download, DownloadGetStatusParams, DownloadGetStatusResponse, DownloadRequestBatchParams, DownloadRequestBatchResponse, DownloadRequestParams, DownloadRequestResponse } from "./download.js"; import { APIPromise } from "../../core/api-promise.js"; import { AssetsCursor, type AssetsCursorParams, PagePromise, SnapshotsCursor, type SnapshotsCursorParams } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Assets extends APIResource { download: DownloadAPI.Download; /** * Get the details of an asset. Supports both public access (via the * `Authorization` header set to `public-auth-token`) and authenticated user access * (including API keys). */ retrieve(assetID: string, query?: AssetRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Update a canvas asset */ update(assetID: string, params: AssetUpdateParams, options?: RequestOptions): APIPromise; /** * List assets of a project team. Supports both public access (via the * `Authorization` header set to `public-auth-token`) and authenticated user access * (including API keys). */ list(query?: AssetListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Delete multiple assets */ deleteMultiple(params: AssetDeleteMultipleParams, options?: RequestOptions): APIPromise; /** * Duplicate an asset */ duplicate(assetID: string, params: AssetDuplicateParams, options?: RequestOptions): APIPromise; /** * Get multiple assets by their IDs */ getBulk(params: AssetGetBulkParams, options?: RequestOptions): APIPromise; /** * List snapshots of a canvas type asset */ listSnapshots(assetID: string, query?: AssetListSnapshotsParams | null | undefined, options?: RequestOptions): PagePromise; /** * Lock a canvas */ lock(assetID: string, params: AssetLockParams, options?: RequestOptions): APIPromise; /** * Unlock a canvas */ unlock(assetID: string, params: AssetUnlockParams, options?: RequestOptions): APIPromise; /** * Add/delete tags on a specific asset */ updateTags(assetID: string, params: AssetUpdateTagsParams, options?: RequestOptions): APIPromise; /** * Upload an image or canvas */ upload(params: AssetUploadParams, options?: RequestOptions): APIPromise; } export type AssetListResponsesAssetsCursor = AssetsCursor; export type AssetListSnapshotsResponsesSnapshotsCursor = SnapshotsCursor; export interface AssetRetrieveResponse { asset: AssetRetrieveResponse.Asset; } export declare namespace AssetRetrieveResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetUpdateResponse { asset: AssetUpdateResponse.Asset; } export declare namespace AssetUpdateResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetListResponse { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: AssetListResponse.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: AssetListResponse.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: AssetListResponse.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: AssetListResponse.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: AssetListResponse.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: AssetListResponse.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: AssetListResponse.Thumbnail; } export declare namespace AssetListResponse { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } export type AssetDeleteMultipleResponse = unknown; export interface AssetDuplicateResponse { asset: AssetDuplicateResponse.Asset; } export declare namespace AssetDuplicateResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetGetBulkResponse { assets: Array; } export declare namespace AssetGetBulkResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetListSnapshotsResponse { authorId: string; hash: string; rawData: string; takenAt: number; } export interface AssetLockResponse { asset: AssetLockResponse.Asset; /** * The value of the lock to use when updating/unlocking the canvas. */ lockId?: string; } export declare namespace AssetLockResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetUnlockResponse { asset: AssetUnlockResponse.Asset; } export declare namespace AssetUnlockResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } } export interface AssetUpdateTagsResponse { /** * The list of added tags */ added: Array; /** * The list of deleted tags */ deleted: Array; } export interface AssetUploadResponse { asset: AssetUploadResponse.Asset; job?: AssetUploadResponse.Job; } export declare namespace AssetUploadResponse { interface Asset { /** * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId: string; /** * A list of CollectionId this asset belongs to */ collectionIds: Array; /** * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * List of edit capabilities */ editCapabilities: Array<'DETECTION' | 'GENERATIVE_FILL' | 'PIXELATE' | 'PROMPT_EDITING' | 'REFINE' | 'REFRAME' | 'REMOVE_BACKGROUND' | 'SEGMENTATION' | 'UPSCALE' | 'UPSCALE_360' | 'VECTORIZATION'>; /** * The kind of asset */ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * Metadata of the asset with some additional information */ metadata: Asset.Metadata; /** * The mime type of the asset (example: "image/png") */ mimeType: string; /** * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams) */ ownerId: string; /** * The privacy of the asset */ privacy: 'private' | 'public' | 'unlisted'; /** * The properties of the asset, content may depend on the kind of asset returned */ properties: Asset.Properties; /** * source of the asset */ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * The actual status */ status: 'error' | 'pending' | 'success'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The asset last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * Signed URL to get the asset content */ url: string; /** * Automatic captioning of the asset */ automaticCaptioning?: string; /** * The description, it will contain in priority: * * - the manual description * - the advanced captioning when the asset is used in training flow * - the automatic captioning */ description?: string; /** * The embedding of the asset when requested. * * Only available when an asset can be embedded (ie: not Detection maps) */ embedding?: Array; /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ firstFrame?: Asset.FirstFrame; /** * Whether the asset is hidden. */ isHidden?: boolean; /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ lastFrame?: Asset.LastFrame; /** * The NSFW labels */ nsfw?: Array; /** * The original file url. * * Contains the url of the original file. without any conversion. Only available * for some specific video, audio and threeD assets. Is only specified if the given * asset data has been replaced with a new file during the creation of the asset. */ originalFileUrl?: string; /** * The output index of the asset within a job This index is an positive integer * that starts at 0 It is used to differentiate between multiple outputs of the * same job If the job has only one output, this index is 0 */ outputIndex?: number; /** * The asset's preview. * * Contains the assetId and the url of the preview. */ preview?: Asset.Preview; /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ slopGuard?: Asset.SlopGuard; /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ thumbnail?: Asset.Thumbnail; } namespace Asset { /** * Metadata of the asset with some additional information */ interface Metadata { kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated * from a text to image model */ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2splat' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone'; /** * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object */ angular?: number; /** * The optional aspect ratio given for the generation, only applicable for some * models */ aspectRatio?: string; backgroundOpacity?: number; /** * The baseModelId that maybe changed at inference time */ baseModelId?: string; /** * A bounding box around the object of interest, in the format [x1, y1, x2, y2]. */ bbox?: Array; betterQuality?: boolean; /** * The control image already processed by canny detector. Must reference an * existing AssetId. */ cannyStructureImage?: string; /** * Activate clustering. */ clustering?: boolean; /** * Ensure upscaled tile have the same color histogram as original tile. */ colorCorrection?: boolean; colorMode?: string; colorPrecision?: number; /** * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing. */ concepts?: Array; contours?: Array>>>; /** * End step for control. */ controlEnd?: number; /** * The date when the asset was copied to a project */ copiedAt?: string; cornerThreshold?: number; /** * Allow the generation of "hallucinations" during the upscale process, which adds * additional details and deviates from the original image. Default: optimized for * your preset and style. */ creativity?: number; /** * Amount of decay in creativity over the upscale process. The lowest the value, * the less the creativity will be preserved over the upscale process. */ creativityDecay?: number; /** * If true, use the default parameters */ defaultParameters?: boolean; /** * The depth fidelity if a depth image provided */ depthFidelity?: number; /** * The control image processed by depth estimator. Must reference an existing * AssetId. */ depthImage?: string; /** * Amount of details to remove or add */ detailsLevel?: number; dilate?: number; /** * Contrast factor for Grayscale detector */ factor?: number; filterSpeckle?: number; /** * Determine the scale at which the upscale process works. * * - With a small value, the upscale works at the largest scale, resulting in fewer * added details and more coherent images. Ideal for portraits, for example. * - With a large value, the upscale works at the smallest scale, resulting in more * added details and more hallucinations. Ideal for landscapes, for example. * * (info): A small value is slower and more expensive to run. */ fractality?: number; /** * Apply extra control to the Skybox 360 geometry. The higher the value, the more * the 360 geometry will influence the generated skybox image. * * Use with caution. Default is adapted to the other parameters. */ geometryEnforcement?: number; /** * The guidance used to generate this asset */ guidance?: number; halfMode?: boolean; hdr?: number; height?: number; /** * High threshold for Canny detector */ highThreshold?: number; /** * (deprecated) Horizontal expansion ratio. */ horizontalExpansionRatio?: number; /** * The input image to process. Must reference an existing AssetId or be a data URL. */ image?: string; /** * Strengthen the similarity to the original image during the upscale. Default: * optimized for your preset and style. */ imageFidelity?: number; /** * Preserve the seamless properties of skybox or texture images. Input has to be of * same type (seamless). */ imageType?: 'seamfull' | 'skybox' | 'texture'; /** * The id of the Inference describing how this image was generated */ inferenceId?: string; /** * When set to `high`, allows to better preserve details from the input images in * the output. This is especially useful when using images that contain elements * like faces or logos that require accurate preservation in the generated image. * * You can provide multiple input images that will all be preserved with high * fidelity, but keep in mind that the first image will be preserved with richer * textures and finer details, so if you include elements such as faces, consider * placing them in the first image. * * Only available for the `gpt-image-1` model. */ inputFidelity?: 'high' | 'low'; /** * Location of the input image in the output. */ inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top'; /** * To invert the relief */ invert?: boolean; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ keypointThreshold?: number; layerDifference?: number; lengthThreshold?: number; /** * The ISO timestamp when the lock on the canvas will expire */ lockExpiresAt?: string; /** * Low threshold for Canny detector */ lowThreshold?: number; /** * The mask used for the asset generation or editing */ mask?: string; maxIterations?: number; /** * Maximum threshold for Grayscale conversion */ maxThreshold?: number; /** * Minimum threshold for Grayscale conversion */ minThreshold?: number; /** * Modality to detect */ modality?: 'canny' | 'depth' | 'grayscale' | 'lineart_anime' | 'mlsd' | 'normal' | 'pose' | 'scribble' | 'segmentation' | 'sketch'; mode?: string; /** * The modelId used to generate this asset */ modelId?: string; /** * The type of the generator used */ modelType?: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; name?: string; nbMasks?: number; /** * The negative prompt used to generate this asset */ negativePrompt?: string; /** * Controls the influence of the negative prompt. Default 0 means the negative * prompt has no effect. Higher values increase negative prompt influence. Must * be > 0 if negativePrompt is provided. */ negativePromptStrength?: number; /** * The number of denoising steps for each image generation. */ numInferenceSteps?: number; /** * The number of outputs to generate. */ numOutputs?: number; originalAssetId?: string; outputIndex?: number; /** * Overlap percentage for the output image. */ overlapPercentage?: number; /** * Override the embeddings of the model. Only your prompt and negativePrompt will * be used. Use with caution. */ overrideEmbeddings?: boolean; parentId?: string; parentJobId?: string; pathPrecision?: number; /** * List of points (label, x, y) in the image where label = 0 for background and 1 * for object. */ points?: Array>; /** * How polished is the surface? 0 is like a rough surface, 1 is like a mirror */ polished?: number; preset?: string; progressPercent?: number; /** * The prompt that guided the asset generation or editing */ prompt?: string; /** * Increase the fidelity to the prompt during upscale. Default: optimized for your * preset and style. */ promptFidelity?: number; /** * How raised is the surface? 0 is flat like water, 1 is like a very rough rock */ raised?: number; /** * The reference images used for the asset generation or editing */ referenceImages?: Array; /** * Additional refinement steps before scaling. * * If scalingFactor == 1, the refinement process will be applied (1 + * refinementSteps) times. If scalingFactor > 1, the refinement process will be * applied refinementSteps times. */ refinementSteps?: number; /** * Remove background for Grayscale detector */ removeBackground?: boolean; /** * Size proportion of the input image in the output. */ resizeOption?: number; /** * Boolean to output the contours. */ resultContours?: boolean; /** * Boolean to return the source image with the mask applied as alpha channel (RGBA * PNG, transparent background) instead of the binary mask. Mutually exclusive with * `resultMask` — passing both as `true` returns a 400 error. Note: * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only. */ resultImage?: boolean; /** * Boolean to return the binary masks in the response. Mutually exclusive with * `resultImage` — passing both as `true` returns a 400 error. */ resultMask?: boolean; rootParentId?: string; /** * Save a flipbook of the texture. Deactivated when the input texture is larger * than 2048x2048px */ saveFlipbook?: boolean; /** * Scaling factor (when `targetWidth` not specified) */ scalingFactor?: number; /** * The scheduler used to generate this asset */ scheduler?: string; /** * The seed used to generate this asset. Can be a string or a number in some * cases . */ seed?: string; /** * Sharpen tiles. */ sharpen?: boolean; /** * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond */ shiny?: number; size?: number; /** * Activate sketch detection instead of canny. */ sketch?: boolean; sourceProjectId?: string; spliceThreshold?: number; /** * The strength * * Only available for the `flux-kontext` LoRA model. */ strength?: number; /** * Strength for the input image structure preservation */ structureFidelity?: number; /** * The control image for structure. A canny detector will be applied to this image. * Must reference an existing AssetId. */ structureImage?: string; style?: '3d-cartoon' | '3d-rendered' | 'anime' | 'cartoon' | 'cinematic' | 'claymation' | 'cloud-skydome' | 'comic' | 'cyberpunk' | 'enchanted' | 'fantasy' | 'ink' | 'manga' | 'manga-color' | 'minimalist' | 'neon-tron' | 'oil-painting' | 'pastel' | 'photo' | 'photography' | 'psychedelic' | 'retro-fantasy' | 'scifi-concept-art' | 'space' | 'standard' | 'whimsical'; /** * The higher the value the more it will look like the style image(s) */ styleFidelity?: number; /** * List of style images. Most of the time, only one image is enough. It must be * existing AssetIds. */ styleImages?: Array; /** * Condition the influence of the style image(s). The higher the value, the more * the style images will influence the upscaled image. */ styleImagesFidelity?: number; /** * The target height of the output image. */ targetHeight?: number; /** * Target width for the upscaled image, take priority over scaling factor */ targetWidth?: number; /** * A textual description / keywords describing the object of interest. */ text?: string; /** * The asset to convert in texture maps. Must reference an existing AssetId. */ texture?: string; /** * The thumbnail of the canvas */ thumbnail?: Metadata.Thumbnail; /** * If set to true, during the upscaling process, the model will match tiles of the * source image with tiles of the style image(s). This will result in a more * coherent restyle. Works best with style images that have a similar composition. */ tileStyle?: boolean; trainingImage?: boolean; /** * (deprecated) Vertical expansion ratio. */ verticalExpansionRatio?: number; /** * The width of the rendered image. */ width?: number; } namespace Metadata { interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } /** * The thumbnail of the canvas */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for the canvas (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for the canvas */ url: string; } } /** * The properties of the asset, content may depend on the kind of asset returned */ interface Properties { size: number; /** * Number of animation frames if animations exist */ animationFrameCount?: number; /** * Bitrate of the media in bits per second */ bitrate?: number; /** * Number of bones if skeleton exists */ boneCount?: number; /** * Recommended preview camera mode emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraMode?: 'aerial' | 'interior' | 'turntable'; /** * Recommended preview camera path emitted by the generator (gsplat route); passed * through to mesh-rendering verbatim. */ cameraTrajectory?: Array; /** * Number of channels of the audio */ channels?: number; /** * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as * several). */ charCount?: number; /** * Classification of the audio */ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown'; /** * Codec name of the media */ codecName?: string; /** * Description of the audio */ description?: string; /** * Bounding box dimensions [width, height, depth] */ dimensions?: Array; /** * Duration of the media in seconds */ duration?: number; /** * Number of faces/triangles in the mesh */ faceCount?: number; /** * Format of the mesh file (e.g. 'glb', etc.) */ format?: string; /** * Frame rate of the video in frames per second */ frameRate?: number; /** * Whether the mesh has animations */ hasAnimations?: boolean; /** * True when `preview` holds the entire content unmodified — consumers can use it * directly without fetching `asset.url`. False or undefined means the content * exceeds the preview budget and consumers must fetch the full body from S3 to * read past the preview. */ hasFullPreview?: boolean; /** * Whether the mesh has normal vectors */ hasNormals?: boolean; /** * Whether the mesh has bones/skeleton */ hasSkeleton?: boolean; /** * Whether the mesh has UV coordinates */ hasUVs?: boolean; height?: number; /** * Number of frames in the video */ nbFrames?: number; /** * Leading slice of the content used for inline UI display and as a search * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a * code-point boundary so no character is split. Number of characters in the * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for * emoji-heavy text at the default 1 KB budget). */ preview?: string; /** * Sample rate of the media in Hz */ sampleRate?: number; /** * Transcription of the audio */ transcription?: Properties.Transcription; /** * Number of vertices in the mesh */ vertexCount?: number; width?: number; /** * Number of whitespace-separated words in the text */ wordCount?: number; } namespace Properties { /** * One explicit camera keyframe for the splat route. Several are interpolated over * the requested frames into an orbit/fly-through; a single keyframe renders a * static view. Overrides {@link SplatCameraMode} when provided. */ interface CameraTrajectory { /** * Camera eye position in the splat's world frame. */ position: Array; /** * Look-at point in the splat's world frame. */ target: Array; /** * Vertical field of view in degrees (defaults to 50 in the renderer). */ fov?: number; } /** * Transcription of the audio */ interface Transcription { text: string; } } /** * The video asset's first frame. * * Contains the assetId and the url of the first frame. */ interface FirstFrame { assetId: string; url: string; } /** * The video asset's last frame. * * Contains the assetId and the url of the last frame. */ interface LastFrame { assetId: string; url: string; } /** * The asset's preview. * * Contains the assetId and the url of the preview. */ interface Preview { assetId: string; url: string; } /** * SlopGuard detection result, computed asynchronously after generation. * * `details` (the per-dimension reasons and suggestions) is returned only when the * asset is read with `withSlopGuardDetails=true`. */ interface SlopGuard { /** * ISO-8601 timestamp of when scoring ran */ computedAt: string; /** * Whether scoring succeeded or errored */ status: 'error' | 'scored'; /** * Rubric/model version that produced this result */ version: string; /** * Generic AI-quality sub-score */ aiQualityScore?: number; /** * Ids of briefs that contributed */ appliedBriefIds?: Array; /** * Brief-compliance sub-score (omitted when no brief applied) */ briefComplianceScore?: number; /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ details?: SlopGuard.Details; /** * Error message when status is 'error' (truncated) */ error?: string; /** * 0–100 composite score (present when status is 'scored') */ overallScore?: number; /** * Sensitivity used for the verdict */ sensitivity?: 'high' | 'low' | 'medium'; /** * pass / warn / fail (present when status is 'scored') */ verdict?: 'fail' | 'pass' | 'warn'; } namespace SlopGuard { /** * Per-dimension reasons and suggestions, as produced by the detector. * * Returned only when the asset is read with `withSlopGuardDetails=true` by the * project that owns it — the brief-compliance text paraphrases that project's * brief, so a cross-project read of a public asset gets the summary alone. Also * omitted when the archived verdict is unavailable (asset scored by an older * version, or an unreadable archive). */ interface Details { /** * Always-on generic AI-quality dimension */ aiQuality: Details.AIQuality; /** * Brief-compliance dimension; omitted when no brief applied */ briefCompliance?: Details.BriefCompliance; } namespace Details { /** * Always-on generic AI-quality dimension */ interface AIQuality { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } /** * Brief-compliance dimension; omitted when no brief applied */ interface BriefCompliance { /** * Why the image scored as it did */ reasons: Array; /** * 0–100; higher is better (more compliant / less AI-looking) */ score: number; /** * Actionable suggestions to improve the score */ suggestions: Array; } } } /** * The asset's thumbnail. * * Contains the assetId and the url of the thumbnail. */ interface Thumbnail { assetId: string; url: string; } } interface Job { /** * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8") */ jobId: string; /** * The type of job */ jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'splat' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow'; /** * Metadata of the job with some additional information */ metadata: Job.Metadata; /** * Progress of the job (between 0 and 1) */ progress: number; /** * The current status of the job */ status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up'; /** * The history of the different statuses the job went through with the ISO string * date of when the job reached each statuses. */ statusHistory: Array; /** * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId?: string; /** * The billing of the job */ billing?: Job.Billing; /** * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D") */ ownerId?: string; } namespace Job { /** * Metadata of the job with some additional information */ interface Metadata { /** * List of produced assets for this job */ assetIds?: Array; /** * Eventual error for the job */ error?: string | null; /** * The flow of the job. Only available for workflow jobs. */ flow?: Array; /** * Actionable hint for the user explaining what went wrong and how to resolve it. */ hint?: string; /** * The inputs for the job */ input?: { [key: string]: unknown; }; /** * May contain the output of the job for specific custom models jobs. Only * available for custom models which generate non-assets outputs. Example: LLM text * results. */ output?: { [key: string]: unknown; }; /** * For voice-clone jobs: the ID of the model being trained. */ outputModelId?: string; /** * The workflow ID of the job if job is part of a workflow. */ workflowId?: string; /** * The workflow job ID of the job if job is part of a workflow job. */ workflowJobId?: string; } namespace Metadata { interface Flow { /** * The id of the node. */ id: string; /** * The status of the node. Only available for WorkflowJob nodes. */ status: 'failure' | 'pending' | 'processing' | 'rejected' | 'skipped' | 'success'; /** * The type of the job for the node. */ type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow'; /** * List of produced assets for this node. */ assets?: Array; /** * Fixed number of iterations for a ForEach node. When set, the loop runs exactly * `count` times regardless of array input. When not set, the loop iterates over * the resolved array input. Only available for ForEach nodes. */ count?: number; /** * The nodes that this node depends on. Only available for nodes that have * dependencies. Mainly used for user approval nodes. */ dependsOn?: Array; /** * If true, the outputs of this node will be included in the workflow job's final * output. Only applicable to producing nodes (custom-model, inference, etc.). By * default, only last nodes (nodes not referenced by other nodes) contribute to * outputs. Set this to true to also include intermediate nodes in the final * output. Note: This should only be set to `true` or left undefined. */ includeOutputsInWorkflowJob?: true; /** * The inputs of the node. */ inputs?: Array; /** * Statically-configured items for a List node. The node outputs this array as-is * when executed. Only available for List nodes. The values can be strings, * numbers, or asset IDs. */ items?: Array; /** * Zero-based index of the iteration this node copy belongs to. Set on * dynamically-created copies of loop body nodes. */ iterationIndex?: number; /** * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is * only available for nodes started. A node "Pending" for a running workflow job is * not started. */ jobId?: string; /** * The logic of the node. Only available for logic nodes. */ logic?: Flow.Logic; /** * The type of the logic for the node. Only available for logic nodes. */ logicType?: 'if-else'; /** * IDs of the body template nodes that belong to this ForEach loop. At runtime * these templates are cloned once per iteration and marked Skipped. Only available * for ForEach nodes. */ loopBodyNodeIds?: Array; /** * ID of the ForEach node that spawned this iteration copy. Set on * dynamically-created copies of loop body nodes. */ loopNodeId?: string; /** * The model id for the node. Mainly used for custom model tasks. */ modelId?: string; /** * The output of the node. Only available for logic nodes. */ output?: unknown; /** * The workflow id for the node. Mainly used for workflow tasks. */ workflowId?: string; } namespace Flow { interface Asset { assetId: string; url: string; } /** * This is used to run the flow. */ interface Input { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The configured items for inputs_array type inputs. Each item is an array of * SubNodeInput that need ref/value resolution. Only available for inputs_array * type. */ items?: Array>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ ref?: Input.Ref; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Input.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; /** * The value of the input. This is the value of the input that will be used to run * the node. Only available for flows managed by a WorkflowJob. */ value?: unknown; } namespace Input { /** * A sub-input within an inputs_array item. Same as NodeInput but without the * recursive items field. */ interface Item { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ ref?: Item.Ref; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Item.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; /** * The value of the input. This is the value of the input that will be used to run * the node. Only available for flows managed by a WorkflowJob. */ value?: unknown; } namespace Item { /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ interface Ref { /** * The conditional nodes to reference. If the conditional nodes are successful, the * node will be successful. If the conditional nodes are skipped, the node will be * skipped. Contains an array of node ids used to check the status of the nodes. */ conditional?: Array; /** * This is the desired node output value if ref is an if/else node. */ equal?: string; /** * The name of the input or output to reference. If the type is 'workflow', the * name is the name of the input of the workflow is required If the type is 'node', * the name is not mandatory, except if you want all outputs of the node. To get * all outputs of a node, you can use the name 'all'. */ name?: string; /** * The node id or 'workflow' if the source is a workflow input. */ node?: string; } /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ interface Ref { /** * The conditional nodes to reference. If the conditional nodes are successful, the * node will be successful. If the conditional nodes are skipped, the node will be * skipped. Contains an array of node ids used to check the status of the nodes. */ conditional?: Array; /** * This is the desired node output value if ref is an if/else node. */ equal?: string; /** * The name of the input or output to reference. If the type is 'workflow', the * name is the name of the input of the workflow is required If the type is 'node', * the name is not mandatory, except if you want all outputs of the node. To get * all outputs of a node, you can use the name 'all'. */ name?: string; /** * The node id or 'workflow' if the source is a workflow input. */ node?: string; } /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The logic of the node. Only available for logic nodes. */ interface Logic { /** * The cases of the logic. Only available for if/else nodes. */ cases?: Array; /** * The default case of the logic. Contains the id/output of the node to execute if * no case is matched. Only available for if/else nodes. */ default?: string; /** * The transform of the logic. Only available for transform nodes. */ transform?: string; } namespace Logic { interface Case { condition: string; value: string; } } } } interface StatusHistory { date: string; status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up'; } /** * The billing of the job */ interface Billing { cuCost: number; cuDiscount: number; /** * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on * top of the generation itself, such as `slop-detection`. * * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the * values here. * * Two caveats when displaying it: * * - These are a remaining refundable balance, not a receipt: a job that failed or * was cancelled has had its add-ons refunded, so they read 0 while `cuCost` * still shows the main action's original charge. * - `ip-detection` is part of the shape but is never populated today: that fee is * charged outside the job and reported once, as * `ipDetection.creativeUnitsCharged`, in the response of the request that ran * it. * * Absent when the job paid for no add-on. */ cuCostDetails?: Billing.CuCostDetails; /** * When true, the credits charged for this job are not automatically refunded if * the generation fails, because the model used does not support refund-on-failure. * Absent or false means a failed generation is refunded as usual. */ disableRefund?: boolean; } namespace Billing { /** * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on * top of the generation itself, such as `slop-detection`. * * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the * values here. * * Two caveats when displaying it: * * - These are a remaining refundable balance, not a receipt: a job that failed or * was cancelled has had its add-ons refunded, so they read 0 while `cuCost` * still shows the main action's original charge. * - `ip-detection` is part of the shape but is never populated today: that fee is * charged outside the job and reported once, as * `ipDetection.creativeUnitsCharged`, in the response of the request that ran * it. * * Absent when the job paid for no add-on. */ interface CuCostDetails { 'ip-detection'?: number; 'slop-detection'?: number; } } } } export interface AssetRetrieveParams { /** * If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * The projectId used for ownership resource management. Either to assert ownership * or to set the owner of the resource(s) */ projectId?: string; /** * Include the embedding in the response */ withEmbedding?: boolean; /** * Include the per-dimension SlopGuard verdict (`slopGuard.details`: reasons and * suggestions for each scored dimension). Honoured only when the asset belongs to * the calling project, since the brief-compliance text paraphrases that project’s * brief; ignored otherwise, including on public unauthenticated access. */ withSlopGuardDetails?: boolean; } export interface AssetUpdateParams { /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The new value for the canvas as a stringified JSON. */ canvas?: string; /** * Body param: The new description of the asset. */ description?: string; /** * Body param: If true, no snapshot will be created for this update. */ disableSnapshot?: boolean; /** * Body param: The ISO timestamp when the lock on the canvas will expire. */ lockExpiresAt?: string; /** * Body param: The value of the lock to use when updating a locked canvas. */ lockId?: string; /** * Body param: The new name for the canvas. */ name?: string; /** * Body param: The new thumbnail for the canvas in base64 format string. */ thumbnail?: string; } export interface AssetListParams extends AssetsCursorParams { /** * List assets generated by a specific author (the user that created the asset) */ authorId?: string; collectionId?: unknown; /** * Filter results to only return assets created after the specified ISO string date * (exclusive). Requires the sortBy parameter to be "createdAt" */ createdAfter?: string; /** * Filter results to only return assets created before the specified ISO string * date (exclusive). Requires the sortBy parameter to be "createdAt" */ createdBefore?: string; /** * List assets generated from a specific inference */ inferenceId?: string; /** * List assets generated from all inferences coming from a specific model (this is * not the training images) */ modelId?: string; /** * If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * The number of items to return in the response. The default value is 50, maximum * value is 100, minimum value is 1 */ pageSize?: number; /** * List all the children assets that were generated from a specific parent asset */ parentAssetId?: string; /** * Filters result by asset privacy. If set to public, it will return -all- public * assets from all organizations */ privacy?: string; /** * The projectId used for ownership resource management. Either to assert ownership * or to set the owner of the resource(s) */ projectId?: string; /** * List all the children assets that were generated from a specific root asset */ rootAssetId?: string; /** * Sort results by the createdAt or updatedAt */ sortBy?: string; /** * Sort results in ascending (asc) or descending (desc) order */ sortDirection?: string; /** * List of tags, comma separated. Only for public assets on all teams. */ tags?: string; /** * List all the assets of a specific type. The parameter "type" and "types" cannot * be used together. Can be any of the following values: inference-txt2img, * inference-txt2img-ip-adapter, inference-txt2img-texture, inference-img2img, * inference-img2img-ip-adapter, inference-img2img-texture, inference-inpaint, * inference-inpaint-ip-adapter, inference-reference, inference-reference-texture, * inference-controlnet, inference-controlnet-ip-adapter, * inference-controlnet-img2img, inference-controlnet-reference, * inference-controlnet-inpaint, inference-controlnet-inpaint-ip-adapter, * inference-controlnet-texture, background-removal, canvas, canvas-export, * canvas-drawing, detection, patch, pixelization, upscale, upscale-texture, * upscale-skybox, vectorization, segment, segmentation-image, segmentation-mask, * skybox-base-360, skybox-hdri, skybox-3d, restyle, reframe, generative-fill, * texture, texture-height, texture-normal, texture-smoothness, texture-metallic, * texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d, * txt23d, video23d, 3d23d, img2splat, 3d23d-texture, 3d-texture, 3d-texture-mtl, * 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic, * img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone, * video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video, * uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video, uploaded-text, * audio2txt, txt2txt, img2txt, assets with a type starting with "inference-" will * be returned */ type?: 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-controlnet' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-img2img' | 'inference-controlnet-reference' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-texture' | 'background-removal' | 'canvas' | 'canvas-export' | 'canvas-drawing' | 'detection' | 'patch' | 'pixelization' | 'upscale' | 'upscale-texture' | 'upscale-skybox' | 'vectorization' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-3d' | 'restyle' | 'reframe' | 'generative-fill' | 'texture' | 'texture-height' | 'texture-normal' | 'texture-smoothness' | 'texture-metallic' | 'texture-edge' | 'texture-ao' | 'texture-albedo' | 'image-prompt-editing' | 'unknown' | 'img23d' | 'txt23d' | 'video23d' | '3d23d' | 'img2splat' | '3d23d-texture' | '3d-texture' | '3d-texture-mtl' | '3d-texture-albedo' | '3d-texture-normal' | '3d-texture-roughness' | '3d-texture-metallic' | 'img2video' | 'txt2audio' | 'audio2audio' | 'audio2video' | 'video2audio' | 'voice-clone' | 'video2video' | 'video2img' | 'txt2img' | 'img2img' | 'txt2video' | 'uploaded' | 'uploaded-video' | 'uploaded-audio' | 'uploaded-3d' | 'uploaded-avatar' | 'upscale-video' | 'uploaded-text' | 'audio2txt' | 'txt2txt' | 'img2txt'; /** * List of the asset types to request. The parameter "type" and "types" cannot be * used together. Can be any of the following values: inference-txt2img, * inference-txt2img-ip-adapter, inference-txt2img-texture, inference-img2img, * inference-img2img-ip-adapter, inference-img2img-texture, inference-inpaint, * inference-inpaint-ip-adapter, inference-reference, inference-reference-texture, * inference-controlnet, inference-controlnet-ip-adapter, * inference-controlnet-img2img, inference-controlnet-reference, * inference-controlnet-inpaint, inference-controlnet-inpaint-ip-adapter, * inference-controlnet-texture, background-removal, canvas, canvas-export, * canvas-drawing, detection, patch, pixelization, upscale, upscale-texture, * upscale-skybox, vectorization, segment, segmentation-image, segmentation-mask, * skybox-base-360, skybox-hdri, skybox-3d, restyle, reframe, generative-fill, * texture, texture-height, texture-normal, texture-smoothness, texture-metallic, * texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d, * txt23d, video23d, 3d23d, img2splat, 3d23d-texture, 3d-texture, 3d-texture-mtl, * 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic, * img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone, * video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video, * uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video, uploaded-text, * audio2txt, txt2txt, img2txt */ types?: Array<'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-controlnet' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-img2img' | 'inference-controlnet-reference' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-texture' | 'background-removal' | 'canvas' | 'canvas-export' | 'canvas-drawing' | 'detection' | 'patch' | 'pixelization' | 'upscale' | 'upscale-texture' | 'upscale-skybox' | 'vectorization' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-3d' | 'restyle' | 'reframe' | 'generative-fill' | 'texture' | 'texture-height' | 'texture-normal' | 'texture-smoothness' | 'texture-metallic' | 'texture-edge' | 'texture-ao' | 'texture-albedo' | 'image-prompt-editing' | 'unknown' | 'img23d' | 'txt23d' | 'video23d' | '3d23d' | 'img2splat' | '3d23d-texture' | '3d-texture' | '3d-texture-mtl' | '3d-texture-albedo' | '3d-texture-normal' | '3d-texture-roughness' | '3d-texture-metallic' | 'img2video' | 'txt2audio' | 'audio2audio' | 'audio2video' | 'video2audio' | 'voice-clone' | 'video2video' | 'video2img' | 'txt2img' | 'img2img' | 'txt2video' | 'uploaded' | 'uploaded-video' | 'uploaded-audio' | 'uploaded-3d' | 'uploaded-avatar' | 'upscale-video' | 'uploaded-text' | 'audio2txt' | 'txt2txt' | 'img2txt'>; /** * Filter results to only return assets updated after the specified ISO string date * (exclusive). Requires the sortBy parameter to be "updatedAt" */ updatedAfter?: string; /** * Filter results to only return assets updated before the specified ISO string * date (exclusive). Requires the sortBy parameter to be "updatedAt" */ updatedBefore?: string; } export interface AssetDeleteMultipleParams { /** * Body param: The ids of the assets to delete. (Max 100 at once) */ assetIds: Array; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; } export interface AssetDuplicateParams { /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The id of the project to copy the asset to. If not provided, the * asset will be copied to the canvas project. */ targetProjectId?: string; } export interface AssetGetBulkParams { /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The list of asset ids the team has read access to. Limit of 200 * assets. */ assetIds?: Array; } export interface AssetListSnapshotsParams extends SnapshotsCursorParams { /** * The number of items to return in the response. The default value is 10, maximum * value is 100, minimum value is 10 */ pageSize?: number; /** * The projectId used for ownership resource management. Either to assert ownership * or to set the owner of the resource(s) */ projectId?: string; } export interface AssetLockParams { /** * Body param: The ISO timestamp when the lock on the canvas will expire. */ lockExpiresAt: string; /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; } export interface AssetUnlockParams { /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: If true, no need to pass a lockId. */ forceUnlock?: boolean; /** * Body param: The value of the lock on this canvas. */ lockId?: string; } export interface AssetUpdateTagsParams { /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The list of tags to add */ add?: Array; /** * Body param: The list of tags to delete */ delete?: Array; /** * Body param: If true, the function will throw an error if: * * - one of the tags to add already exists * - one of the tags to delete is not found If false, the endpoint will behave as * if it was idempotent */ strict?: boolean; } export interface AssetUploadParams { /** * Body param: The original file name of the image (example: "low-res-image.jpg"). */ name: string; /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The canvas to upload as a stringified JSON. Ignored if `image` is * provided. */ canvas?: string; /** * Body param: The IDs of the collections to add the asset to. If provided, the new * asset will be added to the collections. */ collectionIds?: Array; /** * Body param: Toggles the hidden status of the asset. */ hide?: boolean; /** * Body param: The image to upload in base64 format string. */ image?: string; /** * Body param: Specifies the parent asset Id for the asset. */ parentId?: string; /** * Body param: The thumbnail for the canvas in base64 format string. Ignored if * `image` is provided. */ thumbnail?: string; } export declare namespace Assets { export { type AssetRetrieveResponse as AssetRetrieveResponse, type AssetUpdateResponse as AssetUpdateResponse, type AssetListResponse as AssetListResponse, type AssetDeleteMultipleResponse as AssetDeleteMultipleResponse, type AssetDuplicateResponse as AssetDuplicateResponse, type AssetGetBulkResponse as AssetGetBulkResponse, type AssetListSnapshotsResponse as AssetListSnapshotsResponse, type AssetLockResponse as AssetLockResponse, type AssetUnlockResponse as AssetUnlockResponse, type AssetUpdateTagsResponse as AssetUpdateTagsResponse, type AssetUploadResponse as AssetUploadResponse, type AssetListResponsesAssetsCursor as AssetListResponsesAssetsCursor, type AssetListSnapshotsResponsesSnapshotsCursor as AssetListSnapshotsResponsesSnapshotsCursor, type AssetRetrieveParams as AssetRetrieveParams, type AssetUpdateParams as AssetUpdateParams, type AssetListParams as AssetListParams, type AssetDeleteMultipleParams as AssetDeleteMultipleParams, type AssetDuplicateParams as AssetDuplicateParams, type AssetGetBulkParams as AssetGetBulkParams, type AssetListSnapshotsParams as AssetListSnapshotsParams, type AssetLockParams as AssetLockParams, type AssetUnlockParams as AssetUnlockParams, type AssetUpdateTagsParams as AssetUpdateTagsParams, type AssetUploadParams as AssetUploadParams, }; export { Download as Download, type DownloadGetStatusResponse as DownloadGetStatusResponse, type DownloadRequestResponse as DownloadRequestResponse, type DownloadRequestBatchResponse as DownloadRequestBatchResponse, type DownloadGetStatusParams as DownloadGetStatusParams, type DownloadRequestParams as DownloadRequestParams, type DownloadRequestBatchParams as DownloadRequestBatchParams, }; } //# sourceMappingURL=assets.d.ts.map