import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class TrainingImages extends APIResource { /** * Delete the given `trainingImageId` from the given `modelId` */ delete(trainingImageID: string, params: TrainingImageDeleteParams, options?: RequestOptions): APIPromise; /** * Add a new training image to the given `modelId` */ add(modelID: string, params: TrainingImageAddParams, options?: RequestOptions): APIPromise; /** * Replace the given `trainingImageId` for the given `modelId` */ replace(trainingImageID: string, params: TrainingImageReplaceParams, options?: RequestOptions): APIPromise; /** * Replace all training image pairs for the given `modelId` */ replacePairs(modelID: string, params: TrainingImageReplacePairsParams, options?: RequestOptions): APIPromise; } export type TrainingImageDeleteResponse = unknown; export interface TrainingImageAddResponse { trainingImage: TrainingImageAddResponse.TrainingImage; } export declare namespace TrainingImageAddResponse { interface TrainingImage { /** * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * Automatic captioning of the image */ automaticCaptioning: string; /** * The training image upload date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Description for the image */ description: string; /** * The URL of the image */ downloadUrl: string; /** * The original file name of the image (example: "my-training-image.jpg") */ name: string; } } export interface TrainingImageReplaceResponse { trainingImage: TrainingImageReplaceResponse.TrainingImage; } export declare namespace TrainingImageReplaceResponse { interface TrainingImage { /** * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * Automatic captioning of the image */ automaticCaptioning: string; /** * The training image upload date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Description for the image */ description: string; /** * The URL of the image */ downloadUrl: string; /** * The original file name of the image (example: "my-training-image.jpg") */ name: string; } } export interface TrainingImageReplacePairsResponse { /** * Number of training image pairs */ count: number; /** * Array of training image pairs */ pairs: Array; } export declare namespace TrainingImageReplacePairsResponse { interface Pair { /** * The instruction for the image pair, source to target */ instruction?: string; /** * The source asset ID (must be a training asset) */ sourceId?: string; /** * The target asset ID (must be a training asset) */ targetId?: string; } } export interface TrainingImageDeleteParams { /** * Path param: The training image's `modelId` */ modelId: string; /** * 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 TrainingImageAddParams { /** * 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 asset ID to use as a training image (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw"). If provided, "data" and "name" parameters will * be ignored. */ assetId?: string; /** * Body param: The asset IDs to use as training images (example: * ["asset_GTrL3mq4SXWyMxkOHRxlpw", "asset_GTrL3mq4SXWyMxkOHRxlpw"]) Used in batch * mode, up to 10 asset IDs are allowed. Cannot be used with "assetId" or "data" * and "name" parameters. */ assetIds?: Array; /** * Body param: The training image as a data URL (example: * "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=") */ data?: string; /** * Body param: The original file name of the image (example: * "my-training-image.jpg") */ name?: string; /** * Body param: The preset to use for training images */ preset?: 'default' | 'style' | 'subject'; } export interface TrainingImageReplaceParams { /** * Path param: The training image's `modelId` */ modelId: 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 asset ID to use as a training image (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw"). If provided, "data" and "name" parameters will * be ignored. */ assetId?: string; /** * Body param: The asset IDs to use as training images (example: * ["asset_GTrL3mq4SXWyMxkOHRxlpw", "asset_GTrL3mq4SXWyMxkOHRxlpw"]) Used in batch * mode, up to 10 asset IDs are allowed. Cannot be used with "assetId" or "data" * and "name" parameters. */ assetIds?: Array; /** * Body param: The training image as a data URL (example: * "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=") */ data?: string; /** * Body param: The original file name of the image (example: * "my-training-image.jpg") */ name?: string; /** * Body param: The preset to use for training images */ preset?: 'default' | 'style' | 'subject'; } export interface TrainingImageReplacePairsParams { /** * Body param: Array of training image pairs */ body: 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 declare namespace TrainingImageReplacePairsParams { interface Body { /** * The instruction for the image pair, source to target */ instruction?: string; /** * The source asset ID (must be a training asset) */ sourceId?: string; /** * The target asset ID (must be a training asset) */ targetId?: string; } } export declare namespace TrainingImages { export { type TrainingImageDeleteResponse as TrainingImageDeleteResponse, type TrainingImageAddResponse as TrainingImageAddResponse, type TrainingImageReplaceResponse as TrainingImageReplaceResponse, type TrainingImageReplacePairsResponse as TrainingImageReplacePairsResponse, type TrainingImageDeleteParams as TrainingImageDeleteParams, type TrainingImageAddParams as TrainingImageAddParams, type TrainingImageReplaceParams as TrainingImageReplaceParams, type TrainingImageReplacePairsParams as TrainingImageReplacePairsParams, }; } //# sourceMappingURL=training-images.d.ts.map