-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathx_ai.yml
More file actions
326 lines (309 loc) · 9.77 KB
/
Copy pathx_ai.yml
File metadata and controls
326 lines (309 loc) · 9.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# yaml-language-server: $schema=.schema.json
name: X AI
id: x-ai
pricing_urls:
- https://docs.x.ai/docs/models
api_pattern: 'https://api\.x\.ai'
model_match:
contains: grok
provider_match:
equals: xai
extractors:
# xAI native SDK format (xai-sdk) — protobuf SamplingUsage fields
# https://github.com/xai-org/xai-sdk-python/blob/main/src/xai_sdk/proto/v6/usage_pb2.pyi
# xAI reports completion and reasoning as separate output counts, while both are billed at the output rate.
# https://docs.x.ai/developers/tools/tool-usage-details#understanding-token-usage
- api_flavor: default
root: usage
mappings:
- path: prompt_tokens
dest: input_tokens
- path: cached_prompt_text_tokens
dest: cache_read_tokens
required: false
- path: reasoning_tokens
dest: output_tokens
required: false
- path: reasoning_tokens
dest: output_reasoning_tokens
required: false
- path: completion_tokens
dest: output_tokens
# OpenAI-compatible chat completions format
- api_flavor: chat
root: usage
mappings:
- path: prompt_tokens
dest: input_tokens
- path: [prompt_tokens_details, cached_tokens]
dest: cache_read_tokens
required: false
- path: [completion_tokens_details, audio_tokens]
dest: output_audio_tokens
required: false
- path: [completion_tokens_details, reasoning_tokens]
dest: output_tokens
required: false
- path: [completion_tokens_details, reasoning_tokens]
dest: output_reasoning_tokens
required: false
- path: completion_tokens
dest: output_tokens
models:
- id: grok-2-1212
name: Grok 2 1212
description: >-
(deprecated) Grok 2 1212 introduces significant enhancements to accuracy, instruction adherence, and multilingual support,
making
it a powerful and flexible choice for developers seeking a highly steerable, intelligent model.
match:
or:
- equals: grok-2-1212
- equals: grok-2
- equals: grok-2-latest
context_window: 32768
deprecated: true
prices_checked: 2025-07-12
prices:
input_mtok: 2
output_mtok: 10
- id: grok-2-vision-1212
name: Grok 2 Vision 1212
description: Our multimodal model that processes documents, diagrams, charts, screenshots, and photographs.
match:
or:
- equals: grok-2-vision-1212
- equals: grok-2-vision
- equals: grok-2-vision-latest
context_window: 32768
prices_checked: 2025-07-12
prices:
input_mtok: 2
output_mtok: 10
- id: grok-3
name: Grok 3
description: >-
Flagship model that excels at enterprise use cases like data extraction,
coding, and text summarization. Possesses deep domain knowledge in finance, healthcare, law, and science.
match:
or:
- equals: grok-3
- equals: grok-3-latest
- equals: grok-3-beta
context_window: 131072
prices_checked: 2025-07-12
prices:
input_mtok: 3
cache_read_mtok: 0.75
output_mtok: 15
- id: grok-3-fast
name: Grok 3 Fast
description: >-
Excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge
in finance, healthcare, law, and science.
match:
or:
- equals: grok-3-fast
- equals: grok-3-fast-latest
- equals: grok-3-fast-beta
context_window: 131072
prices_checked: 2025-07-12
prices:
input_mtok: 5
cache_read_mtok: 1.25
output_mtok: 25
- id: grok-3-mini
name: Grok 3 Mini
description: >-
A lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require
deep domain knowledge. The raw thinking traces are accessible.
match:
or:
- equals: grok-3-mini
- equals: grok-3-mini-beta
- equals: grok-3-mini-latest
context_window: 131072
prices_checked: 2025-07-12
prices:
input_mtok: 0.3
cache_read_mtok: 0.075
output_mtok: 0.5
- id: grok-3-mini-fast
name: Grok 3 Mini Fast
description: >-
A lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require
deep domain knowledge. The raw thinking traces are accessible.
match:
or:
- equals: grok-3-mini-fast
- equals: grok-3-mini-fast-beta
- equals: grok-3-mini-fast-latest
context_window: 131072
prices_checked: 2025-07-12
prices:
input_mtok: 0.6
cache_read_mtok: 0.15
output_mtok: 4
- id: grok-4-0709
name: Grok 4
description: >-
A flagship model, offering unparalleled performance in natural language, math and reasoning - the perfect jack of all
trades.
match:
or:
- equals: grok-4-0709
- equals: grok-4
- equals: grok-4-latest
context_window: 256000
prices_checked: 2025-07-12
prices:
input_mtok: 3
cache_read_mtok: 0.75
output_mtok: 15
- id: grok-4-1-fast-non-reasoning
name: Grok 4.1 Fast Non-Reasoning
description: >-
A frontier multimodal model optimized specifically for high-performance agentic tool calling.
match:
or:
- equals: grok-4-1-fast-non-reasoning
- equals: grok-4-1-fast-non-reasoning-latest
context_window: 2000000
prices_checked: 2026-01-19
prices:
input_mtok: 0.2
cache_read_mtok: 0.05
output_mtok: 0.5
- id: grok-4-1-fast-reasoning
name: Grok 4.1 Fast Reasoning
description: >-
A frontier multimodal model optimized specifically for high-performance agentic tool calling.
match:
or:
- equals: grok-4-1-fast
- equals: grok-4-1-fast-reasoning
- equals: grok-4-1-fast-reasoning-latest
context_window: 2000000
prices_checked: 2026-01-19
prices:
input_mtok: 0.2
cache_read_mtok: 0.05
output_mtok: 0.5
- id: grok-4-fast-non-reasoning
name: Grok 4 Fast Non-Reasoning
description: >-
A frontier multimodal model optimized specifically for high-performance agentic tool calling.
match:
or:
- equals: grok-4-fast-non-reasoning
- equals: grok-4-fast-non-reasoning-latest
context_window: 2000000
prices_checked: 2026-01-19
prices:
input_mtok: 0.2
cache_read_mtok: 0.05
output_mtok: 0.5
- id: grok-4-fast-reasoning
name: Grok 4 Fast Reasoning
description: >-
A frontier multimodal model optimized specifically for high-performance agentic tool calling.
match:
or:
- equals: grok-4-fast
- equals: grok-4-fast-reasoning
- equals: grok-4-fast-reasoning-latest
context_window: 2000000
prices_checked: 2026-01-19
prices:
input_mtok: 0.2
cache_read_mtok: 0.05
output_mtok: 0.5
- id: grok-4.20
name: Grok 4.20
description: >-
Grok 4.20 is a reasoning model from xAI with industry-leading speed and agentic tool calling capabilities. It combines
low hallucination rates with strict prompt adherence.
match:
equals: grok-4.20
prices_checked: 2026-06-09
prices:
input_mtok: 1.25
cache_read_mtok: 0.2
output_mtok: 2.5
- id: grok-4.20-multi-agent
name: Grok 4.20 Multi-Agent
description: >-
Grok 4.20 Multi-Agent is a variant of xAI's Grok 4.20 designed for collaborative, agent-based workflows. Multiple agents
operate in parallel to conduct deep research, coordinate tool use, and synthesize information.
match:
equals: grok-4.20-multi-agent
prices_checked: 2026-06-09
prices:
input_mtok: 2
cache_read_mtok: 0.2
output_mtok: 6
- id: grok-4.3
name: Grok 4.3
description: >-
Most advanced flagship model, leading the industry in non-hallucination rate, agentic tool calling,
and instruction following capabilities. Supports text and image inputs with text outputs, function
calling, structured outputs, and reasoning.
match:
or:
- equals: grok-4.3
- regex: ^grok-4\.3-\d{8}$
- equals: x-ai/grok-4.3
- regex: ^x-ai/grok-4\.3-\d{8}$
- equals: grok-4.3-latest
context_window: 1000000
prices_checked: 2026-05-12
prices:
input_mtok: 1.25
cache_read_mtok: 0.2
output_mtok: 2.5
- id: grok-4.5
name: Grok 4.5
description: >-
xAI's most intelligent and fastest flagship model, well-suited for general-purpose use including coding and chat.
Supports text and image inputs with text outputs, function calling, structured outputs, and reasoning.
match:
or:
- equals: grok-4.5
- regex: ^grok-4\.5-\d{8}$
- equals: x-ai/grok-4.5
- regex: ^x-ai/grok-4\.5-\d{8}$
- equals: grok-4.5-latest
- equals: grok-latest
context_window: 500000
prices_checked: 2026-07-08
prices:
input_mtok: 2
cache_read_mtok: 0.5
output_mtok: 6
- id: grok-build-0.1
name: Grok Build 0.1
description: >-
Grok Build 0.1 is xAI's fast coding model trained specifically for agentic software engineering workflows. It supports
text and image inputs with text output, and is optimized for interactive coding.
match:
equals: grok-build-0.1
prices_checked: 2026-06-09
prices:
input_mtok: 1
cache_read_mtok: 0.2
output_mtok: 2
- id: grok-code-fast-1
name: Grok Code Fast 1
description: >-
A speedy and economical reasoning model that excels at agentic coding.
match:
or:
- equals: grok-code-fast
- equals: grok-code-fast-1
- equals: grok-code-fast-1-0825
context_window: 256000
prices_checked: 2026-01-19
prices:
input_mtok: 0.2
cache_read_mtok: 0.02
output_mtok: 1.5