## List **get** `/usages` Provide usage data for the given filters. Such as consumed compute units, number of assets generated, etc. Maximum time range with custom startDate and endDate is 120 days. Granularity is calculated based on the time range. ### Query Parameters - `activityOffset: optional number` The offset for the activity data. Default is 0. If bad offset or empty, 0 will be returned. Must be a positive integer. - `endDate: optional string` The end date of the usage in ISO 8601 format. If not provided, use default timeRange. If provided, startDate is required. - `projectIds: optional string` The project ids for filtering the usage data. If not provided, use all projects. Can be one or more comma separated values. - `startDate: optional string` The start date of the usage in ISO 8601 format. If not provided, use default timeRange. If provided, endDate is required. - `timeRange: optional "last-hour" or "last-day" or "last-three-days" or 2 more` The time range of the usage. If not provided, use default timeRange. If startDate and endDate provided, timeRange is ignored. - `"last-hour"` - `"last-day"` - `"last-three-days"` - `"last-seven-days"` - `"last-thirty-one-days"` - `type: optional array of "usages" or "activity" or "consumption" or 3 more` The type of the usage data. Can be one or more comma separated values. Can be any of the following values: usages, activity, consumption, model-usages, asset-usages, nsfw-usages. Default is all types. If bad type or empty, all types will be returned. - `"usages"` - `"activity"` - `"consumption"` - `"model-usages"` - `"asset-usages"` - `"nsfw-usages"` - `userId: optional string` The unique identifier of the user for the usage. If not provided, returns all usages for the team. - `userIds: optional string` The unique identifiers of the users for filtering the usage data. If not provided, use all users. Can be one or more comma separated values. ### Returns - `activity: optional array of object { action, data, projectId, 3 more }` - `action: "asset" or "asset-privacy" or "assistant-message" or 94 more` The action name - `"asset"` - `"asset-privacy"` - `"assistant-message"` - `"background-removal"` - `"byok-remove-project-provider"` - `"byok-remove-provider"` - `"byok-set-project-provider"` - `"byok-set-provider"` - `"captioning"` - `"collection"` - `"collection-assets"` - `"collection-models"` - `"controlnet"` - `"controlnet-img2img"` - `"controlnet-inpaint"` - `"controlnet-ip-adapter"` - `"controlnet-texture"` - `"copy-asset"` - `"copy-model"` - `"creative-unit-cost"` - `"creative-unit-discount"` - `"custom"` - `"custom-asset-created"` - `"delete-asset"` - `"delete-collection"` - `"delete-collection-assets"` - `"delete-collection-models"` - `"delete-inference-image"` - `"delete-model"` - `"delete-model-preset"` - `"delete-oscu-auto-refill"` - `"delete-project-member"` - `"delete-subscription"` - `"delete-team-api-key"` - `"delete-team-invitations"` - `"delete-team-member"` - `"delete-training-images"` - `"describe-style"` - `"detection"` - `"disable-project-model"` - `"disable-team-model"` - `"download-assets"` - `"download-model"` - `"embed"` - `"enable-project-model"` - `"enable-team-model"` - `"generative-fill"` - `"image-prompt-editing"` - `"images-generation"` - `"img2img"` - `"img2img-ip-adapter"` - `"img2img-texture"` - `"inference"` - `"inpaint"` - `"inpaint-ip-adapter"` - `"model"` - `"model-preset"` - `"models-training"` - `"oscu"` - `"patch"` - `"pixelate"` - `"project"` - `"project-member"` - `"reframe"` - `"repaint"` - `"restyle"` - `"segmentation"` - `"skybox-base-360"` - `"skybox-upscale-360"` - `"start-train"` - `"subscription"` - `"subscription-seats"` - `"tag-asset"` - `"tag-model"` - `"team-api-key"` - `"team-member"` - `"texture"` - `"train-succeeded"` - `"training-images-to-model"` - `"transfer-model"` - `"txt2img"` - `"txt2img-ip-adapter"` - `"update-asset"` - `"update-collection"` - `"update-model"` - `"update-model-description"` - `"update-model-examples"` - `"update-model-prompt-guide"` - `"update-oscu-auto-refill"` - `"update-project"` - `"update-project-instructions"` - `"update-subscription"` - `"update-team"` - `"update-team-instructions"` - `"update-team-member"` - `"upscale"` - `"vectorization"` - `data: object { assetId, byokProvider, collectionId, 3 more }` The additional data of the action - `assetId: optional string` The asset for this action - `byokProvider: optional object { id, displayName }` The BYOK provider information for this action Only set if the action is a BYOK action (byok-set-provider or byok-remove-provider) - `id: string` - `displayName: string` - `collectionId: optional string` The collection for this action - `isApiKey: optional boolean` Whether the action is an API key action - `jobId: optional string` The job for this action - `modelId: optional string` The model for this action - `projectId: string` The projectId of the project for this action - `time: string` The UTC ISO date of the point - `userId: string` The unique identifier of the user for this action - `creativeUnitsCost: optional number` The Compute Units cost for this action - `assetUsages: optional array of object { kind, points }` - `kind: "3d" or "audio" or "document" or 4 more` - `"3d"` - `"audio"` - `"document"` - `"image"` - `"image-hdr"` - `"json"` - `"video"` - `points: array of object { count, countApiKey, time }` The data points - `count: number` Number of assets created - `countApiKey: number` Number of assets created via an API key - `time: string` The UTC ISO date of the point - `consumption: optional array of object { discount, total, userId, value }` - `discount: number` The Creative Units discount for the user - `total: number` The total consumption for the user (value + discount) - `userId: string` The unique identifier of the user - `value: number` The Compute Units consumption for the user - `entities: optional object { assets, collections, jobs, 2 more }` - `assets: optional array of object { id, kind, metadata, 2 more }` - `id: string` The asset ID - `kind: "3d" or "audio" or "document" or 4 more` The kind of the asset - `"3d"` - `"audio"` - `"document"` - `"image"` - `"image-hdr"` - `"json"` - `"video"` - `metadata: object { type }` Partial metadata of the asset - `type: "3d-texture" or "3d-texture-albedo" or "3d-texture-metallic" or 72 more` The type of the asset - `"3d-texture"` - `"3d-texture-albedo"` - `"3d-texture-metallic"` - `"3d-texture-mtl"` - `"3d-texture-normal"` - `"3d-texture-roughness"` - `"3d23d"` - `"3d23d-texture"` - `"audio2audio"` - `"audio2video"` - `"background-removal"` - `"canvas"` - `"canvas-drawing"` - `"canvas-export"` - `"detection"` - `"generative-fill"` - `"image-prompt-editing"` - `"img23d"` - `"img2img"` - `"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"` - `"txt2video"` - `"unknown"` - `"uploaded"` - `"uploaded-3d"` - `"uploaded-audio"` - `"uploaded-avatar"` - `"uploaded-video"` - `"upscale"` - `"upscale-skybox"` - `"upscale-texture"` - `"upscale-video"` - `"vectorization"` - `"video23d"` - `"video2audio"` - `"video2img"` - `"video2video"` - `"voice-clone"` - `properties: object { size, animationFrameCount, bitrate, 20 more }` The properties of the asset - `size: number` - `animationFrameCount: optional number` Number of animation frames if animations exist - `bitrate: optional number` Bitrate of the media in bits per second - `boneCount: optional number` Number of bones if skeleton exists - `channels: optional number` Number of channels of the audio - `classification: optional "effect" or "interview" or "music" or 5 more` Classification of the audio - `"effect"` - `"interview"` - `"music"` - `"other"` - `"sound"` - `"speech"` - `"text"` - `"unknown"` - `codecName: optional string` Codec name of the media - `description: optional string` Description of the audio - `dimensions: optional array of number` Bounding box dimensions [width, height, depth] - `duration: optional number` Duration of the media in seconds - `faceCount: optional number` Number of faces/triangles in the mesh - `format: optional string` Format of the mesh file (e.g. 'glb', etc.) - `frameRate: optional number` Frame rate of the video in frames per second - `hasAnimations: optional boolean` Whether the mesh has animations - `hasNormals: optional boolean` Whether the mesh has normal vectors - `hasSkeleton: optional boolean` Whether the mesh has bones/skeleton - `hasUVs: optional boolean` Whether the mesh has UV coordinates - `height: optional number` - `nbFrames: optional number` Number of frames in the video - `sampleRate: optional number` Sample rate of the media in Hz - `transcription: optional object { text }` Transcription of the audio - `text: string` - `vertexCount: optional number` Number of vertices in the mesh - `width: optional number` - `source: "3d23d" or "3d23d:texture" or "3d:texture" or 72 more` The source of the asset - `"3d23d"` - `"3d23d:texture"` - `"3d:texture"` - `"3d:texture:albedo"` - `"3d:texture:metallic"` - `"3d:texture:mtl"` - `"3d:texture:normal"` - `"3d:texture:roughness"` - `"audio2audio"` - `"audio2video"` - `"background-removal"` - `"canvas"` - `"canvas-drawing"` - `"canvas-export"` - `"detection"` - `"generative-fill"` - `"image-prompt-editing"` - `"img23d"` - `"img2img"` - `"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"` - `"txt2video"` - `"unknown"` - `"uploaded"` - `"uploaded-3d"` - `"uploaded-audio"` - `"uploaded-avatar"` - `"uploaded-video"` - `"upscale"` - `"upscale-skybox"` - `"upscale-texture"` - `"upscale-video"` - `"vectorization"` - `"video23d"` - `"video2audio"` - `"video2img"` - `"video2video"` - `"voice-clone"` - `collections: optional array of object { id, name }` - `id: string` The collection ID - `name: string` The name of the collection - `jobs: optional array of object { id, jobType, metadata, status }` - `id: string` The job ID - `jobType: "assets-download" or "canvas-export" or "caption" or 36 more` The job type - `"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"` - `"texture"` - `"translate"` - `"upload"` - `"upscale"` - `"upscale-skybox"` - `"upscale-texture"` - `"vectorize"` - `"workflow"` - `metadata: object { assetIds, error, flow, 6 more }` The metadata of the job - `assetIds: optional array of string` List of produced assets for this job - `error: optional string` Eventual error for the job - `flow: optional array of object { id, status, type, 15 more }` The flow of the job. Only available for workflow jobs. - `id: string` The id of the node. - `status: "failure" or "pending" or "processing" or 2 more` The status of the node. Only available for WorkflowJob nodes. - `"failure"` - `"pending"` - `"processing"` - `"skipped"` - `"success"` - `type: "custom-model" or "for-each" or "generate-prompt" or 7 more` The type of the job for the node. - `"custom-model"` - `"for-each"` - `"generate-prompt"` - `"list"` - `"logic"` - `"model"` - `"remove-background"` - `"transform"` - `"user-approval"` - `"workflow"` - `assets: optional array of object { assetId, url }` List of produced assets for this node. - `assetId: string` - `url: string` - `count: optional number` 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. - `dependsOn: optional array of string` The nodes that this node depends on. Only available for nodes that have dependencies. Mainly used for user approval nodes. - `includeOutputsInWorkflowJob: optional true` 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. - `true` - `inputs: optional array of object { name, type, allowedValues, 26 more }` The inputs of the node. - `name: string` The name that must be user to call the model through the API - `type: "boolean" or "file" or "file_array" or 7 more` The data type of the input - `"boolean"` - `"file"` - `"file_array"` - `"inputs_array"` - `"model"` - `"model_array"` - `"number"` - `"number_array"` - `"string"` - `"string_array"` - `allowedValues: optional array of unknown` 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. - `backgroundBehavior: optional "opaque" or "transparent"` Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`. - `"opaque"` - `"transparent"` - `color: optional boolean` Whether the input is a color or not. Only available for `string` input type. - `costImpact: optional boolean` Whether this input affects the model's cost calculation - `default: optional unknown` The default value for the input - `description: optional string` Help text displayed in the UI to provide additional information about the input - `group: optional string` Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI. - `hint: optional string` Hint text displayed in the UI as a tooltip to guide the user - `inputs: optional array of map[unknown]` 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. - `items: optional array of array of object { name, type, allowedValues, 25 more }` 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. - `name: string` The name that must be user to call the model through the API - `type: "boolean" or "file" or "file_array" or 7 more` The data type of the input - `"boolean"` - `"file"` - `"file_array"` - `"inputs_array"` - `"model"` - `"model_array"` - `"number"` - `"number_array"` - `"string"` - `"string_array"` - `allowedValues: optional array of unknown` 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. - `backgroundBehavior: optional "opaque" or "transparent"` Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`. - `"opaque"` - `"transparent"` - `color: optional boolean` Whether the input is a color or not. Only available for `string` input type. - `costImpact: optional boolean` Whether this input affects the model's cost calculation - `default: optional unknown` The default value for the input - `description: optional string` Help text displayed in the UI to provide additional information about the input - `group: optional string` Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI. - `hint: optional string` Hint text displayed in the UI as a tooltip to guide the user - `inputs: optional array of map[unknown]` 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. - `kind: optional "3d" or "audio" or "document" or 4 more` 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 - `"3d"` - `"audio"` - `"document"` - `"image"` - `"image-hdr"` - `"json"` - `"video"` - `label: optional string` The label displayed in the UI for this input - `maskFrom: optional string` The name of the file input field to use as the mask source - `max: optional number` The maximum allowed value. Only available for `number` and `array` input types. - `maxLength: optional number` The maximum allowed length for `string` inputs. Also applies to each item in `string_array`. - `maxSize: optional 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. - `min: optional number` The minimum allowed value. Only available for `number` and array input types. - `minLength: optional number` The minimum allowed length for string inputs. Also applies to each item in `string_array`. - `modelTypes: optional array of "custom" or "elevenlabs-voice" or "flux.1" or 34 more` The allowed model types for this input. Example: `["flux.1-lora"]`. Only available for `model_array` input type. - `"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"` - `"sd-1_5"` - `"sd-1_5-composition"` - `"sd-1_5-lora"` - `"sd-xl"` - `"sd-xl-composition"` - `"sd-xl-lora"` - `"zimage-de-turbo-lora"` - `"zimage-lora"` - `"zimage-turbo-lora"` - `parent: optional boolean` 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. - `placeholder: optional string` Placeholder text for the input. Only available for 'string' input type. - `prompt: optional boolean` Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type. - `promptSpark: optional boolean` Whether the input is used with prompt spark. Only available for `string` input type. - `ref: optional object { conditional, equal, name, node }` The reference to another input or output of the same workflow. Must have at least one of node or conditional. - `conditional: optional array of string` 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. - `equal: optional string` This is the desired node output value if ref is an if/else node. - `name: optional 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'. - `node: optional string` The node id or 'workflow' if the source is a workflow input. - `required: optional object { always, conditionalValues, ifDefined, ifNotDefined }` 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. - `always: optional boolean` Whether the input is always required - `conditionalValues: optional unknown` 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 - `ifDefined: optional 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 - `ifNotDefined: optional 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 - `step: optional number` The step increment for numeric inputs. Only available for `number` input type. - `value: optional unknown` 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. - `kind: optional "3d" or "audio" or "document" or 4 more` 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 - `"3d"` - `"audio"` - `"document"` - `"image"` - `"image-hdr"` - `"json"` - `"video"` - `label: optional string` The label displayed in the UI for this input - `maskFrom: optional string` The name of the file input field to use as the mask source - `max: optional number` The maximum allowed value. Only available for `number` and `array` input types. - `maxLength: optional number` The maximum allowed length for `string` inputs. Also applies to each item in `string_array`. - `maxSize: optional 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. - `min: optional number` The minimum allowed value. Only available for `number` and array input types. - `minLength: optional number` The minimum allowed length for string inputs. Also applies to each item in `string_array`. - `modelTypes: optional array of "custom" or "elevenlabs-voice" or "flux.1" or 34 more` The allowed model types for this input. Example: `["flux.1-lora"]`. Only available for `model_array` input type. - `"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"` - `"sd-1_5"` - `"sd-1_5-composition"` - `"sd-1_5-lora"` - `"sd-xl"` - `"sd-xl-composition"` - `"sd-xl-lora"` - `"zimage-de-turbo-lora"` - `"zimage-lora"` - `"zimage-turbo-lora"` - `parent: optional boolean` 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. - `placeholder: optional string` Placeholder text for the input. Only available for 'string' input type. - `prompt: optional boolean` Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type. - `promptSpark: optional boolean` Whether the input is used with prompt spark. Only available for `string` input type. - `ref: optional object { conditional, equal, name, node }` The reference to another input or output of the same workflow. Must have at least one of node or conditional. - `conditional: optional array of string` 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. - `equal: optional string` This is the desired node output value if ref is an if/else node. - `name: optional 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'. - `node: optional string` The node id or 'workflow' if the source is a workflow input. - `required: optional object { always, conditionalValues, ifDefined, ifNotDefined }` 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. - `always: optional boolean` Whether the input is always required - `conditionalValues: optional unknown` 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 - `ifDefined: optional 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 - `ifNotDefined: optional 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 - `step: optional number` The step increment for numeric inputs. Only available for `number` input type. - `value: optional unknown` 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. - `items: optional array of string` 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. - `iterationIndex: optional number` Zero-based index of the iteration this node copy belongs to. Set on dynamically-created copies of loop body nodes. - `jobId: optional string` 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. - `logic: optional object { cases, default, transform }` The logic of the node. Only available for logic nodes. - `cases: optional array of object { condition, value }` The cases of the logic. Only available for if/else nodes. - `condition: string` - `value: string` - `default: optional string` 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. - `transform: optional string` The transform of the logic. Only available for transform nodes. - `logicType: optional "if-else"` The type of the logic for the node. Only available for logic nodes. - `"if-else"` - `loopBodyNodeIds: optional array of string` 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. - `loopNodeId: optional string` ID of the ForEach node that spawned this iteration copy. Set on dynamically-created copies of loop body nodes. - `modelId: optional string` The model id for the node. Mainly used for custom model tasks. - `output: optional unknown` The output of the node. Only available for logic nodes. - `workflowId: optional string` The workflow id for the node. Mainly used for workflow tasks. - `hint: optional string` Actionable hint for the user explaining what went wrong and how to resolve it. - `input: optional map[unknown]` The inputs for the job - `output: optional map[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. - `outputModelId: optional string` For voice-clone jobs: the ID of the model being trained. - `workflowId: optional string` The workflow ID of the job if job is part of a workflow. - `workflowJobId: optional string` The workflow job ID of the job if job is part of a workflow job. - `status: "canceled" or "failure" or "finalizing" or 5 more` The status of the job - `"canceled"` - `"failure"` - `"finalizing"` - `"in-progress"` - `"pending"` - `"queued"` - `"success"` - `"warming-up"` - `models: optional array of object { id, name, shortDescription }` - `id: string` The model ID - `name: string` The name of the model - `shortDescription: optional string` The short description of the model - `users: optional array of object { id, isApiKey, apiKeyId, 4 more }` - `id: string` The user ID - `isApiKey: boolean` Whether the user is an API key - `apiKeyId: optional string` The API key ID Will be available: - if the user is an API key - `apiKeyStatus: optional "active" or "deleted" or "inactive"` The API key status Will be available: - if the user is an API key - `"active"` - `"deleted"` - `"inactive"` - `avatar: optional object { assetId, url }` The user avatar Will be available: - if the user hasn't left the Scenario platform - if the user isn't an API key - `assetId: optional string` ID of the asset used as thumbnail if provided, otherwise undefined - `url: optional string` Signed URL of the assetId or free url if assetId is undefined - `email: optional string` The email of the user Will be available: - if the user hasn't left the Scenario platform - if the user isn't an API key - `fullName: optional string` The full name of the user Will be available: - if the user hasn't left the Scenario platform - if the user isn't an API key - `modelUsages: optional array of object { modelId, points }` - `modelId: string` - `points: array of object { apiKeyCost, apiKeyDiscount, cost, 3 more }` The data points - `apiKeyCost: number` Cost for model usage for API key only - `apiKeyDiscount: number` The discount for model usage for API key only - `cost: number` Cost for model usage - `discount: number` The discount for model usage - `jobs: number` Number of jobs for the model usage - `time: string` The UTC ISO date of the point - `nsfwUsages: optional array of object { label, points }` - `label: string` - `points: array of object { count, countApiKey, time }` The data points - `count: number` Number of NSFW assets created - `countApiKey: number` Number of NSFW assets created via an API key - `time: string` The UTC ISO date of the point - `usages: optional array of object { granularity, points, usageName }` - `granularity: "15m" or "1d" or "1h" or 4 more` Granularity for points (example: "1d", "1h", "1m", "15m") - `"15m"` - `"1d"` - `"1h"` - `"1m"` - `"30m"` - `"5m"` - `"7d"` - `points: array of object { apiKey, time, value }` The usage data points - `apiKey: string` Value of the point for API key only - `time: string` The UTC ISO date of the point - `value: string` Value of the point - `usageName: "background-removal" or "captioning" or "creative-unit-cost" or 17 more` Name of the usage points (example: "images-generation", "generators-training", "background-removal", "upscale", ...) - `"background-removal"` - `"captioning"` - `"creative-unit-cost"` - `"creative-unit-discount"` - `"custom"` - `"custom-asset-created"` - `"detection"` - `"image-prompt-editing"` - `"images-generation"` - `"models-training"` - `"patch"` - `"pixelate"` - `"repaint"` - `"restyle"` - `"segmentation"` - `"skybox-base-360"` - `"skybox-upscale-360"` - `"texture"` - `"upscale"` - `"vectorization"` ### Example ```http curl https://api.cloud.scenario.com/v1/usages \ -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" ``` #### Response ```json { "activity": [ { "action": "asset", "data": { "assetId": "assetId", "byokProvider": { "id": "id", "displayName": "displayName" }, "collectionId": "collectionId", "isApiKey": true, "jobId": "jobId", "modelId": "modelId" }, "projectId": "projectId", "time": "time", "userId": "userId", "creativeUnitsCost": 0 } ], "assetUsages": [ { "kind": "3d", "points": [ { "count": 0, "countApiKey": 0, "time": "time" } ] } ], "consumption": [ { "discount": 0, "total": 0, "userId": "userId", "value": 0 } ], "entities": { "assets": [ { "id": "id", "kind": "3d", "metadata": { "type": "3d-texture" }, "properties": { "size": 0, "animationFrameCount": 0, "bitrate": 0, "boneCount": 0, "channels": 0, "classification": "effect", "codecName": "codecName", "description": "description", "dimensions": [ 0, 0, 0 ], "duration": 0, "faceCount": 0, "format": "format", "frameRate": 0, "hasAnimations": true, "hasNormals": true, "hasSkeleton": true, "hasUVs": true, "height": 0, "nbFrames": 0, "sampleRate": 0, "transcription": { "text": "text" }, "vertexCount": 0, "width": 0 }, "source": "3d23d" } ], "collections": [ { "id": "id", "name": "name" } ], "jobs": [ { "id": "id", "jobType": "assets-download", "metadata": { "assetIds": [ "string" ], "error": "error", "flow": [ { "id": "id", "status": "failure", "type": "custom-model", "assets": [ { "assetId": "assetId", "url": "url" } ], "count": 0, "dependsOn": [ "string" ], "includeOutputsInWorkflowJob": true, "inputs": [ { "name": "name", "type": "boolean", "allowedValues": [ {} ], "backgroundBehavior": "opaque", "color": true, "costImpact": true, "default": {}, "description": "description", "group": "group", "hint": "hint", "inputs": [ { "foo": "bar" } ], "items": [ [ { "name": "name", "type": "boolean", "allowedValues": [ {} ], "backgroundBehavior": "opaque", "color": true, "costImpact": true, "default": {}, "description": "description", "group": "group", "hint": "hint", "inputs": [ { "foo": "bar" } ], "kind": "3d", "label": "label", "maskFrom": "maskFrom", "max": 0, "maxLength": 0, "maxSize": 0, "min": 0, "minLength": 0, "modelTypes": [ "custom" ], "parent": true, "placeholder": "placeholder", "prompt": true, "promptSpark": true, "ref": { "conditional": [ "string" ], "equal": "equal", "name": "name", "node": "node" }, "required": { "always": true, "conditionalValues": {}, "ifDefined": {}, "ifNotDefined": {} }, "step": 1, "value": {} } ] ], "kind": "3d", "label": "label", "maskFrom": "maskFrom", "max": 0, "maxLength": 0, "maxSize": 0, "min": 0, "minLength": 0, "modelTypes": [ "custom" ], "parent": true, "placeholder": "placeholder", "prompt": true, "promptSpark": true, "ref": { "conditional": [ "string" ], "equal": "equal", "name": "name", "node": "node" }, "required": { "always": true, "conditionalValues": {}, "ifDefined": {}, "ifNotDefined": {} }, "step": 1, "value": {} } ], "items": [ "string" ], "iterationIndex": 0, "jobId": "jobId", "logic": { "cases": [ { "condition": "condition", "value": "value" } ], "default": "default", "transform": "transform" }, "logicType": "if-else", "loopBodyNodeIds": [ "string" ], "loopNodeId": "loopNodeId", "modelId": "modelId", "output": {}, "workflowId": "workflowId" } ], "hint": "hint", "input": { "foo": "bar" }, "output": { "foo": "bar" }, "outputModelId": "outputModelId", "workflowId": "workflowId", "workflowJobId": "workflowJobId" }, "status": "canceled" } ], "models": [ { "id": "id", "name": "name", "shortDescription": "shortDescription" } ], "users": [ { "id": "id", "isApiKey": true, "apiKeyId": "apiKeyId", "apiKeyStatus": "active", "avatar": { "assetId": "assetId", "url": "url" }, "email": "email", "fullName": "fullName" } ] }, "modelUsages": [ { "modelId": "modelId", "points": [ { "apiKeyCost": 0, "apiKeyDiscount": 0, "cost": 0, "discount": 0, "jobs": 0, "time": "time" } ] } ], "nsfwUsages": [ { "label": "label", "points": [ { "count": 0, "countApiKey": 0, "time": "time" } ] } ], "usages": [ { "granularity": "15m", "points": [ { "apiKey": "apiKey", "time": "time", "value": "value" } ], "usageName": "background-removal" } ] } ```