@cloudflare/workers-types 4.20250311.0 → 4.20250312.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.
@@ -4363,7 +4363,12 @@ type AIGatewayProviders =
4363
4363
  | "google-ai-studio"
4364
4364
  | "mistral"
4365
4365
  | "grok"
4366
- | "openrouter";
4366
+ | "openrouter"
4367
+ | "deepseek"
4368
+ | "cerebras"
4369
+ | "cartesia"
4370
+ | "elevenlabs"
4371
+ | "adobe-firefly";
4367
4372
  type AIGatewayHeaders = {
4368
4373
  "cf-aig-metadata":
4369
4374
  | Record<string, number | string | boolean | null | bigint>
@@ -4399,6 +4404,7 @@ declare abstract class AiGateway {
4399
4404
  run(
4400
4405
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4401
4406
  ): Promise<Response>;
4407
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4402
4408
  }
4403
4409
  interface BasicImageTransformations {
4404
4410
  /**
@@ -6584,6 +6590,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6584
6590
  public create(
6585
6591
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6586
6592
  ): Promise<WorkflowInstance>;
6593
+ /**
6594
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6595
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6596
+ * @param batch List of Options when creating an instance including name and params
6597
+ * @returns A promise that resolves with a list of handles for the created instances.
6598
+ */
6599
+ public createBatch(
6600
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6601
+ ): Promise<WorkflowInstance[]>;
6587
6602
  }
6588
6603
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6589
6604
  /**
@@ -4377,7 +4377,12 @@ export type AIGatewayProviders =
4377
4377
  | "google-ai-studio"
4378
4378
  | "mistral"
4379
4379
  | "grok"
4380
- | "openrouter";
4380
+ | "openrouter"
4381
+ | "deepseek"
4382
+ | "cerebras"
4383
+ | "cartesia"
4384
+ | "elevenlabs"
4385
+ | "adobe-firefly";
4381
4386
  export type AIGatewayHeaders = {
4382
4387
  "cf-aig-metadata":
4383
4388
  | Record<string, number | string | boolean | null | bigint>
@@ -4413,6 +4418,7 @@ export declare abstract class AiGateway {
4413
4418
  run(
4414
4419
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4415
4420
  ): Promise<Response>;
4421
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4416
4422
  }
4417
4423
  export interface BasicImageTransformations {
4418
4424
  /**
@@ -6485,6 +6491,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6485
6491
  public create(
6486
6492
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6487
6493
  ): Promise<WorkflowInstance>;
6494
+ /**
6495
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6496
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6497
+ * @param batch List of Options when creating an instance including name and params
6498
+ * @returns A promise that resolves with a list of handles for the created instances.
6499
+ */
6500
+ public createBatch(
6501
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6502
+ ): Promise<WorkflowInstance[]>;
6488
6503
  }
6489
6504
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6490
6505
  /**
@@ -4389,7 +4389,12 @@ type AIGatewayProviders =
4389
4389
  | "google-ai-studio"
4390
4390
  | "mistral"
4391
4391
  | "grok"
4392
- | "openrouter";
4392
+ | "openrouter"
4393
+ | "deepseek"
4394
+ | "cerebras"
4395
+ | "cartesia"
4396
+ | "elevenlabs"
4397
+ | "adobe-firefly";
4393
4398
  type AIGatewayHeaders = {
4394
4399
  "cf-aig-metadata":
4395
4400
  | Record<string, number | string | boolean | null | bigint>
@@ -4425,6 +4430,7 @@ declare abstract class AiGateway {
4425
4430
  run(
4426
4431
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4427
4432
  ): Promise<Response>;
4433
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4428
4434
  }
4429
4435
  interface BasicImageTransformations {
4430
4436
  /**
@@ -6610,6 +6616,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6610
6616
  public create(
6611
6617
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6612
6618
  ): Promise<WorkflowInstance>;
6619
+ /**
6620
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6621
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6622
+ * @param batch List of Options when creating an instance including name and params
6623
+ * @returns A promise that resolves with a list of handles for the created instances.
6624
+ */
6625
+ public createBatch(
6626
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6627
+ ): Promise<WorkflowInstance[]>;
6613
6628
  }
6614
6629
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6615
6630
  /**
@@ -4403,7 +4403,12 @@ export type AIGatewayProviders =
4403
4403
  | "google-ai-studio"
4404
4404
  | "mistral"
4405
4405
  | "grok"
4406
- | "openrouter";
4406
+ | "openrouter"
4407
+ | "deepseek"
4408
+ | "cerebras"
4409
+ | "cartesia"
4410
+ | "elevenlabs"
4411
+ | "adobe-firefly";
4407
4412
  export type AIGatewayHeaders = {
4408
4413
  "cf-aig-metadata":
4409
4414
  | Record<string, number | string | boolean | null | bigint>
@@ -4439,6 +4444,7 @@ export declare abstract class AiGateway {
4439
4444
  run(
4440
4445
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4441
4446
  ): Promise<Response>;
4447
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4442
4448
  }
4443
4449
  export interface BasicImageTransformations {
4444
4450
  /**
@@ -6511,6 +6517,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6511
6517
  public create(
6512
6518
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6513
6519
  ): Promise<WorkflowInstance>;
6520
+ /**
6521
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6522
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6523
+ * @param batch List of Options when creating an instance including name and params
6524
+ * @returns A promise that resolves with a list of handles for the created instances.
6525
+ */
6526
+ public createBatch(
6527
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6528
+ ): Promise<WorkflowInstance[]>;
6514
6529
  }
6515
6530
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6516
6531
  /**
@@ -4414,7 +4414,12 @@ type AIGatewayProviders =
4414
4414
  | "google-ai-studio"
4415
4415
  | "mistral"
4416
4416
  | "grok"
4417
- | "openrouter";
4417
+ | "openrouter"
4418
+ | "deepseek"
4419
+ | "cerebras"
4420
+ | "cartesia"
4421
+ | "elevenlabs"
4422
+ | "adobe-firefly";
4418
4423
  type AIGatewayHeaders = {
4419
4424
  "cf-aig-metadata":
4420
4425
  | Record<string, number | string | boolean | null | bigint>
@@ -4450,6 +4455,7 @@ declare abstract class AiGateway {
4450
4455
  run(
4451
4456
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4452
4457
  ): Promise<Response>;
4458
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4453
4459
  }
4454
4460
  interface BasicImageTransformations {
4455
4461
  /**
@@ -6635,6 +6641,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6635
6641
  public create(
6636
6642
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6637
6643
  ): Promise<WorkflowInstance>;
6644
+ /**
6645
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6646
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6647
+ * @param batch List of Options when creating an instance including name and params
6648
+ * @returns A promise that resolves with a list of handles for the created instances.
6649
+ */
6650
+ public createBatch(
6651
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6652
+ ): Promise<WorkflowInstance[]>;
6638
6653
  }
6639
6654
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6640
6655
  /**
@@ -4428,7 +4428,12 @@ export type AIGatewayProviders =
4428
4428
  | "google-ai-studio"
4429
4429
  | "mistral"
4430
4430
  | "grok"
4431
- | "openrouter";
4431
+ | "openrouter"
4432
+ | "deepseek"
4433
+ | "cerebras"
4434
+ | "cartesia"
4435
+ | "elevenlabs"
4436
+ | "adobe-firefly";
4432
4437
  export type AIGatewayHeaders = {
4433
4438
  "cf-aig-metadata":
4434
4439
  | Record<string, number | string | boolean | null | bigint>
@@ -4464,6 +4469,7 @@ export declare abstract class AiGateway {
4464
4469
  run(
4465
4470
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4466
4471
  ): Promise<Response>;
4472
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4467
4473
  }
4468
4474
  export interface BasicImageTransformations {
4469
4475
  /**
@@ -6536,6 +6542,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6536
6542
  public create(
6537
6543
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6538
6544
  ): Promise<WorkflowInstance>;
6545
+ /**
6546
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6547
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6548
+ * @param batch List of Options when creating an instance including name and params
6549
+ * @returns A promise that resolves with a list of handles for the created instances.
6550
+ */
6551
+ public createBatch(
6552
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6553
+ ): Promise<WorkflowInstance[]>;
6539
6554
  }
6540
6555
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6541
6556
  /**
@@ -4415,7 +4415,12 @@ type AIGatewayProviders =
4415
4415
  | "google-ai-studio"
4416
4416
  | "mistral"
4417
4417
  | "grok"
4418
- | "openrouter";
4418
+ | "openrouter"
4419
+ | "deepseek"
4420
+ | "cerebras"
4421
+ | "cartesia"
4422
+ | "elevenlabs"
4423
+ | "adobe-firefly";
4419
4424
  type AIGatewayHeaders = {
4420
4425
  "cf-aig-metadata":
4421
4426
  | Record<string, number | string | boolean | null | bigint>
@@ -4451,6 +4456,7 @@ declare abstract class AiGateway {
4451
4456
  run(
4452
4457
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4453
4458
  ): Promise<Response>;
4459
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4454
4460
  }
4455
4461
  interface BasicImageTransformations {
4456
4462
  /**
@@ -6636,6 +6642,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6636
6642
  public create(
6637
6643
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6638
6644
  ): Promise<WorkflowInstance>;
6645
+ /**
6646
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6647
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6648
+ * @param batch List of Options when creating an instance including name and params
6649
+ * @returns A promise that resolves with a list of handles for the created instances.
6650
+ */
6651
+ public createBatch(
6652
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6653
+ ): Promise<WorkflowInstance[]>;
6639
6654
  }
6640
6655
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6641
6656
  /**
@@ -4429,7 +4429,12 @@ export type AIGatewayProviders =
4429
4429
  | "google-ai-studio"
4430
4430
  | "mistral"
4431
4431
  | "grok"
4432
- | "openrouter";
4432
+ | "openrouter"
4433
+ | "deepseek"
4434
+ | "cerebras"
4435
+ | "cartesia"
4436
+ | "elevenlabs"
4437
+ | "adobe-firefly";
4433
4438
  export type AIGatewayHeaders = {
4434
4439
  "cf-aig-metadata":
4435
4440
  | Record<string, number | string | boolean | null | bigint>
@@ -4465,6 +4470,7 @@ export declare abstract class AiGateway {
4465
4470
  run(
4466
4471
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4467
4472
  ): Promise<Response>;
4473
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4468
4474
  }
4469
4475
  export interface BasicImageTransformations {
4470
4476
  /**
@@ -6537,6 +6543,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6537
6543
  public create(
6538
6544
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6539
6545
  ): Promise<WorkflowInstance>;
6546
+ /**
6547
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6548
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6549
+ * @param batch List of Options when creating an instance including name and params
6550
+ * @returns A promise that resolves with a list of handles for the created instances.
6551
+ */
6552
+ public createBatch(
6553
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6554
+ ): Promise<WorkflowInstance[]>;
6540
6555
  }
6541
6556
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6542
6557
  /**
@@ -4419,7 +4419,12 @@ type AIGatewayProviders =
4419
4419
  | "google-ai-studio"
4420
4420
  | "mistral"
4421
4421
  | "grok"
4422
- | "openrouter";
4422
+ | "openrouter"
4423
+ | "deepseek"
4424
+ | "cerebras"
4425
+ | "cartesia"
4426
+ | "elevenlabs"
4427
+ | "adobe-firefly";
4423
4428
  type AIGatewayHeaders = {
4424
4429
  "cf-aig-metadata":
4425
4430
  | Record<string, number | string | boolean | null | bigint>
@@ -4455,6 +4460,7 @@ declare abstract class AiGateway {
4455
4460
  run(
4456
4461
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4457
4462
  ): Promise<Response>;
4463
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4458
4464
  }
4459
4465
  interface BasicImageTransformations {
4460
4466
  /**
@@ -6640,6 +6646,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6640
6646
  public create(
6641
6647
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6642
6648
  ): Promise<WorkflowInstance>;
6649
+ /**
6650
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6651
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6652
+ * @param batch List of Options when creating an instance including name and params
6653
+ * @returns A promise that resolves with a list of handles for the created instances.
6654
+ */
6655
+ public createBatch(
6656
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6657
+ ): Promise<WorkflowInstance[]>;
6643
6658
  }
6644
6659
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6645
6660
  /**
@@ -4433,7 +4433,12 @@ export type AIGatewayProviders =
4433
4433
  | "google-ai-studio"
4434
4434
  | "mistral"
4435
4435
  | "grok"
4436
- | "openrouter";
4436
+ | "openrouter"
4437
+ | "deepseek"
4438
+ | "cerebras"
4439
+ | "cartesia"
4440
+ | "elevenlabs"
4441
+ | "adobe-firefly";
4437
4442
  export type AIGatewayHeaders = {
4438
4443
  "cf-aig-metadata":
4439
4444
  | Record<string, number | string | boolean | null | bigint>
@@ -4469,6 +4474,7 @@ export declare abstract class AiGateway {
4469
4474
  run(
4470
4475
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4471
4476
  ): Promise<Response>;
4477
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4472
4478
  }
4473
4479
  export interface BasicImageTransformations {
4474
4480
  /**
@@ -6541,6 +6547,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6541
6547
  public create(
6542
6548
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6543
6549
  ): Promise<WorkflowInstance>;
6550
+ /**
6551
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6552
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6553
+ * @param batch List of Options when creating an instance including name and params
6554
+ * @returns A promise that resolves with a list of handles for the created instances.
6555
+ */
6556
+ public createBatch(
6557
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6558
+ ): Promise<WorkflowInstance[]>;
6544
6559
  }
6545
6560
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6546
6561
  /**
@@ -4424,7 +4424,12 @@ type AIGatewayProviders =
4424
4424
  | "google-ai-studio"
4425
4425
  | "mistral"
4426
4426
  | "grok"
4427
- | "openrouter";
4427
+ | "openrouter"
4428
+ | "deepseek"
4429
+ | "cerebras"
4430
+ | "cartesia"
4431
+ | "elevenlabs"
4432
+ | "adobe-firefly";
4428
4433
  type AIGatewayHeaders = {
4429
4434
  "cf-aig-metadata":
4430
4435
  | Record<string, number | string | boolean | null | bigint>
@@ -4460,6 +4465,7 @@ declare abstract class AiGateway {
4460
4465
  run(
4461
4466
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4462
4467
  ): Promise<Response>;
4468
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4463
4469
  }
4464
4470
  interface BasicImageTransformations {
4465
4471
  /**
@@ -6645,6 +6651,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6645
6651
  public create(
6646
6652
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6647
6653
  ): Promise<WorkflowInstance>;
6654
+ /**
6655
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6656
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6657
+ * @param batch List of Options when creating an instance including name and params
6658
+ * @returns A promise that resolves with a list of handles for the created instances.
6659
+ */
6660
+ public createBatch(
6661
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6662
+ ): Promise<WorkflowInstance[]>;
6648
6663
  }
6649
6664
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6650
6665
  /**
@@ -4438,7 +4438,12 @@ export type AIGatewayProviders =
4438
4438
  | "google-ai-studio"
4439
4439
  | "mistral"
4440
4440
  | "grok"
4441
- | "openrouter";
4441
+ | "openrouter"
4442
+ | "deepseek"
4443
+ | "cerebras"
4444
+ | "cartesia"
4445
+ | "elevenlabs"
4446
+ | "adobe-firefly";
4442
4447
  export type AIGatewayHeaders = {
4443
4448
  "cf-aig-metadata":
4444
4449
  | Record<string, number | string | boolean | null | bigint>
@@ -4474,6 +4479,7 @@ export declare abstract class AiGateway {
4474
4479
  run(
4475
4480
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4476
4481
  ): Promise<Response>;
4482
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4477
4483
  }
4478
4484
  export interface BasicImageTransformations {
4479
4485
  /**
@@ -6546,6 +6552,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6546
6552
  public create(
6547
6553
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6548
6554
  ): Promise<WorkflowInstance>;
6555
+ /**
6556
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6557
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6558
+ * @param batch List of Options when creating an instance including name and params
6559
+ * @returns A promise that resolves with a list of handles for the created instances.
6560
+ */
6561
+ public createBatch(
6562
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6563
+ ): Promise<WorkflowInstance[]>;
6549
6564
  }
6550
6565
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6551
6566
  /**
@@ -4426,7 +4426,12 @@ type AIGatewayProviders =
4426
4426
  | "google-ai-studio"
4427
4427
  | "mistral"
4428
4428
  | "grok"
4429
- | "openrouter";
4429
+ | "openrouter"
4430
+ | "deepseek"
4431
+ | "cerebras"
4432
+ | "cartesia"
4433
+ | "elevenlabs"
4434
+ | "adobe-firefly";
4430
4435
  type AIGatewayHeaders = {
4431
4436
  "cf-aig-metadata":
4432
4437
  | Record<string, number | string | boolean | null | bigint>
@@ -4462,6 +4467,7 @@ declare abstract class AiGateway {
4462
4467
  run(
4463
4468
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4464
4469
  ): Promise<Response>;
4470
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4465
4471
  }
4466
4472
  interface BasicImageTransformations {
4467
4473
  /**
@@ -6647,6 +6653,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6647
6653
  public create(
6648
6654
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6649
6655
  ): Promise<WorkflowInstance>;
6656
+ /**
6657
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6658
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6659
+ * @param batch List of Options when creating an instance including name and params
6660
+ * @returns A promise that resolves with a list of handles for the created instances.
6661
+ */
6662
+ public createBatch(
6663
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6664
+ ): Promise<WorkflowInstance[]>;
6650
6665
  }
6651
6666
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6652
6667
  /**
@@ -4440,7 +4440,12 @@ export type AIGatewayProviders =
4440
4440
  | "google-ai-studio"
4441
4441
  | "mistral"
4442
4442
  | "grok"
4443
- | "openrouter";
4443
+ | "openrouter"
4444
+ | "deepseek"
4445
+ | "cerebras"
4446
+ | "cartesia"
4447
+ | "elevenlabs"
4448
+ | "adobe-firefly";
4444
4449
  export type AIGatewayHeaders = {
4445
4450
  "cf-aig-metadata":
4446
4451
  | Record<string, number | string | boolean | null | bigint>
@@ -4476,6 +4481,7 @@ export declare abstract class AiGateway {
4476
4481
  run(
4477
4482
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4478
4483
  ): Promise<Response>;
4484
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4479
4485
  }
4480
4486
  export interface BasicImageTransformations {
4481
4487
  /**
@@ -6548,6 +6554,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6548
6554
  public create(
6549
6555
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6550
6556
  ): Promise<WorkflowInstance>;
6557
+ /**
6558
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6559
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6560
+ * @param batch List of Options when creating an instance including name and params
6561
+ * @returns A promise that resolves with a list of handles for the created instances.
6562
+ */
6563
+ public createBatch(
6564
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6565
+ ): Promise<WorkflowInstance[]>;
6551
6566
  }
6552
6567
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6553
6568
  /**
@@ -4426,7 +4426,12 @@ type AIGatewayProviders =
4426
4426
  | "google-ai-studio"
4427
4427
  | "mistral"
4428
4428
  | "grok"
4429
- | "openrouter";
4429
+ | "openrouter"
4430
+ | "deepseek"
4431
+ | "cerebras"
4432
+ | "cartesia"
4433
+ | "elevenlabs"
4434
+ | "adobe-firefly";
4430
4435
  type AIGatewayHeaders = {
4431
4436
  "cf-aig-metadata":
4432
4437
  | Record<string, number | string | boolean | null | bigint>
@@ -4462,6 +4467,7 @@ declare abstract class AiGateway {
4462
4467
  run(
4463
4468
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4464
4469
  ): Promise<Response>;
4470
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4465
4471
  }
4466
4472
  interface BasicImageTransformations {
4467
4473
  /**
@@ -6647,6 +6653,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6647
6653
  public create(
6648
6654
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6649
6655
  ): Promise<WorkflowInstance>;
6656
+ /**
6657
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6658
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6659
+ * @param batch List of Options when creating an instance including name and params
6660
+ * @returns A promise that resolves with a list of handles for the created instances.
6661
+ */
6662
+ public createBatch(
6663
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6664
+ ): Promise<WorkflowInstance[]>;
6650
6665
  }
6651
6666
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6652
6667
  /**
@@ -4440,7 +4440,12 @@ export type AIGatewayProviders =
4440
4440
  | "google-ai-studio"
4441
4441
  | "mistral"
4442
4442
  | "grok"
4443
- | "openrouter";
4443
+ | "openrouter"
4444
+ | "deepseek"
4445
+ | "cerebras"
4446
+ | "cartesia"
4447
+ | "elevenlabs"
4448
+ | "adobe-firefly";
4444
4449
  export type AIGatewayHeaders = {
4445
4450
  "cf-aig-metadata":
4446
4451
  | Record<string, number | string | boolean | null | bigint>
@@ -4476,6 +4481,7 @@ export declare abstract class AiGateway {
4476
4481
  run(
4477
4482
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4478
4483
  ): Promise<Response>;
4484
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4479
4485
  }
4480
4486
  export interface BasicImageTransformations {
4481
4487
  /**
@@ -6548,6 +6554,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6548
6554
  public create(
6549
6555
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6550
6556
  ): Promise<WorkflowInstance>;
6557
+ /**
6558
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6559
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6560
+ * @param batch List of Options when creating an instance including name and params
6561
+ * @returns A promise that resolves with a list of handles for the created instances.
6562
+ */
6563
+ public createBatch(
6564
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6565
+ ): Promise<WorkflowInstance[]>;
6551
6566
  }
6552
6567
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6553
6568
  /**
@@ -4507,7 +4507,12 @@ type AIGatewayProviders =
4507
4507
  | "google-ai-studio"
4508
4508
  | "mistral"
4509
4509
  | "grok"
4510
- | "openrouter";
4510
+ | "openrouter"
4511
+ | "deepseek"
4512
+ | "cerebras"
4513
+ | "cartesia"
4514
+ | "elevenlabs"
4515
+ | "adobe-firefly";
4511
4516
  type AIGatewayHeaders = {
4512
4517
  "cf-aig-metadata":
4513
4518
  | Record<string, number | string | boolean | null | bigint>
@@ -4543,6 +4548,7 @@ declare abstract class AiGateway {
4543
4548
  run(
4544
4549
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4545
4550
  ): Promise<Response>;
4551
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4546
4552
  }
4547
4553
  interface BasicImageTransformations {
4548
4554
  /**
@@ -6728,6 +6734,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6728
6734
  public create(
6729
6735
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6730
6736
  ): Promise<WorkflowInstance>;
6737
+ /**
6738
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6739
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6740
+ * @param batch List of Options when creating an instance including name and params
6741
+ * @returns A promise that resolves with a list of handles for the created instances.
6742
+ */
6743
+ public createBatch(
6744
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6745
+ ): Promise<WorkflowInstance[]>;
6731
6746
  }
6732
6747
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6733
6748
  /**
@@ -4521,7 +4521,12 @@ export type AIGatewayProviders =
4521
4521
  | "google-ai-studio"
4522
4522
  | "mistral"
4523
4523
  | "grok"
4524
- | "openrouter";
4524
+ | "openrouter"
4525
+ | "deepseek"
4526
+ | "cerebras"
4527
+ | "cartesia"
4528
+ | "elevenlabs"
4529
+ | "adobe-firefly";
4525
4530
  export type AIGatewayHeaders = {
4526
4531
  "cf-aig-metadata":
4527
4532
  | Record<string, number | string | boolean | null | bigint>
@@ -4557,6 +4562,7 @@ export declare abstract class AiGateway {
4557
4562
  run(
4558
4563
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4559
4564
  ): Promise<Response>;
4565
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4560
4566
  }
4561
4567
  export interface BasicImageTransformations {
4562
4568
  /**
@@ -6629,6 +6635,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6629
6635
  public create(
6630
6636
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6631
6637
  ): Promise<WorkflowInstance>;
6638
+ /**
6639
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6640
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6641
+ * @param batch List of Options when creating an instance including name and params
6642
+ * @returns A promise that resolves with a list of handles for the created instances.
6643
+ */
6644
+ public createBatch(
6645
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6646
+ ): Promise<WorkflowInstance[]>;
6632
6647
  }
6633
6648
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6634
6649
  /**
package/index.d.ts CHANGED
@@ -4363,7 +4363,12 @@ type AIGatewayProviders =
4363
4363
  | "google-ai-studio"
4364
4364
  | "mistral"
4365
4365
  | "grok"
4366
- | "openrouter";
4366
+ | "openrouter"
4367
+ | "deepseek"
4368
+ | "cerebras"
4369
+ | "cartesia"
4370
+ | "elevenlabs"
4371
+ | "adobe-firefly";
4367
4372
  type AIGatewayHeaders = {
4368
4373
  "cf-aig-metadata":
4369
4374
  | Record<string, number | string | boolean | null | bigint>
@@ -4399,6 +4404,7 @@ declare abstract class AiGateway {
4399
4404
  run(
4400
4405
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4401
4406
  ): Promise<Response>;
4407
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4402
4408
  }
4403
4409
  interface BasicImageTransformations {
4404
4410
  /**
@@ -6584,6 +6590,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6584
6590
  public create(
6585
6591
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6586
6592
  ): Promise<WorkflowInstance>;
6593
+ /**
6594
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6595
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6596
+ * @param batch List of Options when creating an instance including name and params
6597
+ * @returns A promise that resolves with a list of handles for the created instances.
6598
+ */
6599
+ public createBatch(
6600
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6601
+ ): Promise<WorkflowInstance[]>;
6587
6602
  }
6588
6603
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6589
6604
  /**
package/index.ts CHANGED
@@ -4377,7 +4377,12 @@ export type AIGatewayProviders =
4377
4377
  | "google-ai-studio"
4378
4378
  | "mistral"
4379
4379
  | "grok"
4380
- | "openrouter";
4380
+ | "openrouter"
4381
+ | "deepseek"
4382
+ | "cerebras"
4383
+ | "cartesia"
4384
+ | "elevenlabs"
4385
+ | "adobe-firefly";
4381
4386
  export type AIGatewayHeaders = {
4382
4387
  "cf-aig-metadata":
4383
4388
  | Record<string, number | string | boolean | null | bigint>
@@ -4413,6 +4418,7 @@ export declare abstract class AiGateway {
4413
4418
  run(
4414
4419
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4415
4420
  ): Promise<Response>;
4421
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4416
4422
  }
4417
4423
  export interface BasicImageTransformations {
4418
4424
  /**
@@ -6485,6 +6491,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6485
6491
  public create(
6486
6492
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6487
6493
  ): Promise<WorkflowInstance>;
6494
+ /**
6495
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6496
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6497
+ * @param batch List of Options when creating an instance including name and params
6498
+ * @returns A promise that resolves with a list of handles for the created instances.
6499
+ */
6500
+ public createBatch(
6501
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6502
+ ): Promise<WorkflowInstance[]>;
6488
6503
  }
6489
6504
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6490
6505
  /**
package/oldest/index.d.ts CHANGED
@@ -4363,7 +4363,12 @@ type AIGatewayProviders =
4363
4363
  | "google-ai-studio"
4364
4364
  | "mistral"
4365
4365
  | "grok"
4366
- | "openrouter";
4366
+ | "openrouter"
4367
+ | "deepseek"
4368
+ | "cerebras"
4369
+ | "cartesia"
4370
+ | "elevenlabs"
4371
+ | "adobe-firefly";
4367
4372
  type AIGatewayHeaders = {
4368
4373
  "cf-aig-metadata":
4369
4374
  | Record<string, number | string | boolean | null | bigint>
@@ -4399,6 +4404,7 @@ declare abstract class AiGateway {
4399
4404
  run(
4400
4405
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4401
4406
  ): Promise<Response>;
4407
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4402
4408
  }
4403
4409
  interface BasicImageTransformations {
4404
4410
  /**
@@ -6584,6 +6590,15 @@ declare abstract class Workflow<PARAMS = unknown> {
6584
6590
  public create(
6585
6591
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6586
6592
  ): Promise<WorkflowInstance>;
6593
+ /**
6594
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6595
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6596
+ * @param batch List of Options when creating an instance including name and params
6597
+ * @returns A promise that resolves with a list of handles for the created instances.
6598
+ */
6599
+ public createBatch(
6600
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6601
+ ): Promise<WorkflowInstance[]>;
6587
6602
  }
6588
6603
  interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6589
6604
  /**
package/oldest/index.ts CHANGED
@@ -4377,7 +4377,12 @@ export type AIGatewayProviders =
4377
4377
  | "google-ai-studio"
4378
4378
  | "mistral"
4379
4379
  | "grok"
4380
- | "openrouter";
4380
+ | "openrouter"
4381
+ | "deepseek"
4382
+ | "cerebras"
4383
+ | "cartesia"
4384
+ | "elevenlabs"
4385
+ | "adobe-firefly";
4381
4386
  export type AIGatewayHeaders = {
4382
4387
  "cf-aig-metadata":
4383
4388
  | Record<string, number | string | boolean | null | bigint>
@@ -4413,6 +4418,7 @@ export declare abstract class AiGateway {
4413
4418
  run(
4414
4419
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
4415
4420
  ): Promise<Response>;
4421
+ getUrl(provider: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
4416
4422
  }
4417
4423
  export interface BasicImageTransformations {
4418
4424
  /**
@@ -6485,6 +6491,15 @@ export declare abstract class Workflow<PARAMS = unknown> {
6485
6491
  public create(
6486
6492
  options?: WorkflowInstanceCreateOptions<PARAMS>,
6487
6493
  ): Promise<WorkflowInstance>;
6494
+ /**
6495
+ * Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown.
6496
+ * `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.
6497
+ * @param batch List of Options when creating an instance including name and params
6498
+ * @returns A promise that resolves with a list of handles for the created instances.
6499
+ */
6500
+ public createBatch(
6501
+ batch: WorkflowInstanceCreateOptions<PARAMS>[],
6502
+ ): Promise<WorkflowInstance[]>;
6488
6503
  }
6489
6504
  export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
6490
6505
  /**
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20250311.0"
10
+ "version": "4.20250312.0"
11
11
  }