getaiapi 1.3.1 → 2.0.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.
@@ -1,4 +1,4 @@
1
- // registry/registry.json
1
+ // deprecated/registry/registry.json
2
2
  var registry_default = [
3
3
  {
4
4
  canonical_name: "851-labs-background-remover",
@@ -72726,7 +72726,7 @@ var registry_default = [
72726
72726
  }
72727
72727
  ];
72728
72728
 
72729
- // src/registry.ts
72729
+ // deprecated/src/registry.ts
72730
72730
  var registryCache = null;
72731
72731
  function loadRegistry() {
72732
72732
  if (registryCache) return registryCache;
@@ -72799,7 +72799,7 @@ function clearRegistryCache() {
72799
72799
  registryCache = null;
72800
72800
  }
72801
72801
 
72802
- // src/mapper.ts
72802
+ // deprecated/src/mapper.ts
72803
72803
  function mapInput(request, binding) {
72804
72804
  const result = {};
72805
72805
  const provider = binding.provider;
@@ -72972,7 +72972,7 @@ function getNestedValue(obj, path) {
72972
72972
  return current;
72973
72973
  }
72974
72974
 
72975
- // src/errors.ts
72975
+ // deprecated/src/errors.ts
72976
72976
  var GetAIApiError = class extends Error {
72977
72977
  constructor(message) {
72978
72978
  super(message);
@@ -73085,7 +73085,7 @@ var StorageError = class extends GetAIApiError {
73085
73085
  }
73086
73086
  };
73087
73087
 
73088
- // src/auth.ts
73088
+ // deprecated/src/auth.ts
73089
73089
  var ENV_MAP = {
73090
73090
  "fal-ai": "FAL_KEY",
73091
73091
  replicate: "REPLICATE_API_TOKEN",
@@ -73139,7 +73139,7 @@ var AuthManager = class {
73139
73139
  }
73140
73140
  };
73141
73141
 
73142
- // src/fetch.ts
73142
+ // deprecated/src/fetch.ts
73143
73143
  var DEFAULT_TIMEOUT_MS = 3e4;
73144
73144
  var SENSITIVE_HEADER = /auth|key|token|secret|bearer/i;
73145
73145
  var config = {
@@ -73211,7 +73211,7 @@ async function fetchWithTimeout(url, init) {
73211
73211
  }
73212
73212
  }
73213
73213
 
73214
- // src/adapters/kling.ts
73214
+ // deprecated/src/adapters/kling.ts
73215
73215
  import { createHmac } from "crypto";
73216
73216
  var API_BASE = "https://api-singapore.klingai.com";
73217
73217
  var SYNC_ENDPOINTS = /* @__PURE__ */ new Set([
@@ -73379,10 +73379,10 @@ var klingAdapter = {
73379
73379
  }
73380
73380
  };
73381
73381
 
73382
- // src/storage.ts
73382
+ // deprecated/src/storage.ts
73383
73383
  import { randomUUID } from "crypto";
73384
73384
 
73385
- // src/s3-signer.ts
73385
+ // deprecated/src/s3-signer.ts
73386
73386
  import { createHmac as createHmac2, createHash } from "crypto";
73387
73387
  function sha256(data) {
73388
73388
  return createHash("sha256").update(data).digest("hex");
@@ -73487,7 +73487,7 @@ function presignS3Url(url, credentials, options) {
73487
73487
  return `${parsedUrl.origin}${parsedUrl.pathname}?${queryParams.toString()}`;
73488
73488
  }
73489
73489
 
73490
- // src/storage.ts
73490
+ // deprecated/src/storage.ts
73491
73491
  var MAX_PRESIGN_EXPIRES = 604800;
73492
73492
  var storageConfig = null;
73493
73493
  function parseExpiresIn(value) {
@@ -73703,10 +73703,10 @@ async function processParamsForUpload(params, options) {
73703
73703
  return processRecord(params, shouldReupload, maxBytes);
73704
73704
  }
73705
73705
 
73706
- // src/gateway.ts
73706
+ // deprecated/src/gateway.ts
73707
73707
  import { randomUUID as randomUUID2 } from "crypto";
73708
73708
 
73709
- // src/adapters/fal-ai.ts
73709
+ // deprecated/src/adapters/fal-ai.ts
73710
73710
  var BASE_URL = "https://queue.fal.run";
73711
73711
  function getBaseEndpoint(endpoint) {
73712
73712
  const parts = endpoint.split("/");
@@ -73874,7 +73874,7 @@ var falAiAdapter = {
73874
73874
  }
73875
73875
  };
73876
73876
 
73877
- // src/adapters/replicate.ts
73877
+ // deprecated/src/adapters/replicate.ts
73878
73878
  var BASE_URL2 = "https://api.replicate.com/v1";
73879
73879
  async function handleHttpErrors3(response, endpoint) {
73880
73880
  if (response.ok) return;
@@ -73995,7 +73995,7 @@ var replicateAdapter = {
73995
73995
  }
73996
73996
  };
73997
73997
 
73998
- // src/adapters/wavespeed.ts
73998
+ // deprecated/src/adapters/wavespeed.ts
73999
73999
  var BASE_URL3 = "https://api.wavespeed.ai/api/v3";
74000
74000
  async function handleHttpErrors4(response, endpoint) {
74001
74001
  if (response.ok) return;
@@ -74099,7 +74099,7 @@ var wavespeedAdapter = {
74099
74099
  }
74100
74100
  };
74101
74101
 
74102
- // src/adapters/openrouter.ts
74102
+ // deprecated/src/adapters/openrouter.ts
74103
74103
  var BASE_URL4 = "https://openrouter.ai/api/v1";
74104
74104
  async function handleHttpErrors5(response, endpoint) {
74105
74105
  if (response.ok) return;
@@ -74177,7 +74177,7 @@ var openRouterAdapter = {
74177
74177
  }
74178
74178
  };
74179
74179
 
74180
- // src/retry.ts
74180
+ // deprecated/src/retry.ts
74181
74181
  var DEFAULT_OPTIONS = {
74182
74182
  maxRetries: 3,
74183
74183
  initialDelayMs: 1e3,
@@ -74244,7 +74244,7 @@ async function withRetry(fn, options) {
74244
74244
  throw lastError;
74245
74245
  }
74246
74246
 
74247
- // src/gateway.ts
74247
+ // deprecated/src/gateway.ts
74248
74248
  var adapters = {
74249
74249
  "fal-ai": falAiAdapter,
74250
74250
  "replicate": replicateAdapter,
@@ -74404,7 +74404,7 @@ async function generate(request) {
74404
74404
  };
74405
74405
  }
74406
74406
 
74407
- // src/discovery.ts
74407
+ // deprecated/src/discovery.ts
74408
74408
  function listModels(filters) {
74409
74409
  let models = loadRegistry();
74410
74410
  if (filters?.input) {
@@ -74461,4 +74461,4 @@ export {
74461
74461
  listModels,
74462
74462
  deriveCategory
74463
74463
  };
74464
- //# sourceMappingURL=chunk-CN4FJ4FW.js.map
74464
+ //# sourceMappingURL=chunk-H6MMJNJX.js.map