tokenmeter 0.9.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.
Files changed (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +346 -0
  3. package/dist/__tests__/context.test.d.ts +2 -0
  4. package/dist/__tests__/context.test.d.ts.map +1 -0
  5. package/dist/__tests__/context.test.js +94 -0
  6. package/dist/__tests__/context.test.js.map +1 -0
  7. package/dist/__tests__/elevenlabs.test.d.ts +2 -0
  8. package/dist/__tests__/elevenlabs.test.d.ts.map +1 -0
  9. package/dist/__tests__/elevenlabs.test.js +108 -0
  10. package/dist/__tests__/elevenlabs.test.js.map +1 -0
  11. package/dist/__tests__/fal.test.d.ts +2 -0
  12. package/dist/__tests__/fal.test.d.ts.map +1 -0
  13. package/dist/__tests__/fal.test.js +153 -0
  14. package/dist/__tests__/fal.test.js.map +1 -0
  15. package/dist/__tests__/pricing.test.d.ts +2 -0
  16. package/dist/__tests__/pricing.test.d.ts.map +1 -0
  17. package/dist/__tests__/pricing.test.js +76 -0
  18. package/dist/__tests__/pricing.test.js.map +1 -0
  19. package/dist/__tests__/recorder.test.d.ts +2 -0
  20. package/dist/__tests__/recorder.test.d.ts.map +1 -0
  21. package/dist/__tests__/recorder.test.js +133 -0
  22. package/dist/__tests__/recorder.test.js.map +1 -0
  23. package/dist/__tests__/storage.test.d.ts +2 -0
  24. package/dist/__tests__/storage.test.d.ts.map +1 -0
  25. package/dist/__tests__/storage.test.js +106 -0
  26. package/dist/__tests__/storage.test.js.map +1 -0
  27. package/dist/client/index.d.ts +8 -0
  28. package/dist/client/index.d.ts.map +1 -0
  29. package/dist/client/index.js +7 -0
  30. package/dist/client/index.js.map +1 -0
  31. package/dist/config.d.ts +92 -0
  32. package/dist/config.d.ts.map +1 -0
  33. package/dist/config.js +166 -0
  34. package/dist/config.js.map +1 -0
  35. package/dist/context.d.ts +80 -0
  36. package/dist/context.d.ts.map +1 -0
  37. package/dist/context.js +131 -0
  38. package/dist/context.js.map +1 -0
  39. package/dist/exporter/PostgresExporter.d.ts +82 -0
  40. package/dist/exporter/PostgresExporter.d.ts.map +1 -0
  41. package/dist/exporter/PostgresExporter.js +237 -0
  42. package/dist/exporter/PostgresExporter.js.map +1 -0
  43. package/dist/exporter/index.d.ts +8 -0
  44. package/dist/exporter/index.d.ts.map +1 -0
  45. package/dist/exporter/index.js +7 -0
  46. package/dist/exporter/index.js.map +1 -0
  47. package/dist/index.d.ts +31 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +37 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/instrumentation/proxy.d.ts +26 -0
  52. package/dist/instrumentation/proxy.d.ts.map +1 -0
  53. package/dist/instrumentation/proxy.js +337 -0
  54. package/dist/instrumentation/proxy.js.map +1 -0
  55. package/dist/instrumentation/strategies/index.d.ts +55 -0
  56. package/dist/instrumentation/strategies/index.d.ts.map +1 -0
  57. package/dist/instrumentation/strategies/index.js +429 -0
  58. package/dist/instrumentation/strategies/index.js.map +1 -0
  59. package/dist/integrations/express/index.d.ts +137 -0
  60. package/dist/integrations/express/index.d.ts.map +1 -0
  61. package/dist/integrations/express/index.js +186 -0
  62. package/dist/integrations/express/index.js.map +1 -0
  63. package/dist/integrations/inngest/index.d.ts +222 -0
  64. package/dist/integrations/inngest/index.d.ts.map +1 -0
  65. package/dist/integrations/inngest/index.js +223 -0
  66. package/dist/integrations/inngest/index.js.map +1 -0
  67. package/dist/integrations/langfuse/index.d.ts +170 -0
  68. package/dist/integrations/langfuse/index.d.ts.map +1 -0
  69. package/dist/integrations/langfuse/index.js +225 -0
  70. package/dist/integrations/langfuse/index.js.map +1 -0
  71. package/dist/integrations/next/index.d.ts +138 -0
  72. package/dist/integrations/next/index.d.ts.map +1 -0
  73. package/dist/integrations/next/index.js +170 -0
  74. package/dist/integrations/next/index.js.map +1 -0
  75. package/dist/integrations/nextjs/index.d.ts +198 -0
  76. package/dist/integrations/nextjs/index.d.ts.map +1 -0
  77. package/dist/integrations/nextjs/index.js +181 -0
  78. package/dist/integrations/nextjs/index.js.map +1 -0
  79. package/dist/integrations/vercel-ai/index.d.ts +288 -0
  80. package/dist/integrations/vercel-ai/index.d.ts.map +1 -0
  81. package/dist/integrations/vercel-ai/index.js +260 -0
  82. package/dist/integrations/vercel-ai/index.js.map +1 -0
  83. package/dist/logger.d.ts +58 -0
  84. package/dist/logger.d.ts.map +1 -0
  85. package/dist/logger.js +89 -0
  86. package/dist/logger.js.map +1 -0
  87. package/dist/pricing/catalog.d.ts +10 -0
  88. package/dist/pricing/catalog.d.ts.map +1 -0
  89. package/dist/pricing/catalog.js +297 -0
  90. package/dist/pricing/catalog.js.map +1 -0
  91. package/dist/pricing/index.d.ts +77 -0
  92. package/dist/pricing/index.d.ts.map +1 -0
  93. package/dist/pricing/index.js +251 -0
  94. package/dist/pricing/index.js.map +1 -0
  95. package/dist/pricing/manifest.d.ts +156 -0
  96. package/dist/pricing/manifest.d.ts.map +1 -0
  97. package/dist/pricing/manifest.js +381 -0
  98. package/dist/pricing/manifest.js.map +1 -0
  99. package/dist/pricing/manifest.json +12786 -0
  100. package/dist/pricing/providers/anthropic.json +253 -0
  101. package/dist/pricing/providers/bedrock.json +341 -0
  102. package/dist/pricing/providers/bfl.json +220 -0
  103. package/dist/pricing/providers/elevenlabs.json +142 -0
  104. package/dist/pricing/providers/fal.json +15866 -0
  105. package/dist/pricing/providers/google.json +346 -0
  106. package/dist/pricing/providers/openai.json +1035 -0
  107. package/dist/pricing/schema.d.ts +102 -0
  108. package/dist/pricing/schema.d.ts.map +1 -0
  109. package/dist/pricing/schema.js +56 -0
  110. package/dist/pricing/schema.js.map +1 -0
  111. package/dist/processor/TokenMeterProcessor.d.ts +55 -0
  112. package/dist/processor/TokenMeterProcessor.d.ts.map +1 -0
  113. package/dist/processor/TokenMeterProcessor.js +132 -0
  114. package/dist/processor/TokenMeterProcessor.js.map +1 -0
  115. package/dist/query/client.d.ts +61 -0
  116. package/dist/query/client.d.ts.map +1 -0
  117. package/dist/query/client.js +206 -0
  118. package/dist/query/client.js.map +1 -0
  119. package/dist/query/index.d.ts +8 -0
  120. package/dist/query/index.d.ts.map +1 -0
  121. package/dist/query/index.js +7 -0
  122. package/dist/query/index.js.map +1 -0
  123. package/dist/recorder.d.ts +74 -0
  124. package/dist/recorder.d.ts.map +1 -0
  125. package/dist/recorder.js +227 -0
  126. package/dist/recorder.js.map +1 -0
  127. package/dist/sdks/anthropic.d.ts +21 -0
  128. package/dist/sdks/anthropic.d.ts.map +1 -0
  129. package/dist/sdks/anthropic.js +258 -0
  130. package/dist/sdks/anthropic.js.map +1 -0
  131. package/dist/sdks/elevenlabs.d.ts +59 -0
  132. package/dist/sdks/elevenlabs.d.ts.map +1 -0
  133. package/dist/sdks/elevenlabs.js +192 -0
  134. package/dist/sdks/elevenlabs.js.map +1 -0
  135. package/dist/sdks/fal.d.ts +102 -0
  136. package/dist/sdks/fal.d.ts.map +1 -0
  137. package/dist/sdks/fal.js +306 -0
  138. package/dist/sdks/fal.js.map +1 -0
  139. package/dist/sdks/openai.d.ts +17 -0
  140. package/dist/sdks/openai.d.ts.map +1 -0
  141. package/dist/sdks/openai.js +191 -0
  142. package/dist/sdks/openai.js.map +1 -0
  143. package/dist/storage/interface.d.ts +15 -0
  144. package/dist/storage/interface.d.ts.map +1 -0
  145. package/dist/storage/interface.js +53 -0
  146. package/dist/storage/interface.js.map +1 -0
  147. package/dist/storage/prisma.d.ts +15 -0
  148. package/dist/storage/prisma.d.ts.map +1 -0
  149. package/dist/storage/prisma.js +135 -0
  150. package/dist/storage/prisma.js.map +1 -0
  151. package/dist/types.d.ts +206 -0
  152. package/dist/types.d.ts.map +1 -0
  153. package/dist/types.js +45 -0
  154. package/dist/types.js.map +1 -0
  155. package/dist/vercel-ai/index.d.ts +89 -0
  156. package/dist/vercel-ai/index.d.ts.map +1 -0
  157. package/dist/vercel-ai/index.js +298 -0
  158. package/dist/vercel-ai/index.js.map +1 -0
  159. package/package.json +119 -0
@@ -0,0 +1,1035 @@
1
+ {
2
+ "$schema": "../schema.json",
3
+ "provider": "openai",
4
+ "displayName": "OpenAI",
5
+ "source": "https://platform.openai.com/docs/pricing",
6
+ "lastUpdated": "2025-12-22",
7
+ "currency": "USD",
8
+ "models": {
9
+ "gpt-5.2": {
10
+ "name": "GPT-5.2",
11
+ "unit": "tokens",
12
+ "unitSize": 1000000,
13
+ "pricing": [
14
+ {
15
+ "effectiveDate": "2025-12-01",
16
+ "input": 1.75,
17
+ "output": 14.0,
18
+ "cachedInput": 0.175,
19
+ "notes": "Standard tier pricing"
20
+ }
21
+ ]
22
+ },
23
+ "gpt-5.1": {
24
+ "name": "GPT-5.1",
25
+ "unit": "tokens",
26
+ "unitSize": 1000000,
27
+ "pricing": [
28
+ {
29
+ "effectiveDate": "2025-10-01",
30
+ "input": 1.25,
31
+ "output": 10.0,
32
+ "cachedInput": 0.125,
33
+ "notes": "Standard tier pricing"
34
+ }
35
+ ]
36
+ },
37
+ "gpt-5": {
38
+ "name": "GPT-5",
39
+ "unit": "tokens",
40
+ "unitSize": 1000000,
41
+ "pricing": [
42
+ {
43
+ "effectiveDate": "2025-05-06",
44
+ "input": 1.25,
45
+ "output": 10.0,
46
+ "cachedInput": 0.125,
47
+ "notes": "Standard tier pricing"
48
+ }
49
+ ]
50
+ },
51
+ "gpt-5-mini": {
52
+ "name": "GPT-5 Mini",
53
+ "unit": "tokens",
54
+ "unitSize": 1000000,
55
+ "pricing": [
56
+ {
57
+ "effectiveDate": "2025-05-06",
58
+ "input": 0.25,
59
+ "output": 2.0,
60
+ "cachedInput": 0.025,
61
+ "notes": "Standard tier pricing"
62
+ }
63
+ ]
64
+ },
65
+ "gpt-5-nano": {
66
+ "name": "GPT-5 Nano",
67
+ "unit": "tokens",
68
+ "unitSize": 1000000,
69
+ "pricing": [
70
+ {
71
+ "effectiveDate": "2025-05-06",
72
+ "input": 0.05,
73
+ "output": 0.4,
74
+ "cachedInput": 0.005,
75
+ "notes": "Standard tier pricing"
76
+ }
77
+ ]
78
+ },
79
+ "gpt-5.2-pro": {
80
+ "name": "GPT-5.2 Pro",
81
+ "unit": "tokens",
82
+ "unitSize": 1000000,
83
+ "pricing": [
84
+ {
85
+ "effectiveDate": "2025-12-01",
86
+ "input": 21.0,
87
+ "output": 168.0,
88
+ "notes": "Standard tier pricing, no caching"
89
+ }
90
+ ]
91
+ },
92
+ "gpt-5-pro": {
93
+ "name": "GPT-5 Pro",
94
+ "unit": "tokens",
95
+ "unitSize": 1000000,
96
+ "pricing": [
97
+ {
98
+ "effectiveDate": "2025-05-06",
99
+ "input": 15.0,
100
+ "output": 120.0,
101
+ "notes": "Standard tier pricing, no caching"
102
+ }
103
+ ]
104
+ },
105
+ "gpt-5.2-chat-latest": {
106
+ "name": "GPT-5.2 Chat Latest",
107
+ "unit": "tokens",
108
+ "unitSize": 1000000,
109
+ "pricing": [
110
+ {
111
+ "effectiveDate": "2025-12-01",
112
+ "input": 1.75,
113
+ "output": 14.0,
114
+ "cachedInput": 0.175,
115
+ "notes": "Standard tier pricing"
116
+ }
117
+ ]
118
+ },
119
+ "gpt-5.1-chat-latest": {
120
+ "name": "GPT-5.1 Chat Latest",
121
+ "unit": "tokens",
122
+ "unitSize": 1000000,
123
+ "pricing": [
124
+ {
125
+ "effectiveDate": "2025-10-01",
126
+ "input": 1.25,
127
+ "output": 10.0,
128
+ "cachedInput": 0.125,
129
+ "notes": "Standard tier pricing"
130
+ }
131
+ ]
132
+ },
133
+ "gpt-5-chat-latest": {
134
+ "name": "GPT-5 Chat Latest",
135
+ "unit": "tokens",
136
+ "unitSize": 1000000,
137
+ "pricing": [
138
+ {
139
+ "effectiveDate": "2025-05-06",
140
+ "input": 1.25,
141
+ "output": 10.0,
142
+ "cachedInput": 0.125,
143
+ "notes": "Standard tier pricing"
144
+ }
145
+ ]
146
+ },
147
+ "gpt-5.1-codex-max": {
148
+ "name": "GPT-5.1 Codex Max",
149
+ "unit": "tokens",
150
+ "unitSize": 1000000,
151
+ "pricing": [
152
+ {
153
+ "effectiveDate": "2025-10-01",
154
+ "input": 1.25,
155
+ "output": 10.0,
156
+ "cachedInput": 0.125,
157
+ "notes": "Standard tier pricing"
158
+ }
159
+ ]
160
+ },
161
+ "gpt-5.1-codex": {
162
+ "name": "GPT-5.1 Codex",
163
+ "unit": "tokens",
164
+ "unitSize": 1000000,
165
+ "pricing": [
166
+ {
167
+ "effectiveDate": "2025-10-01",
168
+ "input": 1.25,
169
+ "output": 10.0,
170
+ "cachedInput": 0.125,
171
+ "notes": "Standard tier pricing"
172
+ }
173
+ ]
174
+ },
175
+ "gpt-5-codex": {
176
+ "name": "GPT-5 Codex",
177
+ "unit": "tokens",
178
+ "unitSize": 1000000,
179
+ "pricing": [
180
+ {
181
+ "effectiveDate": "2025-05-06",
182
+ "input": 1.25,
183
+ "output": 10.0,
184
+ "cachedInput": 0.125,
185
+ "notes": "Standard tier pricing"
186
+ }
187
+ ]
188
+ },
189
+ "gpt-5.1-codex-mini": {
190
+ "name": "GPT-5.1 Codex Mini",
191
+ "unit": "tokens",
192
+ "unitSize": 1000000,
193
+ "pricing": [
194
+ {
195
+ "effectiveDate": "2025-10-01",
196
+ "input": 0.25,
197
+ "output": 2.0,
198
+ "cachedInput": 0.025,
199
+ "notes": "Standard tier pricing"
200
+ }
201
+ ]
202
+ },
203
+ "codex-mini-latest": {
204
+ "name": "Codex Mini Latest",
205
+ "unit": "tokens",
206
+ "unitSize": 1000000,
207
+ "pricing": [
208
+ {
209
+ "effectiveDate": "2025-10-01",
210
+ "input": 1.5,
211
+ "output": 6.0,
212
+ "cachedInput": 0.375,
213
+ "notes": "Standard tier pricing"
214
+ }
215
+ ]
216
+ },
217
+ "gpt-4.1": {
218
+ "name": "GPT-4.1",
219
+ "unit": "tokens",
220
+ "unitSize": 1000000,
221
+ "pricing": [
222
+ {
223
+ "effectiveDate": "2025-04-14",
224
+ "input": 2.0,
225
+ "output": 8.0,
226
+ "cachedInput": 0.5,
227
+ "notes": "Standard tier pricing"
228
+ }
229
+ ]
230
+ },
231
+ "gpt-4.1-mini": {
232
+ "name": "GPT-4.1 Mini",
233
+ "unit": "tokens",
234
+ "unitSize": 1000000,
235
+ "pricing": [
236
+ {
237
+ "effectiveDate": "2025-04-14",
238
+ "input": 0.4,
239
+ "output": 1.6,
240
+ "cachedInput": 0.1,
241
+ "notes": "Standard tier pricing"
242
+ }
243
+ ]
244
+ },
245
+ "gpt-4.1-nano": {
246
+ "name": "GPT-4.1 Nano",
247
+ "unit": "tokens",
248
+ "unitSize": 1000000,
249
+ "pricing": [
250
+ {
251
+ "effectiveDate": "2025-04-14",
252
+ "input": 0.1,
253
+ "output": 0.4,
254
+ "cachedInput": 0.025,
255
+ "notes": "Standard tier pricing"
256
+ }
257
+ ]
258
+ },
259
+ "gpt-4o": {
260
+ "name": "GPT-4o",
261
+ "unit": "tokens",
262
+ "unitSize": 1000000,
263
+ "pricing": [
264
+ {
265
+ "effectiveDate": "2024-05-13",
266
+ "input": 5.0,
267
+ "output": 15.0,
268
+ "notes": "Initial GPT-4o release"
269
+ },
270
+ {
271
+ "effectiveDate": "2024-08-06",
272
+ "input": 2.5,
273
+ "output": 10.0,
274
+ "cachedInput": 1.25,
275
+ "notes": "Price reduction with prompt caching"
276
+ }
277
+ ]
278
+ },
279
+ "gpt-4o-2024-05-13": {
280
+ "name": "GPT-4o (2024-05-13)",
281
+ "unit": "tokens",
282
+ "unitSize": 1000000,
283
+ "pricing": [
284
+ {
285
+ "effectiveDate": "2024-05-13",
286
+ "input": 5.0,
287
+ "output": 15.0,
288
+ "notes": "Standard tier pricing"
289
+ }
290
+ ]
291
+ },
292
+ "gpt-4o-mini": {
293
+ "name": "GPT-4o Mini",
294
+ "unit": "tokens",
295
+ "unitSize": 1000000,
296
+ "pricing": [
297
+ {
298
+ "effectiveDate": "2024-07-18",
299
+ "input": 0.15,
300
+ "output": 0.6,
301
+ "cachedInput": 0.075,
302
+ "notes": "Standard tier pricing"
303
+ }
304
+ ]
305
+ },
306
+ "o1": {
307
+ "name": "o1",
308
+ "unit": "tokens",
309
+ "unitSize": 1000000,
310
+ "pricing": [
311
+ {
312
+ "effectiveDate": "2024-09-12",
313
+ "input": 15.0,
314
+ "output": 60.0,
315
+ "cachedInput": 7.5,
316
+ "notes": "Standard tier pricing"
317
+ }
318
+ ]
319
+ },
320
+ "o1-pro": {
321
+ "name": "o1 Pro",
322
+ "unit": "tokens",
323
+ "unitSize": 1000000,
324
+ "pricing": [
325
+ {
326
+ "effectiveDate": "2024-12-05",
327
+ "input": 150.0,
328
+ "output": 600.0,
329
+ "notes": "Standard tier pricing, no caching"
330
+ }
331
+ ]
332
+ },
333
+ "o1-mini": {
334
+ "name": "o1 Mini",
335
+ "unit": "tokens",
336
+ "unitSize": 1000000,
337
+ "pricing": [
338
+ {
339
+ "effectiveDate": "2024-09-12",
340
+ "input": 3.0,
341
+ "output": 12.0,
342
+ "cachedInput": 1.5,
343
+ "notes": "Initial o1-mini release"
344
+ },
345
+ {
346
+ "effectiveDate": "2024-12-01",
347
+ "input": 1.1,
348
+ "output": 4.4,
349
+ "cachedInput": 0.55,
350
+ "notes": "Price reduction"
351
+ }
352
+ ]
353
+ },
354
+ "o3": {
355
+ "name": "o3",
356
+ "unit": "tokens",
357
+ "unitSize": 1000000,
358
+ "pricing": [
359
+ {
360
+ "effectiveDate": "2025-01-31",
361
+ "input": 2.0,
362
+ "output": 8.0,
363
+ "cachedInput": 0.5,
364
+ "notes": "Standard tier pricing"
365
+ }
366
+ ]
367
+ },
368
+ "o3-pro": {
369
+ "name": "o3 Pro",
370
+ "unit": "tokens",
371
+ "unitSize": 1000000,
372
+ "pricing": [
373
+ {
374
+ "effectiveDate": "2025-06-10",
375
+ "input": 20.0,
376
+ "output": 80.0,
377
+ "notes": "Standard tier pricing, no caching"
378
+ }
379
+ ]
380
+ },
381
+ "o3-mini": {
382
+ "name": "o3 Mini",
383
+ "unit": "tokens",
384
+ "unitSize": 1000000,
385
+ "pricing": [
386
+ {
387
+ "effectiveDate": "2025-01-31",
388
+ "input": 1.1,
389
+ "output": 4.4,
390
+ "cachedInput": 0.55,
391
+ "notes": "Standard tier pricing"
392
+ }
393
+ ]
394
+ },
395
+ "o3-deep-research": {
396
+ "name": "o3 Deep Research",
397
+ "unit": "tokens",
398
+ "unitSize": 1000000,
399
+ "pricing": [
400
+ {
401
+ "effectiveDate": "2025-06-01",
402
+ "input": 10.0,
403
+ "output": 40.0,
404
+ "cachedInput": 2.5,
405
+ "notes": "Standard tier pricing"
406
+ }
407
+ ]
408
+ },
409
+ "o4-mini": {
410
+ "name": "o4 Mini",
411
+ "unit": "tokens",
412
+ "unitSize": 1000000,
413
+ "pricing": [
414
+ {
415
+ "effectiveDate": "2025-04-16",
416
+ "input": 1.1,
417
+ "output": 4.4,
418
+ "cachedInput": 0.275,
419
+ "notes": "Standard tier pricing"
420
+ }
421
+ ]
422
+ },
423
+ "o4-mini-deep-research": {
424
+ "name": "o4 Mini Deep Research",
425
+ "unit": "tokens",
426
+ "unitSize": 1000000,
427
+ "pricing": [
428
+ {
429
+ "effectiveDate": "2025-06-01",
430
+ "input": 2.0,
431
+ "output": 8.0,
432
+ "cachedInput": 0.5,
433
+ "notes": "Standard tier pricing"
434
+ }
435
+ ]
436
+ },
437
+ "gpt-realtime": {
438
+ "name": "GPT Realtime",
439
+ "unit": "tokens",
440
+ "unitSize": 1000000,
441
+ "pricing": [
442
+ {
443
+ "effectiveDate": "2025-06-01",
444
+ "input": 4.0,
445
+ "output": 16.0,
446
+ "cachedInput": 0.4,
447
+ "notes": "Text tokens, standard tier"
448
+ }
449
+ ]
450
+ },
451
+ "gpt-realtime-mini": {
452
+ "name": "GPT Realtime Mini",
453
+ "unit": "tokens",
454
+ "unitSize": 1000000,
455
+ "pricing": [
456
+ {
457
+ "effectiveDate": "2025-06-01",
458
+ "input": 0.6,
459
+ "output": 2.4,
460
+ "cachedInput": 0.06,
461
+ "notes": "Text tokens, standard tier"
462
+ }
463
+ ]
464
+ },
465
+ "gpt-4o-realtime-preview": {
466
+ "name": "GPT-4o Realtime Preview",
467
+ "unit": "tokens",
468
+ "unitSize": 1000000,
469
+ "pricing": [
470
+ {
471
+ "effectiveDate": "2024-10-01",
472
+ "input": 5.0,
473
+ "output": 20.0,
474
+ "cachedInput": 2.5,
475
+ "notes": "Text tokens, standard tier"
476
+ }
477
+ ]
478
+ },
479
+ "gpt-4o-mini-realtime-preview": {
480
+ "name": "GPT-4o Mini Realtime Preview",
481
+ "unit": "tokens",
482
+ "unitSize": 1000000,
483
+ "pricing": [
484
+ {
485
+ "effectiveDate": "2024-10-01",
486
+ "input": 0.6,
487
+ "output": 2.4,
488
+ "cachedInput": 0.3,
489
+ "notes": "Text tokens, standard tier"
490
+ }
491
+ ]
492
+ },
493
+ "gpt-audio": {
494
+ "name": "GPT Audio",
495
+ "unit": "tokens",
496
+ "unitSize": 1000000,
497
+ "pricing": [
498
+ {
499
+ "effectiveDate": "2025-06-01",
500
+ "input": 2.5,
501
+ "output": 10.0,
502
+ "notes": "Text tokens, standard tier"
503
+ }
504
+ ]
505
+ },
506
+ "gpt-audio-mini": {
507
+ "name": "GPT Audio Mini",
508
+ "unit": "tokens",
509
+ "unitSize": 1000000,
510
+ "pricing": [
511
+ {
512
+ "effectiveDate": "2025-06-01",
513
+ "input": 0.6,
514
+ "output": 2.4,
515
+ "notes": "Text tokens, standard tier"
516
+ }
517
+ ]
518
+ },
519
+ "gpt-4o-audio-preview": {
520
+ "name": "GPT-4o Audio Preview",
521
+ "unit": "tokens",
522
+ "unitSize": 1000000,
523
+ "pricing": [
524
+ {
525
+ "effectiveDate": "2024-10-01",
526
+ "input": 2.5,
527
+ "output": 10.0,
528
+ "notes": "Text tokens, standard tier"
529
+ }
530
+ ]
531
+ },
532
+ "gpt-4o-mini-audio-preview": {
533
+ "name": "GPT-4o Mini Audio Preview",
534
+ "unit": "tokens",
535
+ "unitSize": 1000000,
536
+ "pricing": [
537
+ {
538
+ "effectiveDate": "2024-10-01",
539
+ "input": 0.15,
540
+ "output": 0.6,
541
+ "notes": "Text tokens, standard tier"
542
+ }
543
+ ]
544
+ },
545
+ "gpt-5-search-api": {
546
+ "name": "GPT-5 Search API",
547
+ "unit": "tokens",
548
+ "unitSize": 1000000,
549
+ "pricing": [
550
+ {
551
+ "effectiveDate": "2025-06-01",
552
+ "input": 1.25,
553
+ "output": 10.0,
554
+ "cachedInput": 0.125,
555
+ "notes": "Standard tier pricing"
556
+ }
557
+ ]
558
+ },
559
+ "gpt-4o-search-preview": {
560
+ "name": "GPT-4o Search Preview",
561
+ "unit": "tokens",
562
+ "unitSize": 1000000,
563
+ "pricing": [
564
+ {
565
+ "effectiveDate": "2025-01-01",
566
+ "input": 2.5,
567
+ "output": 10.0,
568
+ "notes": "Standard tier pricing"
569
+ }
570
+ ]
571
+ },
572
+ "gpt-4o-mini-search-preview": {
573
+ "name": "GPT-4o Mini Search Preview",
574
+ "unit": "tokens",
575
+ "unitSize": 1000000,
576
+ "pricing": [
577
+ {
578
+ "effectiveDate": "2025-01-01",
579
+ "input": 0.15,
580
+ "output": 0.6,
581
+ "notes": "Standard tier pricing"
582
+ }
583
+ ]
584
+ },
585
+ "computer-use-preview": {
586
+ "name": "Computer Use Preview",
587
+ "unit": "tokens",
588
+ "unitSize": 1000000,
589
+ "pricing": [
590
+ {
591
+ "effectiveDate": "2025-03-01",
592
+ "input": 3.0,
593
+ "output": 12.0,
594
+ "notes": "Standard tier pricing"
595
+ }
596
+ ]
597
+ },
598
+ "gpt-image-1.5": {
599
+ "name": "GPT Image 1.5",
600
+ "unit": "tokens",
601
+ "unitSize": 1000000,
602
+ "pricing": [
603
+ {
604
+ "effectiveDate": "2025-06-01",
605
+ "input": 5.0,
606
+ "output": 10.0,
607
+ "cachedInput": 1.25,
608
+ "notes": "Text tokens, standard tier"
609
+ }
610
+ ]
611
+ },
612
+ "chatgpt-image-latest": {
613
+ "name": "ChatGPT Image Latest",
614
+ "unit": "tokens",
615
+ "unitSize": 1000000,
616
+ "pricing": [
617
+ {
618
+ "effectiveDate": "2025-06-01",
619
+ "input": 5.0,
620
+ "output": 10.0,
621
+ "cachedInput": 1.25,
622
+ "notes": "Text tokens, standard tier"
623
+ }
624
+ ]
625
+ },
626
+ "gpt-image-1": {
627
+ "name": "GPT Image 1",
628
+ "unit": "tokens",
629
+ "unitSize": 1000000,
630
+ "pricing": [
631
+ {
632
+ "effectiveDate": "2025-03-01",
633
+ "input": 5.0,
634
+ "cachedInput": 1.25,
635
+ "notes": "Text tokens, standard tier"
636
+ }
637
+ ]
638
+ },
639
+ "gpt-image-1-mini": {
640
+ "name": "GPT Image 1 Mini",
641
+ "unit": "tokens",
642
+ "unitSize": 1000000,
643
+ "pricing": [
644
+ {
645
+ "effectiveDate": "2025-03-01",
646
+ "input": 2.0,
647
+ "cachedInput": 0.2,
648
+ "notes": "Text tokens, standard tier"
649
+ }
650
+ ]
651
+ },
652
+ "gpt-4o-mini-tts": {
653
+ "name": "GPT-4o Mini TTS",
654
+ "unit": "tokens",
655
+ "unitSize": 1000000,
656
+ "pricing": [
657
+ {
658
+ "effectiveDate": "2025-06-01",
659
+ "input": 0.6,
660
+ "notes": "Text tokens, ~$0.015/minute"
661
+ }
662
+ ]
663
+ },
664
+ "gpt-4o-transcribe": {
665
+ "name": "GPT-4o Transcribe",
666
+ "unit": "tokens",
667
+ "unitSize": 1000000,
668
+ "pricing": [
669
+ {
670
+ "effectiveDate": "2025-06-01",
671
+ "input": 2.5,
672
+ "output": 10.0,
673
+ "notes": "Text tokens, ~$0.006/minute"
674
+ }
675
+ ]
676
+ },
677
+ "gpt-4o-transcribe-diarize": {
678
+ "name": "GPT-4o Transcribe Diarize",
679
+ "unit": "tokens",
680
+ "unitSize": 1000000,
681
+ "pricing": [
682
+ {
683
+ "effectiveDate": "2025-06-01",
684
+ "input": 2.5,
685
+ "output": 10.0,
686
+ "notes": "Text tokens, ~$0.006/minute"
687
+ }
688
+ ]
689
+ },
690
+ "gpt-4o-mini-transcribe": {
691
+ "name": "GPT-4o Mini Transcribe",
692
+ "unit": "tokens",
693
+ "unitSize": 1000000,
694
+ "pricing": [
695
+ {
696
+ "effectiveDate": "2025-06-01",
697
+ "input": 1.25,
698
+ "output": 5.0,
699
+ "notes": "Text tokens, ~$0.003/minute"
700
+ }
701
+ ]
702
+ },
703
+ "whisper-1": {
704
+ "name": "Whisper",
705
+ "unit": "minutes",
706
+ "unitSize": 1,
707
+ "aliases": ["whisper"],
708
+ "pricing": [
709
+ {
710
+ "effectiveDate": "2023-03-01",
711
+ "input": 0.006,
712
+ "notes": "Per minute of audio"
713
+ }
714
+ ]
715
+ },
716
+ "tts-1": {
717
+ "name": "TTS",
718
+ "unit": "characters",
719
+ "unitSize": 1000000,
720
+ "aliases": ["tts"],
721
+ "pricing": [
722
+ {
723
+ "effectiveDate": "2023-11-01",
724
+ "input": 15.0,
725
+ "notes": "Per 1M characters"
726
+ }
727
+ ]
728
+ },
729
+ "tts-1-hd": {
730
+ "name": "TTS HD",
731
+ "unit": "characters",
732
+ "unitSize": 1000000,
733
+ "aliases": ["tts-hd"],
734
+ "pricing": [
735
+ {
736
+ "effectiveDate": "2023-11-01",
737
+ "input": 30.0,
738
+ "notes": "Per 1M characters"
739
+ }
740
+ ]
741
+ },
742
+ "sora-2": {
743
+ "name": "Sora 2",
744
+ "unit": "seconds",
745
+ "unitSize": 1,
746
+ "pricing": [
747
+ {
748
+ "effectiveDate": "2025-06-01",
749
+ "output": 0.1,
750
+ "notes": "720p resolution, per second"
751
+ }
752
+ ]
753
+ },
754
+ "sora-2-pro": {
755
+ "name": "Sora 2 Pro",
756
+ "unit": "seconds",
757
+ "unitSize": 1,
758
+ "pricing": [
759
+ {
760
+ "effectiveDate": "2025-06-01",
761
+ "output": 0.3,
762
+ "notes": "720p resolution, per second. $0.50/sec for 1024p+"
763
+ }
764
+ ]
765
+ },
766
+ "dall-e-3": {
767
+ "name": "DALL-E 3",
768
+ "unit": "images",
769
+ "unitSize": 1,
770
+ "aliases": ["dalle-3", "dall-e-3-standard", "dall-e-3-hd"],
771
+ "pricing": [
772
+ {
773
+ "effectiveDate": "2023-11-01",
774
+ "output": 0.04,
775
+ "notes": "Standard 1024x1024. HD: $0.08. Larger sizes: $0.08-$0.12"
776
+ }
777
+ ]
778
+ },
779
+ "dall-e-2": {
780
+ "name": "DALL-E 2",
781
+ "unit": "images",
782
+ "unitSize": 1,
783
+ "aliases": ["dalle-2"],
784
+ "pricing": [
785
+ {
786
+ "effectiveDate": "2022-04-01",
787
+ "output": 0.016,
788
+ "notes": "1024x1024. Larger sizes: $0.018-$0.02"
789
+ }
790
+ ]
791
+ },
792
+ "text-embedding-3-small": {
793
+ "name": "Text Embedding 3 Small",
794
+ "unit": "tokens",
795
+ "unitSize": 1000000,
796
+ "pricing": [
797
+ {
798
+ "effectiveDate": "2024-01-25",
799
+ "input": 0.02,
800
+ "notes": "Batch: $0.01/1M tokens"
801
+ }
802
+ ]
803
+ },
804
+ "text-embedding-3-large": {
805
+ "name": "Text Embedding 3 Large",
806
+ "unit": "tokens",
807
+ "unitSize": 1000000,
808
+ "pricing": [
809
+ {
810
+ "effectiveDate": "2024-01-25",
811
+ "input": 0.13,
812
+ "notes": "Batch: $0.065/1M tokens"
813
+ }
814
+ ]
815
+ },
816
+ "text-embedding-ada-002": {
817
+ "name": "Text Embedding Ada 002",
818
+ "unit": "tokens",
819
+ "unitSize": 1000000,
820
+ "pricing": [
821
+ {
822
+ "effectiveDate": "2022-12-01",
823
+ "input": 0.1,
824
+ "notes": "Batch: $0.05/1M tokens"
825
+ }
826
+ ]
827
+ },
828
+ "chatgpt-4o-latest": {
829
+ "name": "ChatGPT-4o Latest",
830
+ "unit": "tokens",
831
+ "unitSize": 1000000,
832
+ "deprecated": true,
833
+ "pricing": [
834
+ {
835
+ "effectiveDate": "2024-08-01",
836
+ "input": 5.0,
837
+ "output": 15.0,
838
+ "notes": "Legacy model"
839
+ }
840
+ ]
841
+ },
842
+ "gpt-4-turbo": {
843
+ "name": "GPT-4 Turbo",
844
+ "unit": "tokens",
845
+ "unitSize": 1000000,
846
+ "aliases": ["gpt-4-turbo-2024-04-09"],
847
+ "deprecated": true,
848
+ "pricing": [
849
+ {
850
+ "effectiveDate": "2023-11-06",
851
+ "input": 10.0,
852
+ "output": 30.0,
853
+ "notes": "Legacy model"
854
+ }
855
+ ]
856
+ },
857
+ "gpt-4-0125-preview": {
858
+ "name": "GPT-4 0125 Preview",
859
+ "unit": "tokens",
860
+ "unitSize": 1000000,
861
+ "deprecated": true,
862
+ "pricing": [
863
+ {
864
+ "effectiveDate": "2024-01-25",
865
+ "input": 10.0,
866
+ "output": 30.0,
867
+ "notes": "Legacy model"
868
+ }
869
+ ]
870
+ },
871
+ "gpt-4-1106-preview": {
872
+ "name": "GPT-4 1106 Preview",
873
+ "unit": "tokens",
874
+ "unitSize": 1000000,
875
+ "deprecated": true,
876
+ "pricing": [
877
+ {
878
+ "effectiveDate": "2023-11-06",
879
+ "input": 10.0,
880
+ "output": 30.0,
881
+ "notes": "Legacy model"
882
+ }
883
+ ]
884
+ },
885
+ "gpt-4-1106-vision-preview": {
886
+ "name": "GPT-4 1106 Vision Preview",
887
+ "unit": "tokens",
888
+ "unitSize": 1000000,
889
+ "deprecated": true,
890
+ "pricing": [
891
+ {
892
+ "effectiveDate": "2023-11-06",
893
+ "input": 10.0,
894
+ "output": 30.0,
895
+ "notes": "Legacy model"
896
+ }
897
+ ]
898
+ },
899
+ "gpt-4": {
900
+ "name": "GPT-4",
901
+ "unit": "tokens",
902
+ "unitSize": 1000000,
903
+ "aliases": ["gpt-4-0613", "gpt-4-0314"],
904
+ "deprecated": true,
905
+ "pricing": [
906
+ {
907
+ "effectiveDate": "2023-03-14",
908
+ "input": 30.0,
909
+ "output": 60.0,
910
+ "notes": "Legacy model"
911
+ }
912
+ ]
913
+ },
914
+ "gpt-4-32k": {
915
+ "name": "GPT-4 32K",
916
+ "unit": "tokens",
917
+ "unitSize": 1000000,
918
+ "deprecated": true,
919
+ "pricing": [
920
+ {
921
+ "effectiveDate": "2023-03-14",
922
+ "input": 60.0,
923
+ "output": 120.0,
924
+ "notes": "Legacy model"
925
+ }
926
+ ]
927
+ },
928
+ "gpt-3.5-turbo": {
929
+ "name": "GPT-3.5 Turbo",
930
+ "unit": "tokens",
931
+ "unitSize": 1000000,
932
+ "aliases": ["gpt-3.5-turbo-0125"],
933
+ "deprecated": true,
934
+ "pricing": [
935
+ {
936
+ "effectiveDate": "2023-03-01",
937
+ "input": 1.5,
938
+ "output": 2.0,
939
+ "notes": "Initial release"
940
+ },
941
+ {
942
+ "effectiveDate": "2024-01-25",
943
+ "input": 0.5,
944
+ "output": 1.5,
945
+ "notes": "Price reduction"
946
+ }
947
+ ]
948
+ },
949
+ "gpt-3.5-turbo-1106": {
950
+ "name": "GPT-3.5 Turbo 1106",
951
+ "unit": "tokens",
952
+ "unitSize": 1000000,
953
+ "deprecated": true,
954
+ "pricing": [
955
+ {
956
+ "effectiveDate": "2023-11-06",
957
+ "input": 1.0,
958
+ "output": 2.0,
959
+ "notes": "Legacy model"
960
+ }
961
+ ]
962
+ },
963
+ "gpt-3.5-turbo-0613": {
964
+ "name": "GPT-3.5 Turbo 0613",
965
+ "unit": "tokens",
966
+ "unitSize": 1000000,
967
+ "aliases": ["gpt-3.5-0301"],
968
+ "deprecated": true,
969
+ "pricing": [
970
+ {
971
+ "effectiveDate": "2023-06-13",
972
+ "input": 1.5,
973
+ "output": 2.0,
974
+ "notes": "Legacy model"
975
+ }
976
+ ]
977
+ },
978
+ "gpt-3.5-turbo-instruct": {
979
+ "name": "GPT-3.5 Turbo Instruct",
980
+ "unit": "tokens",
981
+ "unitSize": 1000000,
982
+ "deprecated": true,
983
+ "pricing": [
984
+ {
985
+ "effectiveDate": "2023-09-01",
986
+ "input": 1.5,
987
+ "output": 2.0,
988
+ "notes": "Legacy model"
989
+ }
990
+ ]
991
+ },
992
+ "gpt-3.5-turbo-16k-0613": {
993
+ "name": "GPT-3.5 Turbo 16K",
994
+ "unit": "tokens",
995
+ "unitSize": 1000000,
996
+ "deprecated": true,
997
+ "pricing": [
998
+ {
999
+ "effectiveDate": "2023-06-13",
1000
+ "input": 3.0,
1001
+ "output": 4.0,
1002
+ "notes": "Legacy model"
1003
+ }
1004
+ ]
1005
+ },
1006
+ "davinci-002": {
1007
+ "name": "Davinci 002",
1008
+ "unit": "tokens",
1009
+ "unitSize": 1000000,
1010
+ "deprecated": true,
1011
+ "pricing": [
1012
+ {
1013
+ "effectiveDate": "2023-01-01",
1014
+ "input": 2.0,
1015
+ "output": 2.0,
1016
+ "notes": "Legacy model"
1017
+ }
1018
+ ]
1019
+ },
1020
+ "babbage-002": {
1021
+ "name": "Babbage 002",
1022
+ "unit": "tokens",
1023
+ "unitSize": 1000000,
1024
+ "deprecated": true,
1025
+ "pricing": [
1026
+ {
1027
+ "effectiveDate": "2023-01-01",
1028
+ "input": 0.4,
1029
+ "output": 0.4,
1030
+ "notes": "Legacy model"
1031
+ }
1032
+ ]
1033
+ }
1034
+ }
1035
+ }