pricetoken 0.9.0 → 0.10.1

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.mts CHANGED
@@ -152,6 +152,7 @@ interface AvatarModelPricing {
152
152
  resolution: string | null;
153
153
  maxDuration: number | null;
154
154
  qualityMode: string | null;
155
+ lipSync: boolean | null;
155
156
  source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
156
157
  status: ModelStatus | null;
157
158
  confidence: DataConfidence;
@@ -183,6 +184,84 @@ interface AvatarProviderSummary {
183
184
  modelCount: number;
184
185
  cheapestCostPerMinute: number;
185
186
  }
187
+ interface TtsModelPricing {
188
+ modelId: string;
189
+ provider: string;
190
+ displayName: string;
191
+ costPerMChars: number;
192
+ voiceType: string | null;
193
+ maxCharacters: number | null;
194
+ supportedLanguages: number | null;
195
+ source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
196
+ status: ModelStatus | null;
197
+ confidence: DataConfidence;
198
+ confidenceScore: number;
199
+ confidenceLevel: ConfidenceLevel;
200
+ freshness: FreshnessInfo;
201
+ lastUpdated: string | null;
202
+ launchDate: string | null;
203
+ }
204
+ interface TtsCostEstimate {
205
+ modelId: string;
206
+ characters: number;
207
+ costPerMChars: number;
208
+ totalCost: number;
209
+ }
210
+ interface TtsPriceHistoryPoint {
211
+ date: string;
212
+ costPerMChars: number;
213
+ }
214
+ interface TtsModelHistory {
215
+ modelId: string;
216
+ provider: string;
217
+ displayName: string;
218
+ history: TtsPriceHistoryPoint[];
219
+ }
220
+ interface TtsProviderSummary {
221
+ id: string;
222
+ displayName: string;
223
+ modelCount: number;
224
+ cheapestCostPerMChars: number;
225
+ }
226
+ interface SttModelPricing {
227
+ modelId: string;
228
+ provider: string;
229
+ displayName: string;
230
+ costPerMinute: number;
231
+ sttType: string | null;
232
+ maxDuration: number | null;
233
+ supportedLanguages: number | null;
234
+ source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
235
+ status: ModelStatus | null;
236
+ confidence: DataConfidence;
237
+ confidenceScore: number;
238
+ confidenceLevel: ConfidenceLevel;
239
+ freshness: FreshnessInfo;
240
+ lastUpdated: string | null;
241
+ launchDate: string | null;
242
+ }
243
+ interface SttCostEstimate {
244
+ modelId: string;
245
+ durationSeconds: number;
246
+ costPerMinute: number;
247
+ totalCost: number;
248
+ }
249
+ interface SttPriceHistoryPoint {
250
+ date: string;
251
+ costPerMinute: number;
252
+ }
253
+ interface SttModelHistory {
254
+ modelId: string;
255
+ provider: string;
256
+ displayName: string;
257
+ history: SttPriceHistoryPoint[];
258
+ }
259
+ interface SttProviderSummary {
260
+ id: string;
261
+ displayName: string;
262
+ modelCount: number;
263
+ cheapestCostPerMinute: number;
264
+ }
186
265
 
187
266
  interface ClientOptions {
188
267
  baseUrl?: string;
@@ -293,6 +372,54 @@ declare class PriceTokenClient {
293
372
  after?: string;
294
373
  before?: string;
295
374
  }): Promise<AvatarModelPricing>;
375
+ getTtsPricing(opts?: {
376
+ provider?: string;
377
+ currency?: string;
378
+ after?: string;
379
+ before?: string;
380
+ }): Promise<TtsModelPricing[]>;
381
+ getTtsModel(modelId: string, opts?: {
382
+ currency?: string;
383
+ }): Promise<TtsModelPricing>;
384
+ getTtsHistory(opts?: {
385
+ days?: number;
386
+ modelId?: string;
387
+ provider?: string;
388
+ }): Promise<TtsModelHistory[]>;
389
+ getTtsProviders(): Promise<TtsProviderSummary[]>;
390
+ compareTtsModels(modelIds: string[], opts?: {
391
+ currency?: string;
392
+ }): Promise<TtsModelPricing[]>;
393
+ getCheapestTtsModel(opts?: {
394
+ provider?: string;
395
+ currency?: string;
396
+ after?: string;
397
+ before?: string;
398
+ }): Promise<TtsModelPricing>;
399
+ getSttPricing(opts?: {
400
+ provider?: string;
401
+ currency?: string;
402
+ after?: string;
403
+ before?: string;
404
+ }): Promise<SttModelPricing[]>;
405
+ getSttModel(modelId: string, opts?: {
406
+ currency?: string;
407
+ }): Promise<SttModelPricing>;
408
+ getSttHistory(opts?: {
409
+ days?: number;
410
+ modelId?: string;
411
+ provider?: string;
412
+ }): Promise<SttModelHistory[]>;
413
+ getSttProviders(): Promise<SttProviderSummary[]>;
414
+ compareSttModels(modelIds: string[], opts?: {
415
+ currency?: string;
416
+ }): Promise<SttModelPricing[]>;
417
+ getCheapestSttModel(opts?: {
418
+ provider?: string;
419
+ currency?: string;
420
+ after?: string;
421
+ before?: string;
422
+ }): Promise<SttModelPricing>;
296
423
  }
297
424
 
298
425
  declare function calculateCost(modelId: string, inputPerMTok: number, outputPerMTok: number, inputTokens: number, outputTokens: number): CostEstimate;
@@ -307,6 +434,12 @@ declare function calculateVideoModelCost(modelId: string, durationSeconds: numbe
307
434
  declare function calculateAvatarCost(modelId: string, costPerMinute: number, durationSeconds: number): AvatarCostEstimate;
308
435
  declare function calculateAvatarModelCost(modelId: string, durationSeconds: number, pricing?: AvatarModelPricing[]): AvatarCostEstimate;
309
436
 
437
+ declare function calculateTtsCost(modelId: string, costPerMChars: number, characters: number): TtsCostEstimate;
438
+ declare function calculateTtsModelCost(modelId: string, characters: number, pricing?: TtsModelPricing[]): TtsCostEstimate;
439
+
440
+ declare function calculateSttCost(modelId: string, costPerMinute: number, durationSeconds: number): SttCostEstimate;
441
+ declare function calculateSttModelCost(modelId: string, durationSeconds: number, pricing?: SttModelPricing[]): SttCostEstimate;
442
+
310
443
  declare const STATIC_PRICING: ModelPricing[];
311
444
 
312
445
  declare const STATIC_IMAGE_PRICING: ImageModelPricing[];
@@ -315,4 +448,8 @@ declare const STATIC_VIDEO_PRICING: VideoModelPricing[];
315
448
 
316
449
  declare const STATIC_AVATAR_PRICING: AvatarModelPricing[];
317
450
 
318
- export { type AvatarCostEstimate, type AvatarModelHistory, type AvatarModelPricing, type AvatarPriceHistoryPoint, type AvatarProviderSummary, type ClientOptions, type ConfidenceLevel, type CostEstimate, type DataConfidence, type FreshnessInfo, type ImageCostEstimate, type ImageModelHistory, type ImageModelPricing, type ImagePriceHistoryPoint, type ImageProviderSummary, type ImageQualityTier, type ModelHistory, type ModelPricing, type ModelStatus, type PriceHistoryPoint, PriceTokenClient, type PriceTokenError, type PriceTokenResponse, type ProviderSummary, STATIC_AVATAR_PRICING, STATIC_IMAGE_PRICING, STATIC_PRICING, STATIC_VIDEO_PRICING, type VideoCostEstimate, type VideoModelHistory, type VideoModelPricing, type VideoPriceHistoryPoint, type VideoProviderSummary, calculateAvatarCost, calculateAvatarModelCost, calculateCost, calculateImageCost, calculateImageModelCost, calculateModelCost, calculateVideoCost, calculateVideoModelCost };
451
+ declare const STATIC_TTS_PRICING: TtsModelPricing[];
452
+
453
+ declare const STATIC_STT_PRICING: SttModelPricing[];
454
+
455
+ export { type AvatarCostEstimate, type AvatarModelHistory, type AvatarModelPricing, type AvatarPriceHistoryPoint, type AvatarProviderSummary, type ClientOptions, type ConfidenceLevel, type CostEstimate, type DataConfidence, type FreshnessInfo, type ImageCostEstimate, type ImageModelHistory, type ImageModelPricing, type ImagePriceHistoryPoint, type ImageProviderSummary, type ImageQualityTier, type ModelHistory, type ModelPricing, type ModelStatus, type PriceHistoryPoint, PriceTokenClient, type PriceTokenError, type PriceTokenResponse, type ProviderSummary, STATIC_AVATAR_PRICING, STATIC_IMAGE_PRICING, STATIC_PRICING, STATIC_STT_PRICING, STATIC_TTS_PRICING, STATIC_VIDEO_PRICING, type SttCostEstimate, type SttModelHistory, type SttModelPricing, type SttPriceHistoryPoint, type SttProviderSummary, type TtsCostEstimate, type TtsModelHistory, type TtsModelPricing, type TtsPriceHistoryPoint, type TtsProviderSummary, type VideoCostEstimate, type VideoModelHistory, type VideoModelPricing, type VideoPriceHistoryPoint, type VideoProviderSummary, calculateAvatarCost, calculateAvatarModelCost, calculateCost, calculateImageCost, calculateImageModelCost, calculateModelCost, calculateSttCost, calculateSttModelCost, calculateTtsCost, calculateTtsModelCost, calculateVideoCost, calculateVideoModelCost };
package/dist/index.d.ts CHANGED
@@ -152,6 +152,7 @@ interface AvatarModelPricing {
152
152
  resolution: string | null;
153
153
  maxDuration: number | null;
154
154
  qualityMode: string | null;
155
+ lipSync: boolean | null;
155
156
  source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
156
157
  status: ModelStatus | null;
157
158
  confidence: DataConfidence;
@@ -183,6 +184,84 @@ interface AvatarProviderSummary {
183
184
  modelCount: number;
184
185
  cheapestCostPerMinute: number;
185
186
  }
187
+ interface TtsModelPricing {
188
+ modelId: string;
189
+ provider: string;
190
+ displayName: string;
191
+ costPerMChars: number;
192
+ voiceType: string | null;
193
+ maxCharacters: number | null;
194
+ supportedLanguages: number | null;
195
+ source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
196
+ status: ModelStatus | null;
197
+ confidence: DataConfidence;
198
+ confidenceScore: number;
199
+ confidenceLevel: ConfidenceLevel;
200
+ freshness: FreshnessInfo;
201
+ lastUpdated: string | null;
202
+ launchDate: string | null;
203
+ }
204
+ interface TtsCostEstimate {
205
+ modelId: string;
206
+ characters: number;
207
+ costPerMChars: number;
208
+ totalCost: number;
209
+ }
210
+ interface TtsPriceHistoryPoint {
211
+ date: string;
212
+ costPerMChars: number;
213
+ }
214
+ interface TtsModelHistory {
215
+ modelId: string;
216
+ provider: string;
217
+ displayName: string;
218
+ history: TtsPriceHistoryPoint[];
219
+ }
220
+ interface TtsProviderSummary {
221
+ id: string;
222
+ displayName: string;
223
+ modelCount: number;
224
+ cheapestCostPerMChars: number;
225
+ }
226
+ interface SttModelPricing {
227
+ modelId: string;
228
+ provider: string;
229
+ displayName: string;
230
+ costPerMinute: number;
231
+ sttType: string | null;
232
+ maxDuration: number | null;
233
+ supportedLanguages: number | null;
234
+ source: 'fetched' | 'seed' | 'admin' | 'verified' | 'carried';
235
+ status: ModelStatus | null;
236
+ confidence: DataConfidence;
237
+ confidenceScore: number;
238
+ confidenceLevel: ConfidenceLevel;
239
+ freshness: FreshnessInfo;
240
+ lastUpdated: string | null;
241
+ launchDate: string | null;
242
+ }
243
+ interface SttCostEstimate {
244
+ modelId: string;
245
+ durationSeconds: number;
246
+ costPerMinute: number;
247
+ totalCost: number;
248
+ }
249
+ interface SttPriceHistoryPoint {
250
+ date: string;
251
+ costPerMinute: number;
252
+ }
253
+ interface SttModelHistory {
254
+ modelId: string;
255
+ provider: string;
256
+ displayName: string;
257
+ history: SttPriceHistoryPoint[];
258
+ }
259
+ interface SttProviderSummary {
260
+ id: string;
261
+ displayName: string;
262
+ modelCount: number;
263
+ cheapestCostPerMinute: number;
264
+ }
186
265
 
187
266
  interface ClientOptions {
188
267
  baseUrl?: string;
@@ -293,6 +372,54 @@ declare class PriceTokenClient {
293
372
  after?: string;
294
373
  before?: string;
295
374
  }): Promise<AvatarModelPricing>;
375
+ getTtsPricing(opts?: {
376
+ provider?: string;
377
+ currency?: string;
378
+ after?: string;
379
+ before?: string;
380
+ }): Promise<TtsModelPricing[]>;
381
+ getTtsModel(modelId: string, opts?: {
382
+ currency?: string;
383
+ }): Promise<TtsModelPricing>;
384
+ getTtsHistory(opts?: {
385
+ days?: number;
386
+ modelId?: string;
387
+ provider?: string;
388
+ }): Promise<TtsModelHistory[]>;
389
+ getTtsProviders(): Promise<TtsProviderSummary[]>;
390
+ compareTtsModels(modelIds: string[], opts?: {
391
+ currency?: string;
392
+ }): Promise<TtsModelPricing[]>;
393
+ getCheapestTtsModel(opts?: {
394
+ provider?: string;
395
+ currency?: string;
396
+ after?: string;
397
+ before?: string;
398
+ }): Promise<TtsModelPricing>;
399
+ getSttPricing(opts?: {
400
+ provider?: string;
401
+ currency?: string;
402
+ after?: string;
403
+ before?: string;
404
+ }): Promise<SttModelPricing[]>;
405
+ getSttModel(modelId: string, opts?: {
406
+ currency?: string;
407
+ }): Promise<SttModelPricing>;
408
+ getSttHistory(opts?: {
409
+ days?: number;
410
+ modelId?: string;
411
+ provider?: string;
412
+ }): Promise<SttModelHistory[]>;
413
+ getSttProviders(): Promise<SttProviderSummary[]>;
414
+ compareSttModels(modelIds: string[], opts?: {
415
+ currency?: string;
416
+ }): Promise<SttModelPricing[]>;
417
+ getCheapestSttModel(opts?: {
418
+ provider?: string;
419
+ currency?: string;
420
+ after?: string;
421
+ before?: string;
422
+ }): Promise<SttModelPricing>;
296
423
  }
297
424
 
298
425
  declare function calculateCost(modelId: string, inputPerMTok: number, outputPerMTok: number, inputTokens: number, outputTokens: number): CostEstimate;
@@ -307,6 +434,12 @@ declare function calculateVideoModelCost(modelId: string, durationSeconds: numbe
307
434
  declare function calculateAvatarCost(modelId: string, costPerMinute: number, durationSeconds: number): AvatarCostEstimate;
308
435
  declare function calculateAvatarModelCost(modelId: string, durationSeconds: number, pricing?: AvatarModelPricing[]): AvatarCostEstimate;
309
436
 
437
+ declare function calculateTtsCost(modelId: string, costPerMChars: number, characters: number): TtsCostEstimate;
438
+ declare function calculateTtsModelCost(modelId: string, characters: number, pricing?: TtsModelPricing[]): TtsCostEstimate;
439
+
440
+ declare function calculateSttCost(modelId: string, costPerMinute: number, durationSeconds: number): SttCostEstimate;
441
+ declare function calculateSttModelCost(modelId: string, durationSeconds: number, pricing?: SttModelPricing[]): SttCostEstimate;
442
+
310
443
  declare const STATIC_PRICING: ModelPricing[];
311
444
 
312
445
  declare const STATIC_IMAGE_PRICING: ImageModelPricing[];
@@ -315,4 +448,8 @@ declare const STATIC_VIDEO_PRICING: VideoModelPricing[];
315
448
 
316
449
  declare const STATIC_AVATAR_PRICING: AvatarModelPricing[];
317
450
 
318
- export { type AvatarCostEstimate, type AvatarModelHistory, type AvatarModelPricing, type AvatarPriceHistoryPoint, type AvatarProviderSummary, type ClientOptions, type ConfidenceLevel, type CostEstimate, type DataConfidence, type FreshnessInfo, type ImageCostEstimate, type ImageModelHistory, type ImageModelPricing, type ImagePriceHistoryPoint, type ImageProviderSummary, type ImageQualityTier, type ModelHistory, type ModelPricing, type ModelStatus, type PriceHistoryPoint, PriceTokenClient, type PriceTokenError, type PriceTokenResponse, type ProviderSummary, STATIC_AVATAR_PRICING, STATIC_IMAGE_PRICING, STATIC_PRICING, STATIC_VIDEO_PRICING, type VideoCostEstimate, type VideoModelHistory, type VideoModelPricing, type VideoPriceHistoryPoint, type VideoProviderSummary, calculateAvatarCost, calculateAvatarModelCost, calculateCost, calculateImageCost, calculateImageModelCost, calculateModelCost, calculateVideoCost, calculateVideoModelCost };
451
+ declare const STATIC_TTS_PRICING: TtsModelPricing[];
452
+
453
+ declare const STATIC_STT_PRICING: SttModelPricing[];
454
+
455
+ export { type AvatarCostEstimate, type AvatarModelHistory, type AvatarModelPricing, type AvatarPriceHistoryPoint, type AvatarProviderSummary, type ClientOptions, type ConfidenceLevel, type CostEstimate, type DataConfidence, type FreshnessInfo, type ImageCostEstimate, type ImageModelHistory, type ImageModelPricing, type ImagePriceHistoryPoint, type ImageProviderSummary, type ImageQualityTier, type ModelHistory, type ModelPricing, type ModelStatus, type PriceHistoryPoint, PriceTokenClient, type PriceTokenError, type PriceTokenResponse, type ProviderSummary, STATIC_AVATAR_PRICING, STATIC_IMAGE_PRICING, STATIC_PRICING, STATIC_STT_PRICING, STATIC_TTS_PRICING, STATIC_VIDEO_PRICING, type SttCostEstimate, type SttModelHistory, type SttModelPricing, type SttPriceHistoryPoint, type SttProviderSummary, type TtsCostEstimate, type TtsModelHistory, type TtsModelPricing, type TtsPriceHistoryPoint, type TtsProviderSummary, type VideoCostEstimate, type VideoModelHistory, type VideoModelPricing, type VideoPriceHistoryPoint, type VideoProviderSummary, calculateAvatarCost, calculateAvatarModelCost, calculateCost, calculateImageCost, calculateImageModelCost, calculateModelCost, calculateSttCost, calculateSttModelCost, calculateTtsCost, calculateTtsModelCost, calculateVideoCost, calculateVideoModelCost };