llm_cost_tracker 0.9.0 → 0.10.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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/README.md +2 -1
  4. data/app/controllers/llm_cost_tracker/application_controller.rb +1 -1
  5. data/app/controllers/llm_cost_tracker/calls_controller.rb +16 -4
  6. data/app/helpers/llm_cost_tracker/application_helper.rb +1 -1
  7. data/app/models/llm_cost_tracker/provider_invoice_import.rb +9 -4
  8. data/app/services/llm_cost_tracker/dashboard/setup_state.rb +110 -0
  9. data/app/views/llm_cost_tracker/calls/show.html.erb +1 -1
  10. data/app/views/llm_cost_tracker/data_quality/index.html.erb +1 -1
  11. data/lib/llm_cost_tracker/billing/cost_status.rb +21 -25
  12. data/lib/llm_cost_tracker/billing/line_item.rb +15 -49
  13. data/lib/llm_cost_tracker/budget.rb +28 -6
  14. data/lib/llm_cost_tracker/capture/stream_collector.rb +35 -29
  15. data/lib/llm_cost_tracker/capture/stream_tracker.rb +1 -1
  16. data/lib/llm_cost_tracker/configuration.rb +31 -28
  17. data/lib/llm_cost_tracker/doctor/capture_verifier.rb +1 -1
  18. data/lib/llm_cost_tracker/doctor/ingestion_check.rb +8 -8
  19. data/lib/llm_cost_tracker/doctor/legacy_audit_check.rb +0 -2
  20. data/lib/llm_cost_tracker/doctor/legacy_billing_status_check.rb +0 -2
  21. data/lib/llm_cost_tracker/doctor.rb +6 -17
  22. data/lib/llm_cost_tracker/engine.rb +1 -2
  23. data/lib/llm_cost_tracker/errors.rb +3 -2
  24. data/lib/llm_cost_tracker/event.rb +47 -0
  25. data/lib/llm_cost_tracker/generators/llm_cost_tracker/{durable_ingestion_generator.rb → async_ingestion_generator.rb} +8 -8
  26. data/lib/llm_cost_tracker/generators/llm_cost_tracker/install_generator.rb +4 -23
  27. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/{create_llm_cost_tracker_durable_ingestion.rb.erb → create_llm_cost_tracker_async_ingestion.rb.erb} +3 -3
  28. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/create_llm_cost_tracker_reconciliation.rb.erb +6 -1
  29. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/initializer.rb.erb +14 -7
  30. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/upgrade_call_rollups_provider.rb.erb +23 -8
  31. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/upgrade_call_tags_key_value_index.rb.erb +5 -5
  32. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/upgrade_provider_invoice_imports_provider.rb.erb +32 -0
  33. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/upgrade_provider_invoices_metadata_index.rb.erb +25 -0
  34. data/lib/llm_cost_tracker/generators/llm_cost_tracker/upgrade_call_rollups_provider_generator.rb +0 -9
  35. data/lib/llm_cost_tracker/generators/llm_cost_tracker/upgrade_provider_invoice_imports_provider_generator.rb +31 -0
  36. data/lib/llm_cost_tracker/generators/llm_cost_tracker/upgrade_provider_invoices_metadata_index_generator.rb +31 -0
  37. data/lib/llm_cost_tracker/ingestion/batch.rb +5 -2
  38. data/lib/llm_cost_tracker/ingestion/inbox.rb +3 -24
  39. data/lib/llm_cost_tracker/ingestion/pool.rb +44 -0
  40. data/lib/llm_cost_tracker/ingestion/worker.rb +22 -36
  41. data/lib/llm_cost_tracker/ingestion.rb +8 -9
  42. data/lib/llm_cost_tracker/integrations/anthropic.rb +28 -42
  43. data/lib/llm_cost_tracker/integrations/base.rb +14 -11
  44. data/lib/llm_cost_tracker/integrations/openai.rb +93 -66
  45. data/lib/llm_cost_tracker/integrations/ruby_llm.rb +18 -20
  46. data/lib/llm_cost_tracker/integrations.rb +14 -13
  47. data/lib/llm_cost_tracker/ledger/period/totals.rb +5 -3
  48. data/lib/llm_cost_tracker/ledger/rollups.rb +4 -13
  49. data/lib/llm_cost_tracker/ledger/schema/call_line_items.rb +11 -0
  50. data/lib/llm_cost_tracker/ledger/schema/call_rollups.rb +13 -3
  51. data/lib/llm_cost_tracker/ledger/schema/call_tags.rb +11 -0
  52. data/lib/llm_cost_tracker/ledger/schema/calls.rb +0 -4
  53. data/lib/llm_cost_tracker/ledger/schema/ingestion_inbox_entries.rb +13 -3
  54. data/lib/llm_cost_tracker/ledger/schema/ingestion_leases.rb +13 -3
  55. data/lib/llm_cost_tracker/ledger/schema/provider_invoice_imports.rb +19 -9
  56. data/lib/llm_cost_tracker/ledger/schema/provider_invoices.rb +26 -11
  57. data/lib/llm_cost_tracker/ledger/store.rb +21 -18
  58. data/lib/llm_cost_tracker/ledger/tags/query.rb +0 -1
  59. data/lib/llm_cost_tracker/logging.rb +0 -4
  60. data/lib/llm_cost_tracker/middleware/faraday.rb +44 -16
  61. data/lib/llm_cost_tracker/parsers/anthropic.rb +21 -28
  62. data/lib/llm_cost_tracker/parsers/azure.rb +46 -0
  63. data/lib/llm_cost_tracker/parsers/base.rb +53 -47
  64. data/lib/llm_cost_tracker/parsers/gemini.rb +20 -22
  65. data/lib/llm_cost_tracker/parsers/openai.rb +8 -40
  66. data/lib/llm_cost_tracker/parsers/openai_compatible.rb +26 -43
  67. data/lib/llm_cost_tracker/parsers/openai_service_charges.rb +45 -16
  68. data/lib/llm_cost_tracker/parsers/openai_usage.rb +16 -20
  69. data/lib/llm_cost_tracker/parsers.rb +31 -4
  70. data/lib/llm_cost_tracker/prices.json +567 -579
  71. data/lib/llm_cost_tracker/pricing/backfill.rb +140 -0
  72. data/lib/llm_cost_tracker/pricing/effective_prices.rb +2 -4
  73. data/lib/llm_cost_tracker/pricing/estimator.rb +33 -0
  74. data/lib/llm_cost_tracker/pricing/explainer.rb +4 -1
  75. data/lib/llm_cost_tracker/pricing/lookup.rb +37 -2
  76. data/lib/llm_cost_tracker/pricing/registry.rb +0 -7
  77. data/lib/llm_cost_tracker/pricing/service_charges.rb +5 -9
  78. data/lib/llm_cost_tracker/pricing/{sync_change_printer.rb → sync/change_printer.rb} +3 -3
  79. data/lib/llm_cost_tracker/pricing/sync/registry_writer.rb +14 -2
  80. data/lib/llm_cost_tracker/pricing/sync.rb +1 -9
  81. data/lib/llm_cost_tracker/pricing/unknown.rb +5 -2
  82. data/lib/llm_cost_tracker/pricing.rb +72 -27
  83. data/lib/llm_cost_tracker/providers/anthropic/tier_classification.rb +22 -0
  84. data/lib/llm_cost_tracker/providers/azure/hosts.rb +17 -0
  85. data/lib/llm_cost_tracker/providers/gemini/model_families.rb +17 -0
  86. data/lib/llm_cost_tracker/providers/openai/hosts.rb +35 -0
  87. data/lib/llm_cost_tracker/providers/openai/model_families.rb +51 -0
  88. data/lib/llm_cost_tracker/railtie.rb +3 -1
  89. data/lib/llm_cost_tracker/reconciliation/diff.rb +26 -45
  90. data/lib/llm_cost_tracker/reconciliation/diff_result.rb +0 -4
  91. data/lib/llm_cost_tracker/reconciliation/importer.rb +1 -0
  92. data/lib/llm_cost_tracker/reconciliation/sources/anthropic_usage.rb +4 -3
  93. data/lib/llm_cost_tracker/report.rb +0 -4
  94. data/lib/llm_cost_tracker/retention.rb +20 -8
  95. data/lib/llm_cost_tracker/tags/sanitizer.rb +13 -17
  96. data/lib/llm_cost_tracker/token_usage.rb +4 -0
  97. data/lib/llm_cost_tracker/tracker.rb +33 -74
  98. data/lib/llm_cost_tracker/version.rb +1 -1
  99. data/lib/llm_cost_tracker.rb +11 -15
  100. data/lib/tasks/llm_cost_tracker.rake +16 -2
  101. metadata +18 -7
  102. data/lib/llm_cost_tracker/dashboard_setup_state.rb +0 -109
  103. data/lib/llm_cost_tracker/ingestion/inline.rb +0 -22
  104. data/lib/llm_cost_tracker/usage_capture.rb +0 -58
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "metadata": {
3
- "updated_at": "2026-05-08",
4
3
  "currency": "USD",
5
- "unit": "1M tokens",
4
+ "min_gem_version": "0.4.0",
5
+ "schema_version": 1,
6
6
  "source_urls": [
7
7
  "https://developers.openai.com/api/docs/pricing",
8
8
  "https://platform.claude.com/docs/en/about-claude/pricing",
@@ -12,890 +12,878 @@
12
12
  "https://console.groq.com/docs/flex-processing",
13
13
  "https://console.groq.com/docs/service-tiers"
14
14
  ],
15
- "schema_version": 1,
16
- "min_gem_version": "0.4.0"
17
- },
18
- "service_charges": {
19
- "anthropic": {
20
- "web_search_request": 10.0,
21
- "web_fetch_request": 0.0,
22
- "code_execution_hour": 0.05
23
- },
24
- "openai": {
25
- "web_search_request": 10.0,
26
- "web_search_preview_request_reasoning": 10.0,
27
- "web_search_preview_request_non_reasoning": 25.0,
28
- "file_search_call": 2.5
29
- }
15
+ "unit": "1M tokens",
16
+ "updated_at": "2026-05-15"
30
17
  },
31
18
  "models": {
19
+ "anthropic/claude-haiku-3": {
20
+ "batch_input": 0.125,
21
+ "batch_output": 0.625,
22
+ "cache_read_input": 0.03,
23
+ "cache_write_extended_input": 0.5,
24
+ "cache_write_input": 0.3,
25
+ "input": 0.25,
26
+ "output": 1.25
27
+ },
32
28
  "anthropic/claude-haiku-4-5": {
33
- "input": 1.0,
34
- "output": 5.0,
29
+ "batch_input": 0.5,
30
+ "batch_output": 2.5,
35
31
  "cache_read_input": 0.1,
36
- "cache_write_input": 1.25,
37
32
  "cache_write_extended_input": 2.0,
38
- "batch_input": 0.5,
39
- "batch_output": 2.5
40
- },
41
- "anthropic/claude-opus-4": {
42
- "input": 15.0,
43
- "output": 75.0,
44
- "cache_read_input": 1.5,
45
- "cache_write_input": 18.75,
46
- "cache_write_extended_input": 30.0,
47
- "batch_input": 7.5,
48
- "batch_output": 37.5
33
+ "cache_write_input": 1.25,
34
+ "input": 1.0,
35
+ "output": 5.0
49
36
  },
50
37
  "anthropic/claude-opus-4-1": {
51
- "input": 15.0,
52
- "output": 75.0,
38
+ "batch_input": 7.5,
39
+ "batch_output": 37.5,
53
40
  "cache_read_input": 1.5,
54
- "cache_write_input": 18.75,
55
41
  "cache_write_extended_input": 30.0,
56
- "batch_input": 7.5,
57
- "batch_output": 37.5
42
+ "cache_write_input": 18.75,
43
+ "input": 15.0,
44
+ "output": 75.0
58
45
  },
59
46
  "anthropic/claude-opus-4-5": {
60
- "input": 5.0,
61
- "output": 25.0,
47
+ "batch_input": 2.5,
48
+ "batch_output": 12.5,
62
49
  "cache_read_input": 0.5,
63
- "cache_write_input": 6.25,
64
50
  "cache_write_extended_input": 10.0,
65
- "batch_input": 2.5,
66
- "batch_output": 12.5
51
+ "cache_write_input": 6.25,
52
+ "input": 5.0,
53
+ "output": 25.0
67
54
  },
68
55
  "anthropic/claude-opus-4-6": {
69
- "input": 5.0,
70
- "output": 25.0,
71
- "cache_read_input": 0.5,
72
- "cache_write_input": 6.25,
73
- "cache_write_extended_input": 10.0,
74
56
  "batch_input": 2.5,
75
57
  "batch_output": 12.5,
76
- "data_residency_input": 5.5,
77
- "data_residency_cache_write_input": 6.875,
78
- "data_residency_cache_write_extended_input": 11.0,
79
- "data_residency_cache_read_input": 0.55,
80
- "data_residency_output": 27.5,
58
+ "cache_read_input": 0.5,
59
+ "cache_write_extended_input": 10.0,
60
+ "cache_write_input": 6.25,
81
61
  "data_residency_batch_input": 2.75,
82
62
  "data_residency_batch_output": 13.75,
83
- "fast_input": 30.0,
84
- "fast_cache_write_input": 37.5,
85
- "fast_cache_write_extended_input": 60.0,
63
+ "data_residency_cache_read_input": 0.55,
64
+ "data_residency_cache_write_extended_input": 11.0,
65
+ "data_residency_cache_write_input": 6.875,
66
+ "data_residency_input": 5.5,
67
+ "data_residency_output": 27.5,
86
68
  "fast_cache_read_input": 3.0,
87
- "fast_output": 150.0,
88
- "fast_data_residency_input": 33.0,
89
- "fast_data_residency_cache_write_input": 41.25,
90
- "fast_data_residency_cache_write_extended_input": 66.0,
69
+ "fast_cache_write_extended_input": 60.0,
70
+ "fast_cache_write_input": 37.5,
91
71
  "fast_data_residency_cache_read_input": 3.3,
92
- "fast_data_residency_output": 165.0
72
+ "fast_data_residency_cache_write_extended_input": 66.0,
73
+ "fast_data_residency_cache_write_input": 41.25,
74
+ "fast_data_residency_input": 33.0,
75
+ "fast_data_residency_output": 165.0,
76
+ "fast_input": 30.0,
77
+ "fast_output": 150.0,
78
+ "input": 5.0,
79
+ "output": 25.0
93
80
  },
94
81
  "anthropic/claude-opus-4-7": {
95
- "input": 5.0,
96
- "output": 25.0,
97
- "cache_read_input": 0.5,
98
- "cache_write_input": 6.25,
99
- "cache_write_extended_input": 10.0,
100
82
  "batch_input": 2.5,
101
83
  "batch_output": 12.5,
102
- "data_residency_input": 5.5,
103
- "data_residency_cache_write_input": 6.875,
104
- "data_residency_cache_write_extended_input": 11.0,
84
+ "cache_read_input": 0.5,
85
+ "cache_write_extended_input": 10.0,
86
+ "cache_write_input": 6.25,
87
+ "data_residency_batch_input": 2.75,
88
+ "data_residency_batch_output": 13.75,
105
89
  "data_residency_cache_read_input": 0.55,
90
+ "data_residency_cache_write_extended_input": 11.0,
91
+ "data_residency_cache_write_input": 6.875,
92
+ "data_residency_input": 5.5,
106
93
  "data_residency_output": 27.5,
107
- "data_residency_batch_input": 2.75,
108
- "data_residency_batch_output": 13.75
109
- },
110
- "anthropic/claude-sonnet-4": {
111
- "input": 3.0,
112
- "output": 15.0,
113
- "cache_read_input": 0.3,
114
- "cache_write_input": 3.75,
115
- "cache_write_extended_input": 6.0,
116
- "batch_input": 1.5,
117
- "batch_output": 7.5
94
+ "input": 5.0,
95
+ "output": 25.0
118
96
  },
119
97
  "anthropic/claude-sonnet-4-5": {
120
- "input": 3.0,
121
- "output": 15.0,
98
+ "batch_input": 1.5,
99
+ "batch_output": 7.5,
122
100
  "cache_read_input": 0.3,
123
- "cache_write_input": 3.75,
124
101
  "cache_write_extended_input": 6.0,
125
- "batch_input": 1.5,
126
- "batch_output": 7.5
102
+ "cache_write_input": 3.75,
103
+ "input": 3.0,
104
+ "output": 15.0
127
105
  },
128
106
  "anthropic/claude-sonnet-4-6": {
129
- "input": 3.0,
130
- "output": 15.0,
131
- "cache_read_input": 0.3,
132
- "cache_write_input": 3.75,
133
- "cache_write_extended_input": 6.0,
134
107
  "batch_input": 1.5,
135
108
  "batch_output": 7.5,
136
- "data_residency_input": 3.3,
137
- "data_residency_cache_write_input": 4.125,
138
- "data_residency_cache_write_extended_input": 6.6,
109
+ "cache_read_input": 0.3,
110
+ "cache_write_extended_input": 6.0,
111
+ "cache_write_input": 3.75,
112
+ "data_residency_batch_input": 1.65,
113
+ "data_residency_batch_output": 8.25,
139
114
  "data_residency_cache_read_input": 0.33,
115
+ "data_residency_cache_write_extended_input": 6.6,
116
+ "data_residency_cache_write_input": 4.125,
117
+ "data_residency_input": 3.3,
140
118
  "data_residency_output": 16.5,
141
- "data_residency_batch_input": 1.65,
142
- "data_residency_batch_output": 8.25
119
+ "input": 3.0,
120
+ "output": 15.0
143
121
  },
144
122
  "gemini/gemini-2.0-flash": {
145
- "input": 0.1,
146
- "output": 0.4,
147
123
  "audio_input": 0.7,
148
- "cache_read_input": 0.025,
124
+ "batch_audio_input": 0.35,
125
+ "batch_cache_read_input": 0.025,
149
126
  "batch_input": 0.05,
150
127
  "batch_output": 0.2,
151
- "batch_audio_input": 0.35,
152
- "batch_cache_read_input": 0.025
128
+ "cache_read_input": 0.025,
129
+ "input": 0.1,
130
+ "output": 0.4
153
131
  },
154
132
  "gemini/gemini-2.0-flash-lite": {
155
- "input": 0.075,
156
- "output": 0.3,
157
133
  "batch_input": 0.0375,
158
- "batch_output": 0.15
134
+ "batch_output": 0.15,
135
+ "input": 0.075,
136
+ "output": 0.3
159
137
  },
160
138
  "gemini/gemini-2.5-flash": {
161
- "input": 0.3,
162
- "output": 2.5,
163
139
  "audio_input": 1.0,
164
- "cache_read_input": 0.03,
165
- "batch_input": 0.15,
166
- "batch_output": 1.25,
167
140
  "batch_audio_input": 0.5,
168
141
  "batch_cache_read_input": 0.03,
169
- "flex_input": 0.15,
170
- "flex_output": 1.25,
142
+ "batch_input": 0.15,
143
+ "batch_output": 1.25,
144
+ "cache_read_input": 0.03,
171
145
  "flex_audio_input": 0.5,
172
146
  "flex_cache_read_input": 0.03,
173
- "priority_input": 0.54,
174
- "priority_output": 4.5,
147
+ "flex_input": 0.15,
148
+ "flex_output": 1.25,
149
+ "input": 0.3,
150
+ "output": 2.5,
175
151
  "priority_audio_input": 1.8,
176
- "priority_cache_read_input": 0.054
152
+ "priority_cache_read_input": 0.054,
153
+ "priority_input": 0.54,
154
+ "priority_output": 4.5
177
155
  },
178
156
  "gemini/gemini-2.5-flash-lite": {
179
- "input": 0.1,
180
- "output": 0.4,
181
157
  "audio_input": 0.3,
182
- "cache_read_input": 0.01,
183
- "batch_input": 0.05,
184
- "batch_output": 0.2,
185
158
  "batch_audio_input": 0.15,
186
159
  "batch_cache_read_input": 0.01,
187
- "flex_input": 0.05,
188
- "flex_output": 0.2,
160
+ "batch_input": 0.05,
161
+ "batch_output": 0.2,
162
+ "cache_read_input": 0.01,
189
163
  "flex_audio_input": 0.15,
190
164
  "flex_cache_read_input": 0.01,
191
- "priority_input": 0.18,
192
- "priority_output": 0.72,
165
+ "flex_input": 0.05,
166
+ "flex_output": 0.2,
167
+ "input": 0.1,
168
+ "output": 0.4,
193
169
  "priority_audio_input": 0.54,
194
- "priority_cache_read_input": 0.018
170
+ "priority_cache_read_input": 0.018,
171
+ "priority_input": 0.18,
172
+ "priority_output": 0.72
195
173
  },
196
174
  "gemini/gemini-2.5-pro": {
197
- "input": 1.25,
198
- "output": 10.0,
199
175
  "_context_price_threshold_tokens": 200000,
200
- "above_context_input": 2.5,
201
- "above_context_output": 15.0,
202
- "cache_read_input": 0.125,
203
- "above_context_cache_read_input": 0.25,
204
- "batch_input": 0.625,
205
- "batch_output": 5.0,
176
+ "above_context_batch_cache_read_input": 0.25,
206
177
  "above_context_batch_input": 1.25,
207
178
  "above_context_batch_output": 7.5,
208
- "batch_cache_read_input": 0.125,
209
- "above_context_batch_cache_read_input": 0.25,
210
- "flex_input": 0.625,
211
- "flex_output": 5.0,
179
+ "above_context_cache_read_input": 0.25,
180
+ "above_context_flex_cache_read_input": 0.25,
212
181
  "above_context_flex_input": 1.25,
213
182
  "above_context_flex_output": 7.5,
214
- "flex_cache_read_input": 0.125,
215
- "above_context_flex_cache_read_input": 0.25,
216
- "priority_input": 2.25,
217
- "priority_output": 18.0,
183
+ "above_context_input": 2.5,
184
+ "above_context_output": 15.0,
185
+ "above_context_priority_cache_read_input": 0.45,
218
186
  "above_context_priority_input": 4.5,
219
187
  "above_context_priority_output": 27.0,
188
+ "batch_cache_read_input": 0.125,
189
+ "batch_input": 0.625,
190
+ "batch_output": 5.0,
191
+ "cache_read_input": 0.125,
192
+ "flex_cache_read_input": 0.125,
193
+ "flex_input": 0.625,
194
+ "flex_output": 5.0,
195
+ "input": 1.25,
196
+ "output": 10.0,
220
197
  "priority_cache_read_input": 0.225,
221
- "above_context_priority_cache_read_input": 0.45
198
+ "priority_input": 2.25,
199
+ "priority_output": 18.0
200
+ },
201
+ "gemini/gemini-3.1-flash-lite": {
202
+ "audio_input": 0.5,
203
+ "batch_audio_input": 0.25,
204
+ "batch_cache_read_input": 0.0125,
205
+ "batch_input": 0.125,
206
+ "batch_output": 0.75,
207
+ "cache_read_input": 0.025,
208
+ "flex_audio_input": 0.25,
209
+ "flex_cache_read_input": 0.0125,
210
+ "flex_input": 0.125,
211
+ "flex_output": 0.75,
212
+ "input": 0.25,
213
+ "output": 1.5,
214
+ "priority_audio_input": 0.9,
215
+ "priority_cache_read_input": 0.045,
216
+ "priority_input": 0.45,
217
+ "priority_output": 2.7
222
218
  },
223
219
  "groq/llama-3.1-8b-instant": {
220
+ "flex_input": 0.05,
221
+ "flex_output": 0.08,
224
222
  "input": 0.05,
225
- "output": 0.08,
226
223
  "on_demand_input": 0.05,
227
224
  "on_demand_output": 0.08,
228
- "flex_input": 0.05,
229
- "flex_output": 0.08
225
+ "output": 0.08
230
226
  },
231
227
  "groq/llama-3.3-70b-versatile": {
228
+ "flex_input": 0.59,
229
+ "flex_output": 0.79,
232
230
  "input": 0.59,
233
- "output": 0.79,
234
231
  "on_demand_input": 0.59,
235
232
  "on_demand_output": 0.79,
236
- "flex_input": 0.59,
237
- "flex_output": 0.79
233
+ "output": 0.79
238
234
  },
239
235
  "groq/openai/gpt-oss-120b": {
240
- "input": 0.15,
241
236
  "cache_read_input": 0.075,
242
- "output": 0.6,
243
- "on_demand_input": 0.15,
237
+ "flex_cache_read_input": 0.075,
238
+ "flex_input": 0.15,
239
+ "flex_output": 0.6,
240
+ "input": 0.15,
244
241
  "on_demand_cache_read_input": 0.075,
242
+ "on_demand_input": 0.15,
245
243
  "on_demand_output": 0.6,
246
- "flex_input": 0.15,
247
- "flex_cache_read_input": 0.075,
248
- "flex_output": 0.6
244
+ "output": 0.6
249
245
  },
250
246
  "groq/openai/gpt-oss-20b": {
251
- "input": 0.075,
252
247
  "cache_read_input": 0.0375,
253
- "output": 0.3,
254
- "on_demand_input": 0.075,
248
+ "flex_cache_read_input": 0.0375,
249
+ "flex_input": 0.075,
250
+ "flex_output": 0.3,
251
+ "input": 0.075,
255
252
  "on_demand_cache_read_input": 0.0375,
253
+ "on_demand_input": 0.075,
256
254
  "on_demand_output": 0.3,
257
- "flex_input": 0.075,
258
- "flex_cache_read_input": 0.0375,
259
- "flex_output": 0.3
255
+ "output": 0.3
256
+ },
257
+ "openai/chatgpt-4o-latest": {
258
+ "input": 5.0,
259
+ "output": 15.0
260
+ },
261
+ "openai/chatgpt-image-latest": {
262
+ "batch_cache_read_input": 0.63,
263
+ "batch_image_input": 4.0,
264
+ "batch_image_output": 16.0,
265
+ "batch_input": 2.5,
266
+ "batch_output": 5.0,
267
+ "cache_read_input": 1.25,
268
+ "image_input": 8.0,
269
+ "image_output": 32.0,
270
+ "input": 5.0,
271
+ "output": 10.0
272
+ },
273
+ "openai/codex-mini-latest": {
274
+ "cache_read_input": 0.375,
275
+ "input": 1.5,
276
+ "output": 6.0
260
277
  },
261
278
  "openai/gpt-3.5-turbo": {
262
279
  "input": 0.5,
263
280
  "output": 1.5
264
281
  },
265
282
  "openai/gpt-4": {
266
- "input": 30.0,
267
- "output": 60.0,
268
283
  "batch_input": 15.0,
269
- "batch_output": 30.0
284
+ "batch_output": 30.0,
285
+ "input": 30.0,
286
+ "output": 60.0
270
287
  },
271
288
  "openai/gpt-4-turbo": {
272
- "input": 10.0,
273
- "output": 30.0,
274
289
  "batch_input": 5.0,
275
- "batch_output": 15.0
290
+ "batch_output": 15.0,
291
+ "input": 10.0,
292
+ "output": 30.0
276
293
  },
277
294
  "openai/gpt-4.1": {
278
- "input": 2.0,
279
- "output": 8.0,
280
- "cache_read_input": 0.5,
281
295
  "batch_input": 1.0,
282
296
  "batch_output": 4.0,
297
+ "cache_read_input": 0.5,
298
+ "input": 2.0,
299
+ "output": 8.0,
300
+ "priority_cache_read_input": 0.875,
283
301
  "priority_input": 3.5,
284
- "priority_output": 14.0,
285
- "priority_cache_read_input": 0.875
302
+ "priority_output": 14.0
286
303
  },
287
304
  "openai/gpt-4.1-mini": {
288
- "input": 0.4,
289
- "output": 1.6,
290
- "cache_read_input": 0.1,
291
305
  "batch_input": 0.2,
292
306
  "batch_output": 0.8,
307
+ "cache_read_input": 0.1,
308
+ "input": 0.4,
309
+ "output": 1.6,
310
+ "priority_cache_read_input": 0.175,
293
311
  "priority_input": 0.7,
294
- "priority_output": 2.8,
295
- "priority_cache_read_input": 0.175
312
+ "priority_output": 2.8
296
313
  },
297
314
  "openai/gpt-4.1-nano": {
298
- "input": 0.1,
299
- "output": 0.4,
300
- "cache_read_input": 0.025,
301
315
  "batch_input": 0.05,
302
316
  "batch_output": 0.2,
317
+ "cache_read_input": 0.025,
318
+ "input": 0.1,
319
+ "output": 0.4,
320
+ "priority_cache_read_input": 0.05,
303
321
  "priority_input": 0.2,
304
- "priority_output": 0.8,
305
- "priority_cache_read_input": 0.05
322
+ "priority_output": 0.8
306
323
  },
307
324
  "openai/gpt-4o": {
308
- "input": 2.5,
309
- "output": 10.0,
310
- "cache_read_input": 1.25,
311
325
  "batch_input": 1.25,
312
326
  "batch_output": 5.0,
327
+ "cache_read_input": 1.25,
328
+ "input": 2.5,
329
+ "output": 10.0,
330
+ "priority_cache_read_input": 2.125,
313
331
  "priority_input": 4.25,
314
- "priority_output": 17.0,
315
- "priority_cache_read_input": 2.125
332
+ "priority_output": 17.0
316
333
  },
317
334
  "openai/gpt-4o-2024-05-13": {
318
- "input": 5.0,
319
- "output": 15.0,
320
335
  "batch_input": 2.5,
321
336
  "batch_output": 7.5,
337
+ "input": 5.0,
338
+ "output": 15.0,
322
339
  "priority_input": 8.75,
323
340
  "priority_output": 26.25
324
341
  },
342
+ "openai/gpt-4o-audio-preview": {
343
+ "audio_input": 40.0,
344
+ "audio_output": 80.0,
345
+ "input": 2.5,
346
+ "output": 10.0
347
+ },
325
348
  "openai/gpt-4o-mini": {
326
- "input": 0.15,
327
- "output": 0.6,
328
- "cache_read_input": 0.075,
329
349
  "batch_input": 0.075,
330
350
  "batch_output": 0.3,
351
+ "cache_read_input": 0.075,
352
+ "input": 0.15,
353
+ "output": 0.6,
354
+ "priority_cache_read_input": 0.125,
331
355
  "priority_input": 0.25,
332
- "priority_output": 1.0,
333
- "priority_cache_read_input": 0.125
334
- },
335
- "openai/gpt-4o-realtime-preview": {
336
- "input": 5.0,
337
- "cache_read_input": 2.5,
338
- "audio_input": 40.0,
339
- "output": 20.0,
340
- "audio_output": 80.0
356
+ "priority_output": 1.0
341
357
  },
342
- "openai/gpt-4o-mini-realtime-preview": {
343
- "input": 0.6,
344
- "cache_read_input": 0.3,
358
+ "openai/gpt-4o-mini-audio-preview": {
345
359
  "audio_input": 10.0,
346
- "output": 2.4,
347
- "audio_output": 20.0
348
- },
349
- "openai/gpt-realtime": {
350
- "input": 4.0,
351
- "cache_read_input": 0.4,
352
- "audio_input": 32.0,
353
- "output": 16.0,
354
- "audio_output": 64.0
355
- },
356
- "openai/gpt-realtime-1.5": {
357
- "input": 4.0,
358
- "cache_read_input": 0.4,
359
- "audio_input": 32.0,
360
- "output": 16.0,
361
- "audio_output": 64.0
360
+ "audio_output": 20.0,
361
+ "input": 0.15,
362
+ "output": 0.6
362
363
  },
363
- "openai/gpt-realtime-mini": {
364
- "input": 0.6,
365
- "cache_read_input": 0.06,
364
+ "openai/gpt-4o-mini-realtime-preview": {
366
365
  "audio_input": 10.0,
367
- "output": 2.4,
368
- "audio_output": 20.0
369
- },
370
- "openai/gpt-audio-1.5": {
371
- "input": 2.5,
372
- "audio_input": 32.0,
373
- "output": 10.0,
374
- "audio_output": 64.0
375
- },
376
- "openai/gpt-audio-mini": {
366
+ "audio_output": 20.0,
367
+ "cache_read_input": 0.3,
377
368
  "input": 0.6,
378
- "audio_input": 10.0,
379
- "output": 2.4,
380
- "audio_output": 20.0
381
- },
382
- "openai/gpt-audio": {
383
- "input": 2.5,
384
- "audio_input": 32.0,
385
- "output": 10.0,
386
- "audio_output": 64.0
387
- },
388
- "openai/gpt-4o-audio-preview": {
389
- "input": 2.5,
390
- "audio_input": 40.0,
391
- "output": 10.0,
392
- "audio_output": 80.0
393
- },
394
- "openai/gpt-4o-mini-audio-preview": {
395
- "input": 0.15,
396
- "audio_input": 10.0,
397
- "output": 0.6,
398
- "audio_output": 20.0
399
- },
400
- "openai/text-embedding-3-small": {
401
- "input": 0.02,
402
- "batch_input": 0.01
403
- },
404
- "openai/text-embedding-3-large": {
405
- "input": 0.13,
406
- "batch_input": 0.065
407
- },
408
- "openai/text-embedding-ada-002": {
409
- "input": 0.10,
410
- "batch_input": 0.05
411
- },
412
- "openai/gpt-4o-transcribe": {
413
- "input": 2.5,
414
- "audio_input": 6.0,
415
- "output": 10.0
369
+ "output": 2.4
416
370
  },
417
371
  "openai/gpt-4o-mini-transcribe": {
418
- "input": 1.25,
419
372
  "audio_input": 3.0,
373
+ "input": 1.25,
420
374
  "output": 5.0
421
375
  },
422
- "openai/tts-1": {
423
- "text_to_speech_character": 15.0
424
- },
425
- "openai/tts-1-hd": {
426
- "text_to_speech_character": 30.0
427
- },
428
- "openai/gpt-image-1": {
429
- "input": 5.0,
430
- "cache_read_input": 1.25,
431
- "image_input": 10.0,
432
- "image_output": 40.0,
433
- "batch_input": 2.5,
434
- "batch_cache_read_input": 0.63,
435
- "batch_image_input": 5.0,
436
- "batch_image_output": 20.0
437
- },
438
- "openai/gpt-image-1-mini": {
439
- "input": 2.0,
440
- "cache_read_input": 0.2,
441
- "image_input": 2.5,
442
- "image_output": 8.0,
443
- "batch_input": 1.0,
444
- "batch_cache_read_input": 0.1,
445
- "batch_image_input": 1.25,
446
- "batch_image_output": 4.0
447
- },
448
- "openai/gpt-image-1.5": {
376
+ "openai/gpt-4o-realtime-preview": {
377
+ "audio_input": 40.0,
378
+ "audio_output": 80.0,
379
+ "cache_read_input": 2.5,
449
380
  "input": 5.0,
450
- "cache_read_input": 1.25,
451
- "output": 10.0,
452
- "image_input": 8.0,
453
- "image_output": 32.0,
454
- "batch_input": 2.5,
455
- "batch_cache_read_input": 0.63,
456
- "batch_output": 5.0,
457
- "batch_image_input": 4.0,
458
- "batch_image_output": 16.0
381
+ "output": 20.0
459
382
  },
460
- "openai/gpt-image-2": {
461
- "input": 5.0,
462
- "cache_read_input": 1.25,
463
- "image_input": 8.0,
464
- "image_output": 30.0,
465
- "batch_input": 2.5,
466
- "batch_cache_read_input": 0.625,
467
- "batch_image_input": 4.0,
468
- "batch_image_output": 15.0
383
+ "openai/gpt-4o-transcribe": {
384
+ "audio_input": 6.0,
385
+ "input": 2.5,
386
+ "output": 10.0
469
387
  },
470
388
  "openai/gpt-5": {
471
- "input": 1.25,
472
- "output": 10.0,
473
- "cache_read_input": 0.125,
389
+ "batch_cache_read_input": 0.0625,
474
390
  "batch_input": 0.625,
475
391
  "batch_output": 5.0,
476
- "batch_cache_read_input": 0.0625,
392
+ "cache_read_input": 0.125,
393
+ "flex_cache_read_input": 0.0625,
477
394
  "flex_input": 0.625,
478
395
  "flex_output": 5.0,
479
- "flex_cache_read_input": 0.0625,
396
+ "input": 1.25,
397
+ "output": 10.0,
398
+ "priority_cache_read_input": 0.25,
480
399
  "priority_input": 2.5,
481
- "priority_output": 20.0,
482
- "priority_cache_read_input": 0.25
400
+ "priority_output": 20.0
483
401
  },
484
402
  "openai/gpt-5-chat-latest": {
403
+ "cache_read_input": 0.125,
485
404
  "input": 1.25,
486
- "output": 10.0,
487
- "cache_read_input": 0.125
405
+ "output": 10.0
488
406
  },
489
407
  "openai/gpt-5-codex": {
408
+ "cache_read_input": 0.125,
490
409
  "input": 1.25,
491
410
  "output": 10.0,
492
- "cache_read_input": 0.125,
411
+ "priority_cache_read_input": 0.25,
493
412
  "priority_input": 2.5,
494
- "priority_output": 20.0,
495
- "priority_cache_read_input": 0.25
413
+ "priority_output": 20.0
496
414
  },
497
415
  "openai/gpt-5-mini": {
498
- "input": 0.25,
499
- "output": 2.0,
500
- "cache_read_input": 0.025,
416
+ "batch_cache_read_input": 0.0125,
501
417
  "batch_input": 0.125,
502
418
  "batch_output": 1.0,
503
- "batch_cache_read_input": 0.0125,
419
+ "cache_read_input": 0.025,
420
+ "flex_cache_read_input": 0.0125,
504
421
  "flex_input": 0.125,
505
422
  "flex_output": 1.0,
506
- "flex_cache_read_input": 0.0125,
423
+ "input": 0.25,
424
+ "output": 2.0,
425
+ "priority_cache_read_input": 0.045,
507
426
  "priority_input": 0.45,
508
- "priority_output": 3.6,
509
- "priority_cache_read_input": 0.045
427
+ "priority_output": 3.6
510
428
  },
511
429
  "openai/gpt-5-nano": {
512
- "input": 0.05,
513
- "output": 0.4,
514
- "cache_read_input": 0.005,
430
+ "batch_cache_read_input": 0.0025,
515
431
  "batch_input": 0.025,
516
432
  "batch_output": 0.2,
517
- "batch_cache_read_input": 0.0025,
433
+ "cache_read_input": 0.005,
434
+ "flex_cache_read_input": 0.0025,
518
435
  "flex_input": 0.025,
519
436
  "flex_output": 0.2,
520
- "flex_cache_read_input": 0.0025
437
+ "input": 0.05,
438
+ "output": 0.4
521
439
  },
522
440
  "openai/gpt-5-pro": {
523
- "input": 15.0,
524
- "output": 120.0,
525
441
  "batch_input": 7.5,
526
- "batch_output": 60.0
442
+ "batch_output": 60.0,
443
+ "input": 15.0,
444
+ "output": 120.0
527
445
  },
528
446
  "openai/gpt-5.1": {
529
- "input": 1.25,
530
- "output": 10.0,
531
- "cache_read_input": 0.125,
447
+ "batch_cache_read_input": 0.0625,
532
448
  "batch_input": 0.625,
533
449
  "batch_output": 5.0,
534
- "batch_cache_read_input": 0.0625,
450
+ "cache_read_input": 0.125,
451
+ "flex_cache_read_input": 0.0625,
535
452
  "flex_input": 0.625,
536
453
  "flex_output": 5.0,
537
- "flex_cache_read_input": 0.0625,
454
+ "input": 1.25,
455
+ "output": 10.0,
456
+ "priority_cache_read_input": 0.25,
538
457
  "priority_input": 2.5,
539
- "priority_output": 20.0,
540
- "priority_cache_read_input": 0.25
458
+ "priority_output": 20.0
541
459
  },
542
460
  "openai/gpt-5.1-chat-latest": {
461
+ "cache_read_input": 0.125,
543
462
  "input": 1.25,
544
- "output": 10.0,
545
- "cache_read_input": 0.125
463
+ "output": 10.0
546
464
  },
547
465
  "openai/gpt-5.1-codex": {
466
+ "cache_read_input": 0.125,
548
467
  "input": 1.25,
549
468
  "output": 10.0,
550
- "cache_read_input": 0.125,
469
+ "priority_cache_read_input": 0.25,
551
470
  "priority_input": 2.5,
552
- "priority_output": 20.0,
553
- "priority_cache_read_input": 0.25
471
+ "priority_output": 20.0
554
472
  },
555
473
  "openai/gpt-5.1-codex-max": {
474
+ "cache_read_input": 0.125,
556
475
  "input": 1.25,
557
476
  "output": 10.0,
558
- "cache_read_input": 0.125,
477
+ "priority_cache_read_input": 0.25,
559
478
  "priority_input": 2.5,
560
- "priority_output": 20.0,
561
- "priority_cache_read_input": 0.25
479
+ "priority_output": 20.0
562
480
  },
563
481
  "openai/gpt-5.1-codex-mini": {
482
+ "cache_read_input": 0.025,
564
483
  "input": 0.25,
565
- "output": 2.0,
566
- "cache_read_input": 0.025
484
+ "output": 2.0
567
485
  },
568
486
  "openai/gpt-5.2": {
569
- "input": 1.75,
570
- "output": 14.0,
571
- "cache_read_input": 0.175,
487
+ "batch_cache_read_input": 0.0875,
572
488
  "batch_input": 0.875,
573
489
  "batch_output": 7.0,
574
- "batch_cache_read_input": 0.0875,
490
+ "cache_read_input": 0.175,
491
+ "flex_cache_read_input": 0.0875,
575
492
  "flex_input": 0.875,
576
493
  "flex_output": 7.0,
577
- "flex_cache_read_input": 0.0875,
494
+ "input": 1.75,
495
+ "output": 14.0,
496
+ "priority_cache_read_input": 0.35,
578
497
  "priority_input": 3.5,
579
- "priority_output": 28.0,
580
- "priority_cache_read_input": 0.35
498
+ "priority_output": 28.0
581
499
  },
582
500
  "openai/gpt-5.2-chat-latest": {
501
+ "cache_read_input": 0.175,
583
502
  "input": 1.75,
584
- "output": 14.0,
585
- "cache_read_input": 0.175
503
+ "output": 14.0
586
504
  },
587
505
  "openai/gpt-5.2-codex": {
506
+ "cache_read_input": 0.175,
588
507
  "input": 1.75,
589
508
  "output": 14.0,
590
- "cache_read_input": 0.175,
509
+ "priority_cache_read_input": 0.35,
591
510
  "priority_input": 3.5,
592
- "priority_output": 28.0,
593
- "priority_cache_read_input": 0.35
511
+ "priority_output": 28.0
594
512
  },
595
513
  "openai/gpt-5.2-pro": {
596
- "input": 21.0,
597
- "output": 168.0,
598
514
  "batch_input": 10.5,
599
- "batch_output": 84.0
515
+ "batch_output": 84.0,
516
+ "input": 21.0,
517
+ "output": 168.0
518
+ },
519
+ "openai/gpt-5.3-chat-latest": {
520
+ "cache_read_input": 0.175,
521
+ "input": 1.75,
522
+ "output": 14.0
523
+ },
524
+ "openai/gpt-5.3-codex": {
525
+ "cache_read_input": 0.175,
526
+ "input": 1.75,
527
+ "output": 14.0,
528
+ "priority_cache_read_input": 0.35,
529
+ "priority_input": 3.5,
530
+ "priority_output": 28.0
600
531
  },
601
532
  "openai/gpt-5.4": {
602
- "input": 2.5,
603
- "output": 15.0,
604
- "cache_read_input": 0.25,
605
- "batch_input": 1.25,
606
- "batch_output": 7.5,
607
- "batch_cache_read_input": 0.13,
608
533
  "_context_price_threshold_tokens": 272000,
609
- "above_context_input": 5.0,
610
- "above_context_output": 22.5,
611
- "above_context_cache_read_input": 0.5,
534
+ "above_context_batch_cache_read_input": 0.25,
535
+ "above_context_batch_data_residency_cache_read_input": 0.275,
536
+ "above_context_batch_data_residency_input": 2.75,
537
+ "above_context_batch_data_residency_output": 12.375,
612
538
  "above_context_batch_input": 2.5,
613
539
  "above_context_batch_output": 11.25,
614
- "above_context_batch_cache_read_input": 0.25,
615
- "flex_input": 1.25,
616
- "flex_output": 7.5,
617
- "flex_cache_read_input": 0.13,
618
- "above_context_flex_input": 2.5,
619
- "above_context_flex_output": 11.25,
540
+ "above_context_cache_read_input": 0.5,
541
+ "above_context_data_residency_cache_read_input": 0.55,
542
+ "above_context_data_residency_input": 5.5,
543
+ "above_context_data_residency_output": 24.75,
620
544
  "above_context_flex_cache_read_input": 0.25,
621
- "priority_input": 5.0,
622
- "priority_output": 30.0,
623
- "priority_cache_read_input": 0.5,
624
- "data_residency_input": 2.75,
625
- "data_residency_output": 16.5,
626
- "data_residency_cache_read_input": 0.275,
627
- "above_context_data_residency_input": 5.5,
628
- "above_context_data_residency_output": 24.75,
629
- "above_context_data_residency_cache_read_input": 0.55,
545
+ "above_context_flex_data_residency_cache_read_input": 0.275,
546
+ "above_context_flex_data_residency_input": 2.75,
547
+ "above_context_flex_data_residency_output": 12.375,
548
+ "above_context_flex_input": 2.5,
549
+ "above_context_flex_output": 11.25,
550
+ "above_context_input": 5.0,
551
+ "above_context_output": 22.5,
552
+ "batch_cache_read_input": 0.13,
553
+ "batch_data_residency_cache_read_input": 0.143,
630
554
  "batch_data_residency_input": 1.375,
631
555
  "batch_data_residency_output": 8.25,
632
- "batch_data_residency_cache_read_input": 0.143,
633
- "above_context_batch_data_residency_input": 2.75,
634
- "above_context_batch_data_residency_output": 12.375,
635
- "above_context_batch_data_residency_cache_read_input": 0.275,
556
+ "batch_input": 1.25,
557
+ "batch_output": 7.5,
558
+ "cache_read_input": 0.25,
559
+ "data_residency_cache_read_input": 0.275,
560
+ "data_residency_input": 2.75,
561
+ "data_residency_output": 16.5,
562
+ "flex_cache_read_input": 0.13,
563
+ "flex_data_residency_cache_read_input": 0.143,
636
564
  "flex_data_residency_input": 1.375,
637
565
  "flex_data_residency_output": 8.25,
638
- "flex_data_residency_cache_read_input": 0.143,
639
- "above_context_flex_data_residency_input": 2.75,
640
- "above_context_flex_data_residency_output": 12.375,
641
- "above_context_flex_data_residency_cache_read_input": 0.275,
566
+ "flex_input": 1.25,
567
+ "flex_output": 7.5,
568
+ "input": 2.5,
569
+ "output": 15.0,
570
+ "priority_cache_read_input": 0.5,
571
+ "priority_data_residency_cache_read_input": 0.55,
642
572
  "priority_data_residency_input": 5.5,
643
573
  "priority_data_residency_output": 33.0,
644
- "priority_data_residency_cache_read_input": 0.55
574
+ "priority_input": 5.0,
575
+ "priority_output": 30.0
645
576
  },
646
577
  "openai/gpt-5.4-mini": {
647
- "input": 0.75,
648
- "output": 4.5,
649
- "cache_read_input": 0.075,
578
+ "batch_cache_read_input": 0.0375,
579
+ "batch_data_residency_cache_read_input": 0.04125,
580
+ "batch_data_residency_input": 0.4125,
581
+ "batch_data_residency_output": 2.475,
650
582
  "batch_input": 0.375,
651
583
  "batch_output": 2.25,
652
- "batch_cache_read_input": 0.0375,
653
- "flex_input": 0.375,
654
- "flex_output": 2.25,
655
- "flex_cache_read_input": 0.0375,
656
- "priority_input": 1.5,
657
- "priority_output": 9.0,
658
- "priority_cache_read_input": 0.15,
584
+ "cache_read_input": 0.075,
585
+ "data_residency_cache_read_input": 0.0825,
659
586
  "data_residency_input": 0.825,
660
587
  "data_residency_output": 4.95,
661
- "data_residency_cache_read_input": 0.0825,
662
- "batch_data_residency_input": 0.4125,
663
- "batch_data_residency_output": 2.475,
664
- "batch_data_residency_cache_read_input": 0.04125,
588
+ "flex_cache_read_input": 0.0375,
589
+ "flex_data_residency_cache_read_input": 0.04125,
665
590
  "flex_data_residency_input": 0.4125,
666
591
  "flex_data_residency_output": 2.475,
667
- "flex_data_residency_cache_read_input": 0.04125,
592
+ "flex_input": 0.375,
593
+ "flex_output": 2.25,
594
+ "input": 0.75,
595
+ "output": 4.5,
596
+ "priority_cache_read_input": 0.15,
597
+ "priority_data_residency_cache_read_input": 0.165,
668
598
  "priority_data_residency_input": 1.65,
669
599
  "priority_data_residency_output": 9.9,
670
- "priority_data_residency_cache_read_input": 0.165
600
+ "priority_input": 1.5,
601
+ "priority_output": 9.0
671
602
  },
672
603
  "openai/gpt-5.4-nano": {
673
- "input": 0.2,
674
- "output": 1.25,
675
- "cache_read_input": 0.02,
604
+ "batch_cache_read_input": 0.01,
605
+ "batch_data_residency_cache_read_input": 0.011,
606
+ "batch_data_residency_input": 0.11,
607
+ "batch_data_residency_output": 0.6875,
676
608
  "batch_input": 0.1,
677
609
  "batch_output": 0.625,
678
- "batch_cache_read_input": 0.01,
679
- "flex_input": 0.1,
680
- "flex_output": 0.625,
681
- "flex_cache_read_input": 0.01,
610
+ "cache_read_input": 0.02,
611
+ "data_residency_cache_read_input": 0.022,
682
612
  "data_residency_input": 0.22,
683
613
  "data_residency_output": 1.375,
684
- "data_residency_cache_read_input": 0.022,
685
- "batch_data_residency_input": 0.11,
686
- "batch_data_residency_output": 0.6875,
687
- "batch_data_residency_cache_read_input": 0.011,
614
+ "flex_cache_read_input": 0.01,
615
+ "flex_data_residency_cache_read_input": 0.011,
688
616
  "flex_data_residency_input": 0.11,
689
617
  "flex_data_residency_output": 0.6875,
690
- "flex_data_residency_cache_read_input": 0.011
618
+ "flex_input": 0.1,
619
+ "flex_output": 0.625,
620
+ "input": 0.2,
621
+ "output": 1.25
691
622
  },
692
623
  "openai/gpt-5.4-pro": {
693
- "input": 30.0,
694
- "output": 180.0,
695
- "batch_input": 15.0,
696
- "batch_output": 90.0,
697
624
  "_context_price_threshold_tokens": 272000,
698
- "above_context_input": 60.0,
699
- "above_context_output": 270.0,
625
+ "above_context_batch_data_residency_input": 33.0,
626
+ "above_context_batch_data_residency_output": 148.5,
700
627
  "above_context_batch_input": 30.0,
701
628
  "above_context_batch_output": 135.0,
702
- "flex_input": 15.0,
703
- "flex_output": 90.0,
704
- "above_context_flex_input": 30.0,
705
- "above_context_flex_output": 135.0,
706
- "data_residency_input": 33.0,
707
- "data_residency_output": 198.0,
708
629
  "above_context_data_residency_input": 66.0,
709
630
  "above_context_data_residency_output": 297.0,
631
+ "above_context_flex_data_residency_input": 33.0,
632
+ "above_context_flex_data_residency_output": 148.5,
633
+ "above_context_flex_input": 30.0,
634
+ "above_context_flex_output": 135.0,
635
+ "above_context_input": 60.0,
636
+ "above_context_output": 270.0,
710
637
  "batch_data_residency_input": 16.5,
711
638
  "batch_data_residency_output": 99.0,
712
- "above_context_batch_data_residency_input": 33.0,
713
- "above_context_batch_data_residency_output": 148.5,
639
+ "batch_input": 15.0,
640
+ "batch_output": 90.0,
641
+ "data_residency_input": 33.0,
642
+ "data_residency_output": 198.0,
714
643
  "flex_data_residency_input": 16.5,
715
644
  "flex_data_residency_output": 99.0,
716
- "above_context_flex_data_residency_input": 33.0,
717
- "above_context_flex_data_residency_output": 148.5
645
+ "flex_input": 15.0,
646
+ "flex_output": 90.0,
647
+ "input": 30.0,
648
+ "output": 180.0
718
649
  },
719
650
  "openai/gpt-5.5": {
720
- "input": 5.0,
721
- "output": 30.0,
722
- "cache_read_input": 0.5,
723
- "batch_input": 2.5,
724
- "batch_output": 15.0,
725
- "batch_cache_read_input": 0.25,
726
651
  "_context_price_threshold_tokens": 272000,
727
- "above_context_input": 10.0,
728
- "above_context_output": 45.0,
729
- "above_context_cache_read_input": 1.0,
652
+ "above_context_batch_cache_read_input": 0.5,
653
+ "above_context_batch_data_residency_cache_read_input": 0.55,
654
+ "above_context_batch_data_residency_input": 5.5,
655
+ "above_context_batch_data_residency_output": 24.75,
730
656
  "above_context_batch_input": 5.0,
731
657
  "above_context_batch_output": 22.5,
732
- "above_context_batch_cache_read_input": 0.5,
733
- "flex_input": 2.5,
734
- "flex_output": 15.0,
735
- "flex_cache_read_input": 0.25,
736
- "above_context_flex_input": 5.0,
737
- "above_context_flex_output": 22.5,
738
- "above_context_flex_cache_read_input": 0.5,
739
- "priority_input": 12.5,
740
- "priority_output": 75.0,
741
- "priority_cache_read_input": 1.25,
742
- "data_residency_input": 5.5,
743
- "data_residency_output": 33.0,
744
- "data_residency_cache_read_input": 0.55,
658
+ "above_context_cache_read_input": 1.0,
659
+ "above_context_data_residency_cache_read_input": 1.1,
745
660
  "above_context_data_residency_input": 11.0,
746
661
  "above_context_data_residency_output": 49.5,
747
- "above_context_data_residency_cache_read_input": 1.1,
662
+ "above_context_flex_cache_read_input": 0.5,
663
+ "above_context_flex_data_residency_cache_read_input": 0.55,
664
+ "above_context_flex_data_residency_input": 5.5,
665
+ "above_context_flex_data_residency_output": 24.75,
666
+ "above_context_flex_input": 5.0,
667
+ "above_context_flex_output": 22.5,
668
+ "above_context_input": 10.0,
669
+ "above_context_output": 45.0,
670
+ "batch_cache_read_input": 0.25,
671
+ "batch_data_residency_cache_read_input": 0.275,
748
672
  "batch_data_residency_input": 2.75,
749
673
  "batch_data_residency_output": 16.5,
750
- "batch_data_residency_cache_read_input": 0.275,
751
- "above_context_batch_data_residency_input": 5.5,
752
- "above_context_batch_data_residency_output": 24.75,
753
- "above_context_batch_data_residency_cache_read_input": 0.55,
674
+ "batch_input": 2.5,
675
+ "batch_output": 15.0,
676
+ "cache_read_input": 0.5,
677
+ "data_residency_cache_read_input": 0.55,
678
+ "data_residency_input": 5.5,
679
+ "data_residency_output": 33.0,
680
+ "flex_cache_read_input": 0.25,
681
+ "flex_data_residency_cache_read_input": 0.275,
754
682
  "flex_data_residency_input": 2.75,
755
683
  "flex_data_residency_output": 16.5,
756
- "flex_data_residency_cache_read_input": 0.275,
757
- "above_context_flex_data_residency_input": 5.5,
758
- "above_context_flex_data_residency_output": 24.75,
759
- "above_context_flex_data_residency_cache_read_input": 0.55,
684
+ "flex_input": 2.5,
685
+ "flex_output": 15.0,
686
+ "input": 5.0,
687
+ "output": 30.0,
688
+ "priority_cache_read_input": 1.25,
689
+ "priority_data_residency_cache_read_input": 1.375,
760
690
  "priority_data_residency_input": 13.75,
761
691
  "priority_data_residency_output": 82.5,
762
- "priority_data_residency_cache_read_input": 1.375
692
+ "priority_input": 12.5,
693
+ "priority_output": 75.0
763
694
  },
764
695
  "openai/gpt-5.5-pro": {
765
- "input": 30.0,
766
- "output": 180.0,
767
- "batch_input": 15.0,
768
- "batch_output": 90.0,
769
696
  "_context_price_threshold_tokens": 272000,
770
- "above_context_input": 60.0,
771
- "above_context_output": 270.0,
772
- "flex_input": 15.0,
773
- "flex_output": 90.0,
774
- "data_residency_input": 33.0,
775
- "data_residency_output": 198.0,
776
697
  "above_context_data_residency_input": 66.0,
777
698
  "above_context_data_residency_output": 297.0,
699
+ "above_context_input": 60.0,
700
+ "above_context_output": 270.0,
778
701
  "batch_data_residency_input": 16.5,
779
702
  "batch_data_residency_output": 99.0,
703
+ "batch_input": 15.0,
704
+ "batch_output": 90.0,
705
+ "data_residency_input": 33.0,
706
+ "data_residency_output": 198.0,
780
707
  "flex_data_residency_input": 16.5,
781
- "flex_data_residency_output": 99.0
708
+ "flex_data_residency_output": 99.0,
709
+ "flex_input": 15.0,
710
+ "flex_output": 90.0,
711
+ "input": 30.0,
712
+ "output": 180.0
713
+ },
714
+ "openai/gpt-audio": {
715
+ "audio_input": 32.0,
716
+ "audio_output": 64.0,
717
+ "input": 2.5,
718
+ "output": 10.0
719
+ },
720
+ "openai/gpt-audio-1.5": {
721
+ "audio_input": 32.0,
722
+ "audio_output": 64.0,
723
+ "input": 2.5,
724
+ "output": 10.0
725
+ },
726
+ "openai/gpt-audio-mini": {
727
+ "audio_input": 10.0,
728
+ "audio_output": 20.0,
729
+ "input": 0.6,
730
+ "output": 2.4
731
+ },
732
+ "openai/gpt-image-1": {
733
+ "batch_cache_read_input": 0.63,
734
+ "batch_image_input": 5.0,
735
+ "batch_image_output": 20.0,
736
+ "batch_input": 2.5,
737
+ "cache_read_input": 1.25,
738
+ "image_input": 10.0,
739
+ "image_output": 40.0,
740
+ "input": 5.0
741
+ },
742
+ "openai/gpt-image-1-mini": {
743
+ "batch_cache_read_input": 0.1,
744
+ "batch_image_input": 1.25,
745
+ "batch_image_output": 4.0,
746
+ "batch_input": 1.0,
747
+ "cache_read_input": 0.2,
748
+ "image_input": 2.5,
749
+ "image_output": 8.0,
750
+ "input": 2.0
751
+ },
752
+ "openai/gpt-image-1.5": {
753
+ "batch_cache_read_input": 0.63,
754
+ "batch_image_input": 4.0,
755
+ "batch_image_output": 16.0,
756
+ "batch_input": 2.5,
757
+ "batch_output": 5.0,
758
+ "cache_read_input": 1.25,
759
+ "image_input": 8.0,
760
+ "image_output": 32.0,
761
+ "input": 5.0,
762
+ "output": 10.0
763
+ },
764
+ "openai/gpt-image-2": {
765
+ "batch_cache_read_input": 0.625,
766
+ "batch_image_input": 4.0,
767
+ "batch_image_output": 15.0,
768
+ "batch_input": 2.5,
769
+ "cache_read_input": 1.25,
770
+ "image_input": 8.0,
771
+ "image_output": 30.0,
772
+ "input": 5.0
773
+ },
774
+ "openai/gpt-realtime": {
775
+ "audio_input": 32.0,
776
+ "audio_output": 64.0,
777
+ "cache_read_input": 0.4,
778
+ "image_input": 5.0,
779
+ "input": 4.0,
780
+ "output": 16.0
781
+ },
782
+ "openai/gpt-realtime-1.5": {
783
+ "audio_input": 32.0,
784
+ "audio_output": 64.0,
785
+ "cache_read_input": 0.4,
786
+ "image_input": 5.0,
787
+ "input": 4.0,
788
+ "output": 16.0
789
+ },
790
+ "openai/gpt-realtime-mini": {
791
+ "audio_input": 10.0,
792
+ "audio_output": 20.0,
793
+ "cache_read_input": 0.06,
794
+ "image_input": 0.8,
795
+ "input": 0.6,
796
+ "output": 2.4
782
797
  },
783
798
  "openai/o1": {
784
- "input": 15.0,
785
- "output": 60.0,
786
- "cache_read_input": 7.5,
787
799
  "batch_input": 7.5,
788
- "batch_output": 30.0
800
+ "batch_output": 30.0,
801
+ "cache_read_input": 7.5,
802
+ "input": 15.0,
803
+ "output": 60.0
789
804
  },
790
805
  "openai/o1-mini": {
791
- "input": 1.1,
792
- "cache_read_input": 0.55,
793
- "output": 4.4,
794
806
  "batch_input": 0.55,
795
- "batch_output": 2.2
807
+ "batch_output": 2.2,
808
+ "cache_read_input": 0.55,
809
+ "input": 1.1,
810
+ "output": 4.4
811
+ },
812
+ "openai/o1-pro": {
813
+ "batch_input": 75.0,
814
+ "batch_output": 300.0,
815
+ "input": 150.0,
816
+ "output": 600.0
796
817
  },
797
818
  "openai/o3": {
798
- "input": 2.0,
799
- "output": 8.0,
800
- "cache_read_input": 0.5,
801
819
  "batch_input": 1.0,
802
820
  "batch_output": 4.0,
821
+ "cache_read_input": 0.5,
822
+ "flex_cache_read_input": 0.25,
803
823
  "flex_input": 1.0,
804
824
  "flex_output": 4.0,
805
- "flex_cache_read_input": 0.25,
825
+ "input": 2.0,
826
+ "output": 8.0,
827
+ "priority_cache_read_input": 0.875,
806
828
  "priority_input": 3.5,
807
- "priority_output": 14.0,
808
- "priority_cache_read_input": 0.875
829
+ "priority_output": 14.0
809
830
  },
810
831
  "openai/o3-mini": {
811
- "input": 1.1,
812
- "output": 4.4,
813
- "cache_read_input": 0.55,
814
832
  "batch_input": 0.55,
815
- "batch_output": 2.2
833
+ "batch_output": 2.2,
834
+ "cache_read_input": 0.55,
835
+ "input": 1.1,
836
+ "output": 4.4
837
+ },
838
+ "openai/o3-pro": {
839
+ "batch_input": 10.0,
840
+ "batch_output": 40.0,
841
+ "input": 20.0,
842
+ "output": 80.0
816
843
  },
817
844
  "openai/o4-mini": {
818
- "input": 1.1,
819
- "output": 4.4,
820
- "cache_read_input": 0.275,
821
845
  "batch_input": 0.55,
822
846
  "batch_output": 2.2,
847
+ "cache_read_input": 0.275,
848
+ "flex_cache_read_input": 0.138,
823
849
  "flex_input": 0.55,
824
850
  "flex_output": 2.2,
825
- "flex_cache_read_input": 0.138,
851
+ "input": 1.1,
852
+ "output": 4.4,
853
+ "priority_cache_read_input": 0.5,
826
854
  "priority_input": 2.0,
827
- "priority_output": 8.0,
828
- "priority_cache_read_input": 0.5
829
- },
830
- "anthropic/claude-haiku-3-5": {
831
- "input": 0.8,
832
- "cache_write_input": 1.0,
833
- "cache_write_extended_input": 1.6,
834
- "cache_read_input": 0.08,
835
- "output": 4.0,
836
- "batch_input": 0.4,
837
- "batch_output": 2.0
838
- },
839
- "anthropic/claude-haiku-3": {
840
- "input": 0.25,
841
- "cache_write_input": 0.3,
842
- "cache_write_extended_input": 0.5,
843
- "cache_read_input": 0.03,
844
- "output": 1.25,
845
- "batch_input": 0.125,
846
- "batch_output": 0.625
855
+ "priority_output": 8.0
847
856
  },
848
- "openai/o1-pro": {
849
- "input": 150.0,
850
- "output": 600.0,
851
- "batch_input": 75.0,
852
- "batch_output": 300.0
853
- },
854
- "openai/o3-pro": {
855
- "input": 20.0,
856
- "output": 80.0,
857
- "batch_input": 10.0,
858
- "batch_output": 40.0
857
+ "openai/text-embedding-3-large": {
858
+ "batch_input": 0.065,
859
+ "input": 0.13
859
860
  },
860
- "openai/gpt-5.3-chat-latest": {
861
- "input": 1.75,
862
- "output": 14.0,
863
- "cache_read_input": 0.175
861
+ "openai/text-embedding-3-small": {
862
+ "batch_input": 0.01,
863
+ "input": 0.02
864
864
  },
865
- "openai/chatgpt-4o-latest": {
866
- "input": 5.0,
867
- "output": 15.0
865
+ "openai/text-embedding-ada-002": {
866
+ "batch_input": 0.05,
867
+ "input": 0.1
868
868
  },
869
- "openai/gpt-5.3-codex": {
870
- "input": 1.75,
871
- "output": 14.0,
872
- "cache_read_input": 0.175,
873
- "priority_input": 3.5,
874
- "priority_output": 28.0,
875
- "priority_cache_read_input": 0.35
869
+ "openai/tts-1": {
870
+ "text_to_speech_character": 15.0
876
871
  },
877
- "openai/codex-mini-latest": {
878
- "input": 1.5,
879
- "output": 6.0,
880
- "cache_read_input": 0.375
872
+ "openai/tts-1-hd": {
873
+ "text_to_speech_character": 30.0
874
+ }
875
+ },
876
+ "service_charges": {
877
+ "anthropic": {
878
+ "code_execution_hour": 0.05,
879
+ "web_fetch_request": 0.0,
880
+ "web_search_request": 10.0
881
881
  },
882
- "gemini/gemini-3.1-flash-lite": {
883
- "input": 0.25,
884
- "output": 1.5,
885
- "audio_input": 0.5,
886
- "cache_read_input": 0.025,
887
- "batch_input": 0.125,
888
- "batch_output": 0.75,
889
- "batch_audio_input": 0.25,
890
- "batch_cache_read_input": 0.0125,
891
- "flex_input": 0.125,
892
- "flex_output": 0.75,
893
- "flex_audio_input": 0.25,
894
- "flex_cache_read_input": 0.0125,
895
- "priority_input": 0.45,
896
- "priority_output": 2.7,
897
- "priority_audio_input": 0.9,
898
- "priority_cache_read_input": 0.045
882
+ "openai": {
883
+ "file_search_call": 2.5,
884
+ "web_search_preview_request_non_reasoning": 25.0,
885
+ "web_search_preview_request_reasoning": 10.0,
886
+ "web_search_request": 10.0
899
887
  }
900
888
  }
901
889
  }