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