pixelkiln 0.84.0 → 0.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -14355,6 +14355,19 @@ interface ScenarioOptions {
14355
14355
  projectId?: string;
14356
14356
  /** Additional model-specific JSON inputs that cannot replace PixelKiln-owned intent. */
14357
14357
  parameters?: Record<string, unknown>;
14358
+ /**
14359
+ * The model input that takes images: a style's `styleImages` and a
14360
+ * revision's parent are uploaded to Scenario and sent here as asset ids.
14361
+ * Most image models call it `referenceImages` and take a list.
14362
+ */
14363
+ referenceParameter?: string;
14364
+ /** False for a model whose reference input takes one image rather than a list. */
14365
+ referenceArray?: boolean;
14366
+ }
14367
+ /** What the adapter needs to put one local image into a generation request. */
14368
+ interface ReferenceImage {
14369
+ base64: string;
14370
+ format: "png" | "jpeg";
14358
14371
  }
14359
14372
  interface ScenarioQuote {
14360
14373
  total: number;
@@ -14391,6 +14404,12 @@ declare class ScenarioClient {
14391
14404
  constructor(apiKey: string | undefined, apiSecret: string | undefined, baseUrl?: string, request?: typeof fetch, retry?: RetryOptions);
14392
14405
  quote(modelId: string, body: Record<string, unknown>, projectId?: string): Promise<ScenarioQuote>;
14393
14406
  submit(modelId: string, body: Record<string, unknown>, projectId?: string): Promise<string>;
14407
+ /**
14408
+ * Uploads one image (POST /assets) and returns its asset id, which a model's
14409
+ * reference input takes. Free, and idempotent per image: the id is kept by
14410
+ * content hash so a rerun does not upload the same bytes again.
14411
+ */
14412
+ uploadImage(image: ReferenceImage, projectId?: string): Promise<string>;
14394
14413
  job(id: string, projectId?: string): Promise<ScenarioJob>;
14395
14414
  asset(id: string, projectId?: string): Promise<ScenarioAsset>;
14396
14415
  download(url: string): Promise<Buffer>;
@@ -14407,6 +14426,12 @@ declare class ScenarioProvider implements Provider {
14407
14426
  static forOffline(): ScenarioProvider;
14408
14427
  static forDownloads(): ScenarioProvider;
14409
14428
  supports(generator: Generator): boolean;
14429
+ /**
14430
+ * An edit is a generation with the parent as a reference image, which the
14431
+ * editing models (GPT Image, Gemini, FLUX) take. Masked inpainting and the
14432
+ * PixelLab-specific modes have no common Scenario input.
14433
+ */
14434
+ supportsRevision(mode: RevisionMode): boolean;
14410
14435
  estimate(spec: ResolvedSpec): CostEstimate;
14411
14436
  validate(spec: ResolvedSpec, styleImages: ResolvedStyleImage[]): void;
14412
14437
  rateLimit(): RateLimit;
package/dist/index.d.ts CHANGED
@@ -14355,6 +14355,19 @@ interface ScenarioOptions {
14355
14355
  projectId?: string;
14356
14356
  /** Additional model-specific JSON inputs that cannot replace PixelKiln-owned intent. */
14357
14357
  parameters?: Record<string, unknown>;
14358
+ /**
14359
+ * The model input that takes images: a style's `styleImages` and a
14360
+ * revision's parent are uploaded to Scenario and sent here as asset ids.
14361
+ * Most image models call it `referenceImages` and take a list.
14362
+ */
14363
+ referenceParameter?: string;
14364
+ /** False for a model whose reference input takes one image rather than a list. */
14365
+ referenceArray?: boolean;
14366
+ }
14367
+ /** What the adapter needs to put one local image into a generation request. */
14368
+ interface ReferenceImage {
14369
+ base64: string;
14370
+ format: "png" | "jpeg";
14358
14371
  }
14359
14372
  interface ScenarioQuote {
14360
14373
  total: number;
@@ -14391,6 +14404,12 @@ declare class ScenarioClient {
14391
14404
  constructor(apiKey: string | undefined, apiSecret: string | undefined, baseUrl?: string, request?: typeof fetch, retry?: RetryOptions);
14392
14405
  quote(modelId: string, body: Record<string, unknown>, projectId?: string): Promise<ScenarioQuote>;
14393
14406
  submit(modelId: string, body: Record<string, unknown>, projectId?: string): Promise<string>;
14407
+ /**
14408
+ * Uploads one image (POST /assets) and returns its asset id, which a model's
14409
+ * reference input takes. Free, and idempotent per image: the id is kept by
14410
+ * content hash so a rerun does not upload the same bytes again.
14411
+ */
14412
+ uploadImage(image: ReferenceImage, projectId?: string): Promise<string>;
14394
14413
  job(id: string, projectId?: string): Promise<ScenarioJob>;
14395
14414
  asset(id: string, projectId?: string): Promise<ScenarioAsset>;
14396
14415
  download(url: string): Promise<Buffer>;
@@ -14407,6 +14426,12 @@ declare class ScenarioProvider implements Provider {
14407
14426
  static forOffline(): ScenarioProvider;
14408
14427
  static forDownloads(): ScenarioProvider;
14409
14428
  supports(generator: Generator): boolean;
14429
+ /**
14430
+ * An edit is a generation with the parent as a reference image, which the
14431
+ * editing models (GPT Image, Gemini, FLUX) take. Masked inpainting and the
14432
+ * PixelLab-specific modes have no common Scenario input.
14433
+ */
14434
+ supportsRevision(mode: RevisionMode): boolean;
14410
14435
  estimate(spec: ResolvedSpec): CostEstimate;
14411
14436
  validate(spec: ResolvedSpec, styleImages: ResolvedStyleImage[]): void;
14412
14437
  rateLimit(): RateLimit;