ai-token-estimator 1.0.2 → 1.0.3
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/README.md +55 -5
- package/dist/index.cjs +205 -5
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +205 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,20 +117,70 @@ This package counts Unicode code points, not UTF-16 code units. This means:
|
|
|
117
117
|
|
|
118
118
|
| Model | Chars/Token | Input Cost (per 1M tokens) |
|
|
119
119
|
|-------|-------------|---------------------------|
|
|
120
|
-
|
|
|
120
|
+
| babbage-002 | 4 | $0.40 |
|
|
121
|
+
| chatgpt-4o-latest | 4 | $5.00 |
|
|
122
|
+
| chatgpt-image-latest | 4 | $5.00 |
|
|
123
|
+
| codex-mini-latest | 4 | $1.50 |
|
|
124
|
+
| computer-use-preview | 4 | $3.00 |
|
|
125
|
+
| davinci-002 | 4 | $2.00 |
|
|
126
|
+
| gpt-3.5-0301 | 4 | $1.50 |
|
|
127
|
+
| gpt-3.5-turbo | 4 | $0.50 |
|
|
128
|
+
| gpt-3.5-turbo-0125 | 4 | $0.50 |
|
|
129
|
+
| gpt-3.5-turbo-0613 | 4 | $1.50 |
|
|
130
|
+
| gpt-3.5-turbo-1106 | 4 | $1.00 |
|
|
131
|
+
| gpt-3.5-turbo-16k-0613 | 4 | $3.00 |
|
|
132
|
+
| gpt-3.5-turbo-instruct | 4 | $1.50 |
|
|
133
|
+
| gpt-4-0125-preview | 4 | $10.00 |
|
|
134
|
+
| gpt-4-0314 | 4 | $30.00 |
|
|
135
|
+
| gpt-4-0613 | 4 | $30.00 |
|
|
136
|
+
| gpt-4-1106-preview | 4 | $10.00 |
|
|
137
|
+
| gpt-4-1106-vision-preview | 4 | $10.00 |
|
|
138
|
+
| gpt-4-32k | 4 | $60.00 |
|
|
139
|
+
| gpt-4-turbo-2024-04-09 | 4 | $10.00 |
|
|
140
|
+
| gpt-4.1 | 4 | $2.00 |
|
|
121
141
|
| gpt-4.1-mini | 4 | $0.40 |
|
|
122
142
|
| gpt-4.1-nano | 4 | $0.10 |
|
|
123
143
|
| gpt-4o | 4 | $2.50 |
|
|
144
|
+
| gpt-4o-2024-05-13 | 4 | $5.00 |
|
|
145
|
+
| gpt-4o-audio-preview | 4 | $2.50 |
|
|
124
146
|
| gpt-4o-mini | 4 | $0.15 |
|
|
147
|
+
| gpt-4o-mini-audio-preview | 4 | $0.15 |
|
|
148
|
+
| gpt-4o-mini-realtime-preview | 4 | $0.60 |
|
|
149
|
+
| gpt-4o-mini-search-preview | 4 | $0.15 |
|
|
150
|
+
| gpt-4o-realtime-preview | 4 | $5.00 |
|
|
151
|
+
| gpt-4o-search-preview | 4 | $2.50 |
|
|
152
|
+
| gpt-5 | 4 | $1.25 |
|
|
153
|
+
| gpt-5-chat-latest | 4 | $1.25 |
|
|
154
|
+
| gpt-5-codex | 4 | $1.25 |
|
|
125
155
|
| gpt-5-mini | 4 | $0.25 |
|
|
156
|
+
| gpt-5-nano | 4 | $0.05 |
|
|
157
|
+
| gpt-5-pro | 4 | $15.00 |
|
|
158
|
+
| gpt-5-search-api | 4 | $1.25 |
|
|
159
|
+
| gpt-5.1 | 4 | $1.25 |
|
|
160
|
+
| gpt-5.1-chat-latest | 4 | $1.25 |
|
|
161
|
+
| gpt-5.1-codex | 4 | $1.25 |
|
|
162
|
+
| gpt-5.1-codex-max | 4 | $1.25 |
|
|
163
|
+
| gpt-5.1-codex-mini | 4 | $0.25 |
|
|
126
164
|
| gpt-5.2 | 4 | $1.75 |
|
|
165
|
+
| gpt-5.2-chat-latest | 4 | $1.75 |
|
|
166
|
+
| gpt-5.2-codex | 4 | $1.75 |
|
|
127
167
|
| gpt-5.2-pro | 4 | $21.00 |
|
|
168
|
+
| gpt-audio | 4 | $2.50 |
|
|
169
|
+
| gpt-audio-mini | 4 | $0.60 |
|
|
170
|
+
| gpt-image-1 | 4 | $5.00 |
|
|
171
|
+
| gpt-image-1-mini | 4 | $2.00 |
|
|
172
|
+
| gpt-image-1.5 | 4 | $5.00 |
|
|
128
173
|
| gpt-realtime | 4 | $4.00 |
|
|
129
174
|
| gpt-realtime-mini | 4 | $0.60 |
|
|
130
175
|
| o1 | 4 | $15.00 |
|
|
176
|
+
| o1-mini | 4 | $1.10 |
|
|
131
177
|
| o1-pro | 4 | $150.00 |
|
|
132
178
|
| o3 | 4 | $2.00 |
|
|
133
|
-
|
|
|
179
|
+
| o3-deep-research | 4 | $10.00 |
|
|
180
|
+
| o3-mini | 4 | $1.10 |
|
|
181
|
+
| o3-pro | 4 | $20.00 |
|
|
182
|
+
| o4-mini | 4 | $1.10 |
|
|
183
|
+
| o4-mini-deep-research | 4 | $2.00 |
|
|
134
184
|
|
|
135
185
|
### Anthropic Claude Models
|
|
136
186
|
|
|
@@ -164,13 +214,13 @@ This package counts Unicode code points, not UTF-16 code units. This means:
|
|
|
164
214
|
| gemini-3-flash | 4 | $0.50 |
|
|
165
215
|
| gemini-3-pro | 4 | $2.00 |
|
|
166
216
|
|
|
167
|
-
*Last updated:
|
|
217
|
+
*Last updated: 2026-01-14*
|
|
168
218
|
<!-- SUPPORTED_MODELS_END -->
|
|
169
219
|
|
|
170
220
|
## Pricing Updates
|
|
171
221
|
|
|
172
222
|
Model pricing is automatically updated weekly via GitHub Actions. The update script fetches the latest prices directly from:
|
|
173
|
-
- [OpenAI Pricing](https://openai.com/
|
|
223
|
+
- [OpenAI Pricing](https://platform.openai.com/docs/pricing)
|
|
174
224
|
- [Anthropic Pricing](https://www.anthropic.com/pricing)
|
|
175
225
|
- [Google AI Pricing](https://ai.google.dev/gemini-api/docs/pricing)
|
|
176
226
|
|
|
@@ -178,7 +228,7 @@ You can check when prices were last updated:
|
|
|
178
228
|
|
|
179
229
|
```typescript
|
|
180
230
|
import { LAST_UPDATED } from 'ai-token-estimator';
|
|
181
|
-
console.log(LAST_UPDATED); // '
|
|
231
|
+
console.log(LAST_UPDATED); // e.g. '2026-01-14'
|
|
182
232
|
```
|
|
183
233
|
|
|
184
234
|
## License
|
package/dist/index.cjs
CHANGED
|
@@ -29,44 +29,224 @@ __export(index_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(index_exports);
|
|
30
30
|
|
|
31
31
|
// src/models.ts
|
|
32
|
-
var LAST_UPDATED = "
|
|
32
|
+
var LAST_UPDATED = "2026-01-14";
|
|
33
33
|
var models = {
|
|
34
34
|
// ===================
|
|
35
35
|
// OpenAI Models
|
|
36
36
|
// ===================
|
|
37
37
|
// OpenAI uses ~4 chars per token for English text
|
|
38
|
-
"
|
|
38
|
+
"babbage-002": {
|
|
39
|
+
charsPerToken: 4,
|
|
40
|
+
inputCostPerMillion: 0.4
|
|
41
|
+
},
|
|
42
|
+
"chatgpt-4o-latest": {
|
|
43
|
+
charsPerToken: 4,
|
|
44
|
+
inputCostPerMillion: 5
|
|
45
|
+
},
|
|
46
|
+
"chatgpt-image-latest": {
|
|
47
|
+
charsPerToken: 4,
|
|
48
|
+
inputCostPerMillion: 5
|
|
49
|
+
},
|
|
50
|
+
"codex-mini-latest": {
|
|
51
|
+
charsPerToken: 4,
|
|
52
|
+
inputCostPerMillion: 1.5
|
|
53
|
+
},
|
|
54
|
+
"computer-use-preview": {
|
|
39
55
|
charsPerToken: 4,
|
|
40
56
|
inputCostPerMillion: 3
|
|
41
57
|
},
|
|
58
|
+
"davinci-002": {
|
|
59
|
+
charsPerToken: 4,
|
|
60
|
+
inputCostPerMillion: 2
|
|
61
|
+
},
|
|
62
|
+
"gpt-3.5-0301": {
|
|
63
|
+
charsPerToken: 4,
|
|
64
|
+
inputCostPerMillion: 1.5
|
|
65
|
+
},
|
|
66
|
+
"gpt-3.5-turbo": {
|
|
67
|
+
charsPerToken: 4,
|
|
68
|
+
inputCostPerMillion: 0.5
|
|
69
|
+
},
|
|
70
|
+
"gpt-3.5-turbo-0125": {
|
|
71
|
+
charsPerToken: 4,
|
|
72
|
+
inputCostPerMillion: 0.5
|
|
73
|
+
},
|
|
74
|
+
"gpt-3.5-turbo-0613": {
|
|
75
|
+
charsPerToken: 4,
|
|
76
|
+
inputCostPerMillion: 1.5
|
|
77
|
+
},
|
|
78
|
+
"gpt-3.5-turbo-1106": {
|
|
79
|
+
charsPerToken: 4,
|
|
80
|
+
inputCostPerMillion: 1
|
|
81
|
+
},
|
|
82
|
+
"gpt-3.5-turbo-16k-0613": {
|
|
83
|
+
charsPerToken: 4,
|
|
84
|
+
inputCostPerMillion: 3
|
|
85
|
+
},
|
|
86
|
+
"gpt-3.5-turbo-instruct": {
|
|
87
|
+
charsPerToken: 4,
|
|
88
|
+
inputCostPerMillion: 1.5
|
|
89
|
+
},
|
|
90
|
+
"gpt-4-0125-preview": {
|
|
91
|
+
charsPerToken: 4,
|
|
92
|
+
inputCostPerMillion: 10
|
|
93
|
+
},
|
|
94
|
+
"gpt-4-0314": {
|
|
95
|
+
charsPerToken: 4,
|
|
96
|
+
inputCostPerMillion: 30
|
|
97
|
+
},
|
|
98
|
+
"gpt-4-0613": {
|
|
99
|
+
charsPerToken: 4,
|
|
100
|
+
inputCostPerMillion: 30
|
|
101
|
+
},
|
|
102
|
+
"gpt-4-1106-preview": {
|
|
103
|
+
charsPerToken: 4,
|
|
104
|
+
inputCostPerMillion: 10
|
|
105
|
+
},
|
|
106
|
+
"gpt-4-1106-vision-preview": {
|
|
107
|
+
charsPerToken: 4,
|
|
108
|
+
inputCostPerMillion: 10
|
|
109
|
+
},
|
|
110
|
+
"gpt-4-32k": {
|
|
111
|
+
charsPerToken: 4,
|
|
112
|
+
inputCostPerMillion: 60
|
|
113
|
+
},
|
|
114
|
+
"gpt-4-turbo-2024-04-09": {
|
|
115
|
+
charsPerToken: 4,
|
|
116
|
+
inputCostPerMillion: 10
|
|
117
|
+
},
|
|
118
|
+
"gpt-4.1": {
|
|
119
|
+
charsPerToken: 4,
|
|
120
|
+
inputCostPerMillion: 2
|
|
121
|
+
},
|
|
42
122
|
"gpt-4.1-mini": {
|
|
43
123
|
charsPerToken: 4,
|
|
44
|
-
inputCostPerMillion: 0.
|
|
124
|
+
inputCostPerMillion: 0.4
|
|
45
125
|
},
|
|
46
126
|
"gpt-4.1-nano": {
|
|
47
127
|
charsPerToken: 4,
|
|
48
|
-
inputCostPerMillion: 0.
|
|
128
|
+
inputCostPerMillion: 0.1
|
|
49
129
|
},
|
|
50
130
|
"gpt-4o": {
|
|
51
131
|
charsPerToken: 4,
|
|
52
132
|
inputCostPerMillion: 2.5
|
|
53
133
|
},
|
|
134
|
+
"gpt-4o-2024-05-13": {
|
|
135
|
+
charsPerToken: 4,
|
|
136
|
+
inputCostPerMillion: 5
|
|
137
|
+
},
|
|
138
|
+
"gpt-4o-audio-preview": {
|
|
139
|
+
charsPerToken: 4,
|
|
140
|
+
inputCostPerMillion: 2.5
|
|
141
|
+
},
|
|
54
142
|
"gpt-4o-mini": {
|
|
55
143
|
charsPerToken: 4,
|
|
56
144
|
inputCostPerMillion: 0.15
|
|
57
145
|
},
|
|
146
|
+
"gpt-4o-mini-audio-preview": {
|
|
147
|
+
charsPerToken: 4,
|
|
148
|
+
inputCostPerMillion: 0.15
|
|
149
|
+
},
|
|
150
|
+
"gpt-4o-mini-realtime-preview": {
|
|
151
|
+
charsPerToken: 4,
|
|
152
|
+
inputCostPerMillion: 0.6
|
|
153
|
+
},
|
|
154
|
+
"gpt-4o-mini-search-preview": {
|
|
155
|
+
charsPerToken: 4,
|
|
156
|
+
inputCostPerMillion: 0.15
|
|
157
|
+
},
|
|
158
|
+
"gpt-4o-realtime-preview": {
|
|
159
|
+
charsPerToken: 4,
|
|
160
|
+
inputCostPerMillion: 5
|
|
161
|
+
},
|
|
162
|
+
"gpt-4o-search-preview": {
|
|
163
|
+
charsPerToken: 4,
|
|
164
|
+
inputCostPerMillion: 2.5
|
|
165
|
+
},
|
|
166
|
+
"gpt-5": {
|
|
167
|
+
charsPerToken: 4,
|
|
168
|
+
inputCostPerMillion: 1.25
|
|
169
|
+
},
|
|
58
170
|
"gpt-5-mini": {
|
|
59
171
|
charsPerToken: 4,
|
|
60
172
|
inputCostPerMillion: 0.25
|
|
61
173
|
},
|
|
174
|
+
"gpt-5-nano": {
|
|
175
|
+
charsPerToken: 4,
|
|
176
|
+
inputCostPerMillion: 0.05
|
|
177
|
+
},
|
|
178
|
+
"gpt-5-pro": {
|
|
179
|
+
charsPerToken: 4,
|
|
180
|
+
inputCostPerMillion: 15
|
|
181
|
+
},
|
|
182
|
+
"gpt-5-search-api": {
|
|
183
|
+
charsPerToken: 4,
|
|
184
|
+
inputCostPerMillion: 1.25
|
|
185
|
+
},
|
|
186
|
+
"gpt-5.1": {
|
|
187
|
+
charsPerToken: 4,
|
|
188
|
+
inputCostPerMillion: 1.25
|
|
189
|
+
},
|
|
190
|
+
"gpt-5.1-chat-latest": {
|
|
191
|
+
charsPerToken: 4,
|
|
192
|
+
inputCostPerMillion: 1.25
|
|
193
|
+
},
|
|
194
|
+
"gpt-5.1-codex": {
|
|
195
|
+
charsPerToken: 4,
|
|
196
|
+
inputCostPerMillion: 1.25
|
|
197
|
+
},
|
|
198
|
+
"gpt-5.1-codex-max": {
|
|
199
|
+
charsPerToken: 4,
|
|
200
|
+
inputCostPerMillion: 1.25
|
|
201
|
+
},
|
|
202
|
+
"gpt-5.1-codex-mini": {
|
|
203
|
+
charsPerToken: 4,
|
|
204
|
+
inputCostPerMillion: 0.25
|
|
205
|
+
},
|
|
206
|
+
"gpt-5-chat-latest": {
|
|
207
|
+
charsPerToken: 4,
|
|
208
|
+
inputCostPerMillion: 1.25
|
|
209
|
+
},
|
|
210
|
+
"gpt-5-codex": {
|
|
211
|
+
charsPerToken: 4,
|
|
212
|
+
inputCostPerMillion: 1.25
|
|
213
|
+
},
|
|
62
214
|
"gpt-5.2": {
|
|
63
215
|
charsPerToken: 4,
|
|
64
216
|
inputCostPerMillion: 1.75
|
|
65
217
|
},
|
|
218
|
+
"gpt-5.2-chat-latest": {
|
|
219
|
+
charsPerToken: 4,
|
|
220
|
+
inputCostPerMillion: 1.75
|
|
221
|
+
},
|
|
222
|
+
"gpt-5.2-codex": {
|
|
223
|
+
charsPerToken: 4,
|
|
224
|
+
inputCostPerMillion: 1.75
|
|
225
|
+
},
|
|
66
226
|
"gpt-5.2-pro": {
|
|
67
227
|
charsPerToken: 4,
|
|
68
228
|
inputCostPerMillion: 21
|
|
69
229
|
},
|
|
230
|
+
"gpt-audio": {
|
|
231
|
+
charsPerToken: 4,
|
|
232
|
+
inputCostPerMillion: 2.5
|
|
233
|
+
},
|
|
234
|
+
"gpt-audio-mini": {
|
|
235
|
+
charsPerToken: 4,
|
|
236
|
+
inputCostPerMillion: 0.6
|
|
237
|
+
},
|
|
238
|
+
"gpt-image-1": {
|
|
239
|
+
charsPerToken: 4,
|
|
240
|
+
inputCostPerMillion: 5
|
|
241
|
+
},
|
|
242
|
+
"gpt-image-1-mini": {
|
|
243
|
+
charsPerToken: 4,
|
|
244
|
+
inputCostPerMillion: 2
|
|
245
|
+
},
|
|
246
|
+
"gpt-image-1.5": {
|
|
247
|
+
charsPerToken: 4,
|
|
248
|
+
inputCostPerMillion: 5
|
|
249
|
+
},
|
|
70
250
|
"gpt-realtime": {
|
|
71
251
|
charsPerToken: 4,
|
|
72
252
|
inputCostPerMillion: 4
|
|
@@ -79,6 +259,10 @@ var models = {
|
|
|
79
259
|
charsPerToken: 4,
|
|
80
260
|
inputCostPerMillion: 15
|
|
81
261
|
},
|
|
262
|
+
"o1-mini": {
|
|
263
|
+
charsPerToken: 4,
|
|
264
|
+
inputCostPerMillion: 1.1
|
|
265
|
+
},
|
|
82
266
|
"o1-pro": {
|
|
83
267
|
charsPerToken: 4,
|
|
84
268
|
inputCostPerMillion: 150
|
|
@@ -87,9 +271,25 @@ var models = {
|
|
|
87
271
|
charsPerToken: 4,
|
|
88
272
|
inputCostPerMillion: 2
|
|
89
273
|
},
|
|
274
|
+
"o3-deep-research": {
|
|
275
|
+
charsPerToken: 4,
|
|
276
|
+
inputCostPerMillion: 10
|
|
277
|
+
},
|
|
278
|
+
"o3-mini": {
|
|
279
|
+
charsPerToken: 4,
|
|
280
|
+
inputCostPerMillion: 1.1
|
|
281
|
+
},
|
|
282
|
+
"o3-pro": {
|
|
283
|
+
charsPerToken: 4,
|
|
284
|
+
inputCostPerMillion: 20
|
|
285
|
+
},
|
|
90
286
|
"o4-mini": {
|
|
91
287
|
charsPerToken: 4,
|
|
92
|
-
inputCostPerMillion:
|
|
288
|
+
inputCostPerMillion: 1.1
|
|
289
|
+
},
|
|
290
|
+
"o4-mini-deep-research": {
|
|
291
|
+
charsPerToken: 4,
|
|
292
|
+
inputCostPerMillion: 2
|
|
93
293
|
},
|
|
94
294
|
// ===================
|
|
95
295
|
// Anthropic Models
|
package/dist/index.d.cts
CHANGED
|
@@ -57,16 +57,16 @@ declare function estimate(input: EstimateInput): EstimateOutput;
|
|
|
57
57
|
* Default model configurations.
|
|
58
58
|
*
|
|
59
59
|
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
60
|
-
* Last updated:
|
|
60
|
+
* Last updated: 2026-01-14
|
|
61
61
|
*
|
|
62
62
|
* Sources:
|
|
63
|
-
* - OpenAI: https://openai.com/
|
|
63
|
+
* - OpenAI: https://platform.openai.com/docs/pricing
|
|
64
64
|
* - Anthropic: https://www.anthropic.com/pricing
|
|
65
65
|
* - Google: https://ai.google.dev/gemini-api/docs/pricing
|
|
66
66
|
*
|
|
67
67
|
* This file is automatically updated weekly by GitHub Actions.
|
|
68
68
|
*/
|
|
69
|
-
declare const LAST_UPDATED = "
|
|
69
|
+
declare const LAST_UPDATED = "2026-01-14";
|
|
70
70
|
declare const DEFAULT_MODELS: Readonly<Record<string, Readonly<ModelConfig>>>;
|
|
71
71
|
/**
|
|
72
72
|
* Get configuration for a specific model.
|
package/dist/index.d.ts
CHANGED
|
@@ -57,16 +57,16 @@ declare function estimate(input: EstimateInput): EstimateOutput;
|
|
|
57
57
|
* Default model configurations.
|
|
58
58
|
*
|
|
59
59
|
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
60
|
-
* Last updated:
|
|
60
|
+
* Last updated: 2026-01-14
|
|
61
61
|
*
|
|
62
62
|
* Sources:
|
|
63
|
-
* - OpenAI: https://openai.com/
|
|
63
|
+
* - OpenAI: https://platform.openai.com/docs/pricing
|
|
64
64
|
* - Anthropic: https://www.anthropic.com/pricing
|
|
65
65
|
* - Google: https://ai.google.dev/gemini-api/docs/pricing
|
|
66
66
|
*
|
|
67
67
|
* This file is automatically updated weekly by GitHub Actions.
|
|
68
68
|
*/
|
|
69
|
-
declare const LAST_UPDATED = "
|
|
69
|
+
declare const LAST_UPDATED = "2026-01-14";
|
|
70
70
|
declare const DEFAULT_MODELS: Readonly<Record<string, Readonly<ModelConfig>>>;
|
|
71
71
|
/**
|
|
72
72
|
* Get configuration for a specific model.
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,222 @@
|
|
|
1
1
|
// src/models.ts
|
|
2
|
-
var LAST_UPDATED = "
|
|
2
|
+
var LAST_UPDATED = "2026-01-14";
|
|
3
3
|
var models = {
|
|
4
4
|
// ===================
|
|
5
5
|
// OpenAI Models
|
|
6
6
|
// ===================
|
|
7
7
|
// OpenAI uses ~4 chars per token for English text
|
|
8
|
-
"
|
|
8
|
+
"babbage-002": {
|
|
9
|
+
charsPerToken: 4,
|
|
10
|
+
inputCostPerMillion: 0.4
|
|
11
|
+
},
|
|
12
|
+
"chatgpt-4o-latest": {
|
|
13
|
+
charsPerToken: 4,
|
|
14
|
+
inputCostPerMillion: 5
|
|
15
|
+
},
|
|
16
|
+
"chatgpt-image-latest": {
|
|
17
|
+
charsPerToken: 4,
|
|
18
|
+
inputCostPerMillion: 5
|
|
19
|
+
},
|
|
20
|
+
"codex-mini-latest": {
|
|
21
|
+
charsPerToken: 4,
|
|
22
|
+
inputCostPerMillion: 1.5
|
|
23
|
+
},
|
|
24
|
+
"computer-use-preview": {
|
|
9
25
|
charsPerToken: 4,
|
|
10
26
|
inputCostPerMillion: 3
|
|
11
27
|
},
|
|
28
|
+
"davinci-002": {
|
|
29
|
+
charsPerToken: 4,
|
|
30
|
+
inputCostPerMillion: 2
|
|
31
|
+
},
|
|
32
|
+
"gpt-3.5-0301": {
|
|
33
|
+
charsPerToken: 4,
|
|
34
|
+
inputCostPerMillion: 1.5
|
|
35
|
+
},
|
|
36
|
+
"gpt-3.5-turbo": {
|
|
37
|
+
charsPerToken: 4,
|
|
38
|
+
inputCostPerMillion: 0.5
|
|
39
|
+
},
|
|
40
|
+
"gpt-3.5-turbo-0125": {
|
|
41
|
+
charsPerToken: 4,
|
|
42
|
+
inputCostPerMillion: 0.5
|
|
43
|
+
},
|
|
44
|
+
"gpt-3.5-turbo-0613": {
|
|
45
|
+
charsPerToken: 4,
|
|
46
|
+
inputCostPerMillion: 1.5
|
|
47
|
+
},
|
|
48
|
+
"gpt-3.5-turbo-1106": {
|
|
49
|
+
charsPerToken: 4,
|
|
50
|
+
inputCostPerMillion: 1
|
|
51
|
+
},
|
|
52
|
+
"gpt-3.5-turbo-16k-0613": {
|
|
53
|
+
charsPerToken: 4,
|
|
54
|
+
inputCostPerMillion: 3
|
|
55
|
+
},
|
|
56
|
+
"gpt-3.5-turbo-instruct": {
|
|
57
|
+
charsPerToken: 4,
|
|
58
|
+
inputCostPerMillion: 1.5
|
|
59
|
+
},
|
|
60
|
+
"gpt-4-0125-preview": {
|
|
61
|
+
charsPerToken: 4,
|
|
62
|
+
inputCostPerMillion: 10
|
|
63
|
+
},
|
|
64
|
+
"gpt-4-0314": {
|
|
65
|
+
charsPerToken: 4,
|
|
66
|
+
inputCostPerMillion: 30
|
|
67
|
+
},
|
|
68
|
+
"gpt-4-0613": {
|
|
69
|
+
charsPerToken: 4,
|
|
70
|
+
inputCostPerMillion: 30
|
|
71
|
+
},
|
|
72
|
+
"gpt-4-1106-preview": {
|
|
73
|
+
charsPerToken: 4,
|
|
74
|
+
inputCostPerMillion: 10
|
|
75
|
+
},
|
|
76
|
+
"gpt-4-1106-vision-preview": {
|
|
77
|
+
charsPerToken: 4,
|
|
78
|
+
inputCostPerMillion: 10
|
|
79
|
+
},
|
|
80
|
+
"gpt-4-32k": {
|
|
81
|
+
charsPerToken: 4,
|
|
82
|
+
inputCostPerMillion: 60
|
|
83
|
+
},
|
|
84
|
+
"gpt-4-turbo-2024-04-09": {
|
|
85
|
+
charsPerToken: 4,
|
|
86
|
+
inputCostPerMillion: 10
|
|
87
|
+
},
|
|
88
|
+
"gpt-4.1": {
|
|
89
|
+
charsPerToken: 4,
|
|
90
|
+
inputCostPerMillion: 2
|
|
91
|
+
},
|
|
12
92
|
"gpt-4.1-mini": {
|
|
13
93
|
charsPerToken: 4,
|
|
14
|
-
inputCostPerMillion: 0.
|
|
94
|
+
inputCostPerMillion: 0.4
|
|
15
95
|
},
|
|
16
96
|
"gpt-4.1-nano": {
|
|
17
97
|
charsPerToken: 4,
|
|
18
|
-
inputCostPerMillion: 0.
|
|
98
|
+
inputCostPerMillion: 0.1
|
|
19
99
|
},
|
|
20
100
|
"gpt-4o": {
|
|
21
101
|
charsPerToken: 4,
|
|
22
102
|
inputCostPerMillion: 2.5
|
|
23
103
|
},
|
|
104
|
+
"gpt-4o-2024-05-13": {
|
|
105
|
+
charsPerToken: 4,
|
|
106
|
+
inputCostPerMillion: 5
|
|
107
|
+
},
|
|
108
|
+
"gpt-4o-audio-preview": {
|
|
109
|
+
charsPerToken: 4,
|
|
110
|
+
inputCostPerMillion: 2.5
|
|
111
|
+
},
|
|
24
112
|
"gpt-4o-mini": {
|
|
25
113
|
charsPerToken: 4,
|
|
26
114
|
inputCostPerMillion: 0.15
|
|
27
115
|
},
|
|
116
|
+
"gpt-4o-mini-audio-preview": {
|
|
117
|
+
charsPerToken: 4,
|
|
118
|
+
inputCostPerMillion: 0.15
|
|
119
|
+
},
|
|
120
|
+
"gpt-4o-mini-realtime-preview": {
|
|
121
|
+
charsPerToken: 4,
|
|
122
|
+
inputCostPerMillion: 0.6
|
|
123
|
+
},
|
|
124
|
+
"gpt-4o-mini-search-preview": {
|
|
125
|
+
charsPerToken: 4,
|
|
126
|
+
inputCostPerMillion: 0.15
|
|
127
|
+
},
|
|
128
|
+
"gpt-4o-realtime-preview": {
|
|
129
|
+
charsPerToken: 4,
|
|
130
|
+
inputCostPerMillion: 5
|
|
131
|
+
},
|
|
132
|
+
"gpt-4o-search-preview": {
|
|
133
|
+
charsPerToken: 4,
|
|
134
|
+
inputCostPerMillion: 2.5
|
|
135
|
+
},
|
|
136
|
+
"gpt-5": {
|
|
137
|
+
charsPerToken: 4,
|
|
138
|
+
inputCostPerMillion: 1.25
|
|
139
|
+
},
|
|
28
140
|
"gpt-5-mini": {
|
|
29
141
|
charsPerToken: 4,
|
|
30
142
|
inputCostPerMillion: 0.25
|
|
31
143
|
},
|
|
144
|
+
"gpt-5-nano": {
|
|
145
|
+
charsPerToken: 4,
|
|
146
|
+
inputCostPerMillion: 0.05
|
|
147
|
+
},
|
|
148
|
+
"gpt-5-pro": {
|
|
149
|
+
charsPerToken: 4,
|
|
150
|
+
inputCostPerMillion: 15
|
|
151
|
+
},
|
|
152
|
+
"gpt-5-search-api": {
|
|
153
|
+
charsPerToken: 4,
|
|
154
|
+
inputCostPerMillion: 1.25
|
|
155
|
+
},
|
|
156
|
+
"gpt-5.1": {
|
|
157
|
+
charsPerToken: 4,
|
|
158
|
+
inputCostPerMillion: 1.25
|
|
159
|
+
},
|
|
160
|
+
"gpt-5.1-chat-latest": {
|
|
161
|
+
charsPerToken: 4,
|
|
162
|
+
inputCostPerMillion: 1.25
|
|
163
|
+
},
|
|
164
|
+
"gpt-5.1-codex": {
|
|
165
|
+
charsPerToken: 4,
|
|
166
|
+
inputCostPerMillion: 1.25
|
|
167
|
+
},
|
|
168
|
+
"gpt-5.1-codex-max": {
|
|
169
|
+
charsPerToken: 4,
|
|
170
|
+
inputCostPerMillion: 1.25
|
|
171
|
+
},
|
|
172
|
+
"gpt-5.1-codex-mini": {
|
|
173
|
+
charsPerToken: 4,
|
|
174
|
+
inputCostPerMillion: 0.25
|
|
175
|
+
},
|
|
176
|
+
"gpt-5-chat-latest": {
|
|
177
|
+
charsPerToken: 4,
|
|
178
|
+
inputCostPerMillion: 1.25
|
|
179
|
+
},
|
|
180
|
+
"gpt-5-codex": {
|
|
181
|
+
charsPerToken: 4,
|
|
182
|
+
inputCostPerMillion: 1.25
|
|
183
|
+
},
|
|
32
184
|
"gpt-5.2": {
|
|
33
185
|
charsPerToken: 4,
|
|
34
186
|
inputCostPerMillion: 1.75
|
|
35
187
|
},
|
|
188
|
+
"gpt-5.2-chat-latest": {
|
|
189
|
+
charsPerToken: 4,
|
|
190
|
+
inputCostPerMillion: 1.75
|
|
191
|
+
},
|
|
192
|
+
"gpt-5.2-codex": {
|
|
193
|
+
charsPerToken: 4,
|
|
194
|
+
inputCostPerMillion: 1.75
|
|
195
|
+
},
|
|
36
196
|
"gpt-5.2-pro": {
|
|
37
197
|
charsPerToken: 4,
|
|
38
198
|
inputCostPerMillion: 21
|
|
39
199
|
},
|
|
200
|
+
"gpt-audio": {
|
|
201
|
+
charsPerToken: 4,
|
|
202
|
+
inputCostPerMillion: 2.5
|
|
203
|
+
},
|
|
204
|
+
"gpt-audio-mini": {
|
|
205
|
+
charsPerToken: 4,
|
|
206
|
+
inputCostPerMillion: 0.6
|
|
207
|
+
},
|
|
208
|
+
"gpt-image-1": {
|
|
209
|
+
charsPerToken: 4,
|
|
210
|
+
inputCostPerMillion: 5
|
|
211
|
+
},
|
|
212
|
+
"gpt-image-1-mini": {
|
|
213
|
+
charsPerToken: 4,
|
|
214
|
+
inputCostPerMillion: 2
|
|
215
|
+
},
|
|
216
|
+
"gpt-image-1.5": {
|
|
217
|
+
charsPerToken: 4,
|
|
218
|
+
inputCostPerMillion: 5
|
|
219
|
+
},
|
|
40
220
|
"gpt-realtime": {
|
|
41
221
|
charsPerToken: 4,
|
|
42
222
|
inputCostPerMillion: 4
|
|
@@ -49,6 +229,10 @@ var models = {
|
|
|
49
229
|
charsPerToken: 4,
|
|
50
230
|
inputCostPerMillion: 15
|
|
51
231
|
},
|
|
232
|
+
"o1-mini": {
|
|
233
|
+
charsPerToken: 4,
|
|
234
|
+
inputCostPerMillion: 1.1
|
|
235
|
+
},
|
|
52
236
|
"o1-pro": {
|
|
53
237
|
charsPerToken: 4,
|
|
54
238
|
inputCostPerMillion: 150
|
|
@@ -57,9 +241,25 @@ var models = {
|
|
|
57
241
|
charsPerToken: 4,
|
|
58
242
|
inputCostPerMillion: 2
|
|
59
243
|
},
|
|
244
|
+
"o3-deep-research": {
|
|
245
|
+
charsPerToken: 4,
|
|
246
|
+
inputCostPerMillion: 10
|
|
247
|
+
},
|
|
248
|
+
"o3-mini": {
|
|
249
|
+
charsPerToken: 4,
|
|
250
|
+
inputCostPerMillion: 1.1
|
|
251
|
+
},
|
|
252
|
+
"o3-pro": {
|
|
253
|
+
charsPerToken: 4,
|
|
254
|
+
inputCostPerMillion: 20
|
|
255
|
+
},
|
|
60
256
|
"o4-mini": {
|
|
61
257
|
charsPerToken: 4,
|
|
62
|
-
inputCostPerMillion:
|
|
258
|
+
inputCostPerMillion: 1.1
|
|
259
|
+
},
|
|
260
|
+
"o4-mini-deep-research": {
|
|
261
|
+
charsPerToken: 4,
|
|
262
|
+
inputCostPerMillion: 2
|
|
63
263
|
},
|
|
64
264
|
// ===================
|
|
65
265
|
// Anthropic Models
|