models.php
882 lines
| 1 | <?php |
| 2 | |
| 3 | // Price as of June 2024: https://openai.com/api/pricing/ |
| 4 | |
| 5 | define( 'MWAI_OPENAI_MODELS', [ |
| 6 | /* |
| 7 | GPT-5 |
| 8 | The best model for coding and agentic tasks across domains |
| 9 | https://platform.openai.com/docs/models/gpt-5 |
| 10 | */ |
| 11 | [ |
| 12 | 'model' => 'gpt-5', |
| 13 | 'name' => 'GPT-5', |
| 14 | 'family' => 'gpt-5', |
| 15 | 'features' => ['completion'], |
| 16 | 'price' => [ |
| 17 | 'in' => 1.25, |
| 18 | 'out' => 10.00, |
| 19 | ], |
| 20 | 'type' => 'token', |
| 21 | 'unit' => 1 / 1000000, |
| 22 | 'maxCompletionTokens' => 128000, |
| 23 | 'maxContextualTokens' => 400000, |
| 24 | 'finetune' => false, |
| 25 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'], |
| 26 | 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'], |
| 27 | 'params' => [ |
| 28 | 'reasoning' => ['minimal', 'low', 'medium', 'high'], |
| 29 | 'verbosity' => ['low', 'medium', 'high'] |
| 30 | ] |
| 31 | ], |
| 32 | /* |
| 33 | GPT-5 Mini |
| 34 | Efficient and cost-effective GPT-5 variant |
| 35 | https://platform.openai.com/docs/models/gpt-5-mini |
| 36 | */ |
| 37 | [ |
| 38 | 'model' => 'gpt-5-mini', |
| 39 | 'name' => 'GPT-5 Mini', |
| 40 | 'family' => 'gpt-5', |
| 41 | 'features' => ['completion'], |
| 42 | 'price' => [ |
| 43 | 'in' => 0.25, |
| 44 | 'out' => 2.00, |
| 45 | ], |
| 46 | 'type' => 'token', |
| 47 | 'unit' => 1 / 1000000, |
| 48 | 'maxCompletionTokens' => 128000, |
| 49 | 'maxContextualTokens' => 400000, |
| 50 | 'finetune' => false, |
| 51 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'], |
| 52 | 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'], |
| 53 | 'params' => [ |
| 54 | 'reasoning' => ['minimal', 'low', 'medium', 'high'], |
| 55 | 'verbosity' => ['low', 'medium', 'high'] |
| 56 | ] |
| 57 | ], |
| 58 | /* |
| 59 | GPT-5 Nano |
| 60 | Ultra-fast and lightweight GPT-5 model |
| 61 | https://platform.openai.com/docs/models/gpt-5-nano |
| 62 | */ |
| 63 | [ |
| 64 | 'model' => 'gpt-5-nano', |
| 65 | 'name' => 'GPT-5 Nano', |
| 66 | 'family' => 'gpt-5', |
| 67 | 'features' => ['completion'], |
| 68 | 'price' => [ |
| 69 | 'in' => 0.05, |
| 70 | 'out' => 0.40, |
| 71 | ], |
| 72 | 'type' => 'token', |
| 73 | 'unit' => 1 / 1000000, |
| 74 | 'maxCompletionTokens' => 128000, |
| 75 | 'maxContextualTokens' => 400000, |
| 76 | 'finetune' => false, |
| 77 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'], |
| 78 | 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'], |
| 79 | 'params' => [ |
| 80 | 'reasoning' => ['minimal', 'low', 'medium', 'high'], |
| 81 | 'verbosity' => ['low', 'medium', 'high'] |
| 82 | ] |
| 83 | ], |
| 84 | /* |
| 85 | GPT-5 Chat |
| 86 | GPT-5 model used in ChatGPT |
| 87 | https://platform.openai.com/docs/models/gpt-5 |
| 88 | */ |
| 89 | [ |
| 90 | 'model' => 'gpt-5-chat-latest', |
| 91 | 'name' => 'GPT-5 Chat', |
| 92 | 'family' => 'gpt-5', |
| 93 | 'features' => ['completion'], |
| 94 | 'price' => [ |
| 95 | 'in' => 1.25, |
| 96 | 'out' => 10.00, |
| 97 | ], |
| 98 | 'type' => 'token', |
| 99 | 'unit' => 1 / 1000000, |
| 100 | 'maxCompletionTokens' => 16384, |
| 101 | 'maxContextualTokens' => 128000, |
| 102 | 'finetune' => false, |
| 103 | 'tags' => ['core', 'chat', 'vision', 'responses', 'mcp'], |
| 104 | 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'], |
| 105 | 'params' => [ |
| 106 | 'verbosity' => ['low', 'medium', 'high'] |
| 107 | ] |
| 108 | ], |
| 109 | /* |
| 110 | GPT 4.1 |
| 111 | Flagship GPT model for complex tasks |
| 112 | https://platform.openai.com/docs/models/gpt-4.1 |
| 113 | */ |
| 114 | [ |
| 115 | 'model' => 'gpt-4.1', |
| 116 | 'name' => 'GPT-4.1', |
| 117 | 'family' => 'gpt-4', |
| 118 | 'features' => ['completion'], |
| 119 | 'price' => [ |
| 120 | 'in' => 2.00, |
| 121 | 'out' => 8.00, |
| 122 | ], |
| 123 | 'type' => 'token', |
| 124 | 'unit' => 1 / 1000000, |
| 125 | 'maxCompletionTokens' => 32768, |
| 126 | 'maxContextualTokens' => 1047576, |
| 127 | 'finetune' => false, |
| 128 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp'], |
| 129 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 130 | ], |
| 131 | /* |
| 132 | GPT-4.1 mini |
| 133 | Balanced for intelligence, speed, and cost |
| 134 | https://platform.openai.com/docs/models/gpt-4.1-mini |
| 135 | */ |
| 136 | [ |
| 137 | 'model' => 'gpt-4.1-mini', |
| 138 | 'name' => 'GPT-4.1 Mini', |
| 139 | 'family' => 'gpt-4', |
| 140 | 'features' => ['completion'], |
| 141 | 'price' => [ |
| 142 | 'in' => 0.40, |
| 143 | 'out' => 1.60, |
| 144 | ], |
| 145 | 'type' => 'token', |
| 146 | 'unit' => 1 / 1000000, |
| 147 | 'maxCompletionTokens' => 32768, |
| 148 | 'maxContextualTokens' => 1047576, |
| 149 | 'finetune' => false, |
| 150 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp'], |
| 151 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 152 | ], |
| 153 | /* |
| 154 | GPT-4.1 nano |
| 155 | Fastest, most cost-effective GPT-4.1 model |
| 156 | https://platform.openai.com/docs/models/gpt-4.1-nano |
| 157 | */ |
| 158 | [ |
| 159 | 'model' => 'gpt-4.1-nano', |
| 160 | 'name' => 'GPT-4.1 Nano', |
| 161 | 'family' => 'gpt-4', |
| 162 | 'features' => ['completion'], |
| 163 | 'price' => [ |
| 164 | 'in' => 0.10, |
| 165 | 'out' => 0.40, |
| 166 | ], |
| 167 | 'type' => 'token', |
| 168 | 'unit' => 1 / 1000000, |
| 169 | 'maxCompletionTokens' => 32768, |
| 170 | 'maxContextualTokens' => 1047576, |
| 171 | 'finetune' => false, |
| 172 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp'], |
| 173 | 'tools' => ['image_generation'] |
| 174 | ], |
| 175 | /* |
| 176 | GPT-4o |
| 177 | Fast, intelligent, flexible GPT model |
| 178 | https://platform.openai.com/docs/models/gpt-4o |
| 179 | */ |
| 180 | [ |
| 181 | 'model' => 'gpt-4o', |
| 182 | 'name' => 'GPT-4o', |
| 183 | 'family' => 'gpt-4', |
| 184 | 'features' => ['completion'], |
| 185 | 'price' => [ |
| 186 | 'in' => 2.50, |
| 187 | 'out' => 10.00, |
| 188 | ], |
| 189 | 'type' => 'token', |
| 190 | 'unit' => 1 / 1000000, |
| 191 | 'maxCompletionTokens' => 16384, |
| 192 | 'maxContextualTokens' => 128000, |
| 193 | 'finetune' => false, |
| 194 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'mcp', 'responses'], |
| 195 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 196 | ], |
| 197 | /* |
| 198 | GPT-4o mini |
| 199 | Fast, affordable small model for focused tasks |
| 200 | https://platform.openai.com/docs/models/gpt-4o-mini |
| 201 | */ |
| 202 | [ |
| 203 | 'model' => 'gpt-4o-mini', |
| 204 | 'name' => 'GPT-4o Mini', |
| 205 | 'family' => 'gpt-4', |
| 206 | 'features' => ['completion'], |
| 207 | 'price' => [ |
| 208 | 'in' => 0.15, |
| 209 | 'out' => 0.60, |
| 210 | ], |
| 211 | 'type' => 'token', |
| 212 | 'unit' => 1 / 1000000, |
| 213 | 'maxCompletionTokens' => 16384, |
| 214 | 'maxContextualTokens' => 128000, |
| 215 | 'finetune' => [ |
| 216 | 'in' => 0.15, |
| 217 | 'out' => 0.60, |
| 218 | 'train' => 3.00 |
| 219 | ], |
| 220 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'mcp', 'responses'], |
| 221 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 222 | ], |
| 223 | /* |
| 224 | o1 |
| 225 | High-intelligence reasoning mode |
| 226 | https://platform.openai.com/docs/models/o1 |
| 227 | */ |
| 228 | [ |
| 229 | 'model' => 'o1', |
| 230 | 'name' => 'o1', |
| 231 | 'family' => 'o1', |
| 232 | 'features' => ['completion'], |
| 233 | 'price' => [ |
| 234 | 'in' => 15.00, |
| 235 | 'out' => 60.00, |
| 236 | ], |
| 237 | 'type' => 'token', |
| 238 | 'unit' => 1 / 1000000, |
| 239 | 'maxCompletionTokens' => 100000, |
| 240 | 'maxContextualTokens' => 200000, |
| 241 | 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'mcp'] |
| 242 | ], |
| 243 | [ |
| 244 | 'model' => 'o1-mini', |
| 245 | 'name' => 'o1 Mini', |
| 246 | 'family' => 'o1', |
| 247 | 'features' => ['completion'], |
| 248 | 'price' => [ |
| 249 | 'in' => 1.10, |
| 250 | 'out' => 4.40, |
| 251 | ], |
| 252 | 'type' => 'token', |
| 253 | 'unit' => 1 / 1000000, |
| 254 | 'maxCompletionTokens' => 65536, |
| 255 | 'maxContextualTokens' => 128000, |
| 256 | 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'mcp'] |
| 257 | ], |
| 258 | /* |
| 259 | o3 |
| 260 | Advanced reasoning model |
| 261 | https://platform.openai.com/docs/models/o3 |
| 262 | */ |
| 263 | [ |
| 264 | 'model' => 'o3', |
| 265 | 'name' => 'o3', |
| 266 | 'family' => 'o3', |
| 267 | 'features' => ['completion'], |
| 268 | 'price' => [ |
| 269 | 'in' => 15.00, |
| 270 | 'out' => 60.00, |
| 271 | ], |
| 272 | 'type' => 'token', |
| 273 | 'unit' => 1 / 1000000, |
| 274 | 'maxCompletionTokens' => 100000, |
| 275 | 'maxContextualTokens' => 200000, |
| 276 | 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'responses', 'mcp'], |
| 277 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 278 | ], |
| 279 | /* |
| 280 | o3-mini |
| 281 | Fast, flexible, intelligent reasoning model |
| 282 | https://platform.openai.com/docs/models/o3-mini |
| 283 | */ |
| 284 | [ |
| 285 | 'model' => 'o3-mini', |
| 286 | 'name' => 'o3 Mini', |
| 287 | 'family' => 'o3', |
| 288 | 'features' => ['completion'], |
| 289 | 'price' => [ |
| 290 | 'in' => 1.10, |
| 291 | 'out' => 4.40, |
| 292 | ], |
| 293 | 'type' => 'token', |
| 294 | 'unit' => 1 / 1000000, |
| 295 | 'maxCompletionTokens' => 100000, |
| 296 | 'maxContextualTokens' => 200000, |
| 297 | 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'responses', 'mcp'], |
| 298 | 'tools' => ['web_search', 'image_generation', 'code_interpreter'] |
| 299 | ], |
| 300 | /* |
| 301 | GPT-4o Realtime |
| 302 | Model capable of realtime text and audio inputs and outputs |
| 303 | https://platform.openai.com/docs/models/gpt-4o-realtime-preview |
| 304 | */ |
| 305 | [ |
| 306 | 'model' => 'gpt-4o-realtime-preview', |
| 307 | 'name' => 'GPT-4o Realtime (Preview)', |
| 308 | 'family' => 'realtime', |
| 309 | 'features' => ['core', 'realtime', 'functions'], |
| 310 | 'price' => [ |
| 311 | 'text' => [ |
| 312 | 'in' => 5.00, |
| 313 | 'cache' => 2.50, |
| 314 | 'out' => 20.00, |
| 315 | ], |
| 316 | 'audio' => [ |
| 317 | 'in' => 100.00, |
| 318 | 'cache' => 20.00, |
| 319 | 'out' => 200.00, |
| 320 | ] |
| 321 | ], |
| 322 | 'type' => 'token', |
| 323 | 'unit' => 1 / 1000000, |
| 324 | 'maxCompletionTokens' => 4096, |
| 325 | 'maxContextualTokens' => 128000, |
| 326 | 'finetune' => false, |
| 327 | 'tags' => ['core', 'realtime', 'functions'] |
| 328 | ], |
| 329 | /* |
| 330 | GPT-4o mini Realtime |
| 331 | Smaller realtime model for text and audio inputs and outputs |
| 332 | https://platform.openai.com/docs/models/gpt-4o-mini-realtime-preview |
| 333 | */ |
| 334 | [ |
| 335 | 'model' => 'gpt-4o-mini-realtime-preview', |
| 336 | 'name' => 'GPT-4o Mini Realtime (Preview)', |
| 337 | 'family' => 'realtime', |
| 338 | 'features' => ['core', 'realtime', 'functions'], |
| 339 | 'price' => [ |
| 340 | 'text' => [ |
| 341 | 'in' => 0.60, |
| 342 | 'cache' => 0.30, |
| 343 | 'out' => 2.40, |
| 344 | ], |
| 345 | 'audio' => [ |
| 346 | 'in' => 10.00, |
| 347 | 'cache' => 0.30, |
| 348 | 'out' => 20.00, |
| 349 | ] |
| 350 | ], |
| 351 | 'type' => 'token', |
| 352 | 'unit' => 1 / 1000000, |
| 353 | 'maxCompletionTokens' => 4096, |
| 354 | 'maxContextualTokens' => 128000, |
| 355 | 'finetune' => false, |
| 356 | 'tags' => ['core', 'realtime', 'functions'] |
| 357 | ], |
| 358 | /* |
| 359 | GPT-4 |
| 360 | An older high-intelligence GPT model |
| 361 | https://platform.openai.com/docs/models/gpt-4 |
| 362 | */ |
| 363 | [ |
| 364 | 'model' => 'gpt-4', |
| 365 | 'name' => 'GPT-4', |
| 366 | 'family' => 'gpt-4', |
| 367 | 'features' => ['completion'], |
| 368 | 'price' => [ |
| 369 | 'in' => 30.00, |
| 370 | 'out' => 60.00, |
| 371 | ], |
| 372 | 'type' => 'token', |
| 373 | 'unit' => 1 / 1000000, |
| 374 | 'maxCompletionTokens' => 8192, |
| 375 | 'maxContextualTokens' => 8192, |
| 376 | 'finetune' => false, |
| 377 | 'tags' => ['core', 'chat', 'functions'] |
| 378 | ], |
| 379 | /* |
| 380 | GPT-4 Turbo |
| 381 | An older high-intelligence GPT model |
| 382 | https://platform.openai.com/docs/models/gpt-4-turbo |
| 383 | */ |
| 384 | [ |
| 385 | 'model' => 'gpt-4-turbo', |
| 386 | 'name' => 'GPT-4 Turbo', |
| 387 | 'family' => 'gpt-4', |
| 388 | 'features' => ['completion'], |
| 389 | 'price' => [ |
| 390 | 'in' => 10.00, |
| 391 | 'out' => 30.00, |
| 392 | ], |
| 393 | 'type' => 'token', |
| 394 | 'unit' => 1 / 1000000, |
| 395 | 'maxCompletionTokens' => 4096, |
| 396 | 'maxContextualTokens' => 128000, |
| 397 | 'finetune' => false, |
| 398 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json'] |
| 399 | ], |
| 400 | /* |
| 401 | GPT-3.5 Turbo |
| 402 | Legacy GPT model for cheaper chat and non-chat tasks |
| 403 | https://platform.openai.com/docs/models/gpt-3.5-turbo |
| 404 | */ |
| 405 | [ |
| 406 | 'model' => 'gpt-3.5-turbo', |
| 407 | 'name' => 'GPT-3.5 Turbo', |
| 408 | 'family' => 'gpt-3', |
| 409 | 'features' => ['completion'], |
| 410 | 'price' => [ |
| 411 | 'in' => 0.50, |
| 412 | 'out' => 1.50, |
| 413 | ], |
| 414 | 'type' => 'token', |
| 415 | 'unit' => 1 / 1000000, |
| 416 | 'maxCompletionTokens' => 4096, |
| 417 | 'maxContextualTokens' => 16385, |
| 418 | 'finetune' => [ |
| 419 | 'in' => 3.00, |
| 420 | 'out' => 6.00, |
| 421 | 'train' => 8.00 |
| 422 | ], |
| 423 | 'tags' => ['core', 'chat', '4k', 'finetune', 'functions'] |
| 424 | ], |
| 425 | /* |
| 426 | DALL·E 3 |
| 427 | Our latest image generation model |
| 428 | https://platform.openai.com/docs/models/dall-e-3 |
| 429 | */ |
| 430 | [ |
| 431 | 'model' => 'gpt-image-1', |
| 432 | 'name' => 'GPT Image 1 (High)', |
| 433 | 'family' => 'gpt-image', |
| 434 | 'features' => ['text-to-image'], |
| 435 | 'resolutions' => [ |
| 436 | [ |
| 437 | 'name' => '1024x1024', |
| 438 | 'label' => '1024x1024', |
| 439 | 'price' => 0.167 |
| 440 | ], |
| 441 | [ |
| 442 | 'name' => '1024x1536', |
| 443 | 'label' => '1024x1536', |
| 444 | 'price' => 0.25 |
| 445 | ], |
| 446 | [ |
| 447 | 'name' => '1536x1024', |
| 448 | 'label' => '1536x1024', |
| 449 | 'price' => 0.25 |
| 450 | ] |
| 451 | ], |
| 452 | 'type' => 'image', |
| 453 | 'unit' => 1, |
| 454 | 'finetune' => false, |
| 455 | 'tags' => ['core', 'image', 'image-edit', 'responses'] |
| 456 | ], |
| 457 | [ |
| 458 | 'model' => 'dall-e-3', |
| 459 | 'name' => 'DALL-E 3', |
| 460 | 'family' => 'dall-e', |
| 461 | 'features' => ['text-to-image'], |
| 462 | 'resolutions' => [ |
| 463 | [ |
| 464 | 'name' => '1024x1024', |
| 465 | 'label' => '1024x1024', |
| 466 | 'price' => 0.040 |
| 467 | ], |
| 468 | [ |
| 469 | 'name' => '1024x1792', |
| 470 | 'label' => '1024x1792', |
| 471 | 'price' => 0.080 |
| 472 | ], |
| 473 | [ |
| 474 | 'name' => '1792x1024', |
| 475 | 'label' => '1792x1024', |
| 476 | 'price' => 0.080 |
| 477 | ] |
| 478 | ], |
| 479 | 'type' => 'image', |
| 480 | 'unit' => 1, |
| 481 | 'finetune' => false, |
| 482 | 'tags' => ['core', 'image'] |
| 483 | ], |
| 484 | [ |
| 485 | 'model' => 'dall-e-3-hd', |
| 486 | 'name' => 'DALL-E 3 (HD)', |
| 487 | 'family' => 'dall-e', |
| 488 | 'features' => ['text-to-image'], |
| 489 | 'resolutions' => [ |
| 490 | [ |
| 491 | 'name' => '1024x1024', |
| 492 | 'label' => '1024x1024', |
| 493 | 'price' => 0.080 |
| 494 | ], |
| 495 | [ |
| 496 | 'name' => '1024x1792', |
| 497 | 'label' => '1024x1792', |
| 498 | 'price' => 0.120 |
| 499 | ], |
| 500 | [ |
| 501 | 'name' => '1792x1024', |
| 502 | 'label' => '1792x1024', |
| 503 | 'price' => 0.120 |
| 504 | ] |
| 505 | ], |
| 506 | 'type' => 'image', |
| 507 | 'unit' => 1, |
| 508 | 'finetune' => false, |
| 509 | 'tags' => ['core', 'image'] |
| 510 | ], |
| 511 | // Embedding models: |
| 512 | [ |
| 513 | 'model' => 'text-embedding-3-small', |
| 514 | 'name' => 'Embedding 3-Small', |
| 515 | 'family' => 'text-embedding', |
| 516 | 'features' => ['embedding'], |
| 517 | 'price' => 0.02, |
| 518 | 'type' => 'token', |
| 519 | 'unit' => 1 / 1000000, |
| 520 | 'finetune' => false, |
| 521 | 'dimensions' => [ 512, 1536 ], |
| 522 | 'tags' => ['core', 'embedding'], |
| 523 | ], |
| 524 | [ |
| 525 | 'model' => 'text-embedding-3-large', |
| 526 | 'name' => 'Embedding 3-Large', |
| 527 | 'family' => 'text-embedding', |
| 528 | 'features' => ['embedding'], |
| 529 | 'price' => 0.13, |
| 530 | 'type' => 'token', |
| 531 | 'unit' => 1 / 1000000, |
| 532 | 'finetune' => false, |
| 533 | 'dimensions' => [ 256, 1024, 3072 ], |
| 534 | 'tags' => ['core', 'embedding'], |
| 535 | ], |
| 536 | [ |
| 537 | 'model' => 'text-embedding-ada-002', |
| 538 | 'name' => 'Embedding Ada-002', |
| 539 | 'family' => 'text-embedding', |
| 540 | 'features' => ['embedding'], |
| 541 | 'price' => 0.10, |
| 542 | 'type' => 'token', |
| 543 | 'unit' => 1 / 1000000, |
| 544 | 'finetune' => false, |
| 545 | 'dimensions' => [ 1536 ], |
| 546 | 'tags' => ['core', 'embedding'], |
| 547 | ], |
| 548 | // Audio Models: |
| 549 | [ |
| 550 | 'model' => 'gpt-4o-transcribe', |
| 551 | 'name' => 'GPT-4o Transcribe', |
| 552 | 'family' => 'whisper', |
| 553 | 'features' => ['speech-to-text'], |
| 554 | 'price' => 0.006, |
| 555 | 'type' => 'second', |
| 556 | 'unit' => 1, |
| 557 | 'finetune' => false, |
| 558 | 'tags' => ['core', 'audio'], |
| 559 | ], |
| 560 | [ |
| 561 | 'model' => 'gpt-4o-mini-transcribe', |
| 562 | 'name' => 'GPT-4o Mini Transcribe', |
| 563 | 'family' => 'whisper', |
| 564 | 'features' => ['speech-to-text'], |
| 565 | 'price' => 0.003, |
| 566 | 'type' => 'second', |
| 567 | 'unit' => 1, |
| 568 | 'finetune' => false, |
| 569 | 'tags' => ['core', 'audio'], |
| 570 | ], |
| 571 | [ |
| 572 | 'model' => 'whisper-1', |
| 573 | 'name' => 'Whisper', |
| 574 | 'family' => 'whisper', |
| 575 | 'features' => ['speech-to-text'], |
| 576 | 'price' => 0.006, |
| 577 | 'type' => 'second', |
| 578 | 'unit' => 1, |
| 579 | 'finetune' => false, |
| 580 | 'tags' => ['core', 'audio'], |
| 581 | ], |
| 582 | /* |
| 583 | Depecated Models |
| 584 | */ |
| 585 | [ |
| 586 | 'model' => 'gpt-4.5-preview', |
| 587 | 'name' => 'GPT-4.5 (Preview)', |
| 588 | 'family' => 'gpt4.5', |
| 589 | 'features' => ['completion'], |
| 590 | 'price' => [ |
| 591 | 'in' => 75.00, |
| 592 | 'out' => 150.00, |
| 593 | ], |
| 594 | 'type' => 'token', |
| 595 | 'unit' => 1 / 1000000, |
| 596 | 'maxCompletionTokens' => 16384, |
| 597 | 'maxContextualTokens' => 128000, |
| 598 | 'finetune' => false, |
| 599 | 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'deprecated'] |
| 600 | ], |
| 601 | [ |
| 602 | 'model' => 'dall-e', |
| 603 | 'name' => 'DALL-E 2', |
| 604 | 'family' => 'dall-e', |
| 605 | 'features' => ['text-to-image'], |
| 606 | 'resolutions' => [ |
| 607 | [ |
| 608 | 'name' => '256x256', |
| 609 | 'label' => '256x256', |
| 610 | 'price' => 0.016 |
| 611 | ], |
| 612 | [ |
| 613 | 'name' => '512x512', |
| 614 | 'label' => '512x512', |
| 615 | 'price' => 0.018 |
| 616 | ], |
| 617 | [ |
| 618 | 'name' => '1024x1024', |
| 619 | 'label' => '1024x1024', |
| 620 | 'price' => 0.020 |
| 621 | ] |
| 622 | ], |
| 623 | 'type' => 'image', |
| 624 | 'unit' => 1, |
| 625 | 'finetune' => false, |
| 626 | 'tags' => ['core', 'image', 'deprecated'] |
| 627 | ], |
| 628 | // [ |
| 629 | // "model" => "gpt-3.5-turbo-16k", |
| 630 | // "description" => "Offers 4 times the context length of gpt-3.5-turbo at twice the price.", |
| 631 | // "name" => "GPT-3.5 Turbo 16k", |
| 632 | // "family" => "turbo", |
| 633 | // "features" => ['completion'], |
| 634 | // "price" => [ |
| 635 | // "in" => 30.00, |
| 636 | // "out" => 40.0, |
| 637 | // ], |
| 638 | // "type" => "token", |
| 639 | // "unit" => 1 / 1000000, |
| 640 | // "maxTokens" => 16385, |
| 641 | // "finetune" => false, |
| 642 | // "tags" => ['core', 'chat', '16k'] |
| 643 | // ], |
| 644 | // [ |
| 645 | // "model" => "gpt-3.5-turbo-instruct", |
| 646 | // "name" => "GPT-3.5 Turbo Instruct", |
| 647 | // "family" => "turbo-instruct", |
| 648 | // "features" => ['completion'], |
| 649 | // "price" => [ |
| 650 | // "in" => 0.50, |
| 651 | // "out" => 2.00, |
| 652 | // ], |
| 653 | // "type" => "token", |
| 654 | // "unit" => 1 / 1000000, |
| 655 | // "finetune" => [ |
| 656 | // "in" => 0.03, |
| 657 | // "out" => 0.06, |
| 658 | // ], |
| 659 | // "maxTokens" => 4096, |
| 660 | // "tags" => ['core', 'chat', '4k'] |
| 661 | // ], |
| 662 | ] ); |
| 663 | |
| 664 | define( 'MWAI_ANTHROPIC_MODELS', [ |
| 665 | [ |
| 666 | 'model' => 'claude-opus-4-20250514', |
| 667 | 'name' => 'Claude-4 Opus (2025/05/14)', |
| 668 | 'family' => 'claude-4', |
| 669 | 'features' => ['completion'], |
| 670 | 'price' => [ |
| 671 | 'in' => 15.00, |
| 672 | 'out' => 75.00, |
| 673 | ], |
| 674 | 'type' => 'token', |
| 675 | 'unit' => 1 / 1000000, |
| 676 | 'maxCompletionTokens' => 32000, |
| 677 | 'maxContextualTokens' => 200000, |
| 678 | 'finetune' => false, |
| 679 | 'tags' => ['core', 'chat', 'vision', 'functions', 'reasoning', 'mcp'] |
| 680 | ], |
| 681 | [ |
| 682 | 'model' => 'claude-sonnet-4-20250514', |
| 683 | 'name' => 'Claude-4 Sonnet (2025/05/14)', |
| 684 | 'family' => 'claude-4', |
| 685 | 'features' => ['completion'], |
| 686 | 'price' => [ |
| 687 | 'in' => 3.00, |
| 688 | 'out' => 15.00, |
| 689 | ], |
| 690 | 'type' => 'token', |
| 691 | 'unit' => 1 / 1000000, |
| 692 | 'maxCompletionTokens' => 64000, |
| 693 | 'maxContextualTokens' => 200000, |
| 694 | 'finetune' => false, |
| 695 | 'tags' => ['core', 'chat', 'vision', 'functions', 'reasoning', 'mcp'] |
| 696 | ], |
| 697 | [ |
| 698 | 'model' => 'claude-3-7-sonnet-latest', |
| 699 | 'name' => 'Claude-3.7 Sonnet', |
| 700 | 'family' => 'claude-3', |
| 701 | 'features' => ['completion'], |
| 702 | 'price' => [ |
| 703 | 'in' => 3.00, |
| 704 | 'out' => 15.00, |
| 705 | ], |
| 706 | 'type' => 'token', |
| 707 | 'unit' => 1 / 1000000, |
| 708 | 'maxCompletionTokens' => 64000, |
| 709 | 'maxContextualTokens' => 200000, |
| 710 | 'finetune' => false, |
| 711 | 'tags' => ['core', 'chat', 'vision', 'functions', 'reasoning', 'mcp'] |
| 712 | ], |
| 713 | [ |
| 714 | 'model' => 'claude-3-5-sonnet-latest', |
| 715 | 'name' => 'Claude-3.5 Sonnet', |
| 716 | 'family' => 'claude-3', |
| 717 | 'features' => ['completion'], |
| 718 | 'price' => [ |
| 719 | 'in' => 3.00, |
| 720 | 'out' => 15.00, |
| 721 | ], |
| 722 | 'type' => 'token', |
| 723 | 'unit' => 1 / 1000000, |
| 724 | 'maxCompletionTokens' => 4096, |
| 725 | 'maxContextualTokens' => 200000, |
| 726 | 'finetune' => false, |
| 727 | 'tags' => ['core', 'chat', 'vision', 'functions', 'mcp'] |
| 728 | ], |
| 729 | [ |
| 730 | 'model' => 'claude-3-5-sonnet-20241022', |
| 731 | 'name' => 'Claude-3.5 Sonnet (2024/10/22)', |
| 732 | 'family' => 'claude-3', |
| 733 | 'features' => ['completion'], |
| 734 | 'price' => [ |
| 735 | 'in' => 3.00, |
| 736 | 'out' => 15.00, |
| 737 | ], |
| 738 | 'type' => 'token', |
| 739 | 'unit' => 1 / 1000000, |
| 740 | 'maxCompletionTokens' => 4096, |
| 741 | 'maxContextualTokens' => 200000, |
| 742 | 'finetune' => false, |
| 743 | 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'mcp'] |
| 744 | ], |
| 745 | [ |
| 746 | 'model' => 'claude-3-5-sonnet-20240620', |
| 747 | 'name' => 'Claude-3.5 Sonnet (2024/06/20)', |
| 748 | 'family' => 'claude-3', |
| 749 | 'features' => ['completion'], |
| 750 | 'price' => [ |
| 751 | 'in' => 3.00, |
| 752 | 'out' => 15.00, |
| 753 | ], |
| 754 | 'type' => 'token', |
| 755 | 'unit' => 1 / 1000000, |
| 756 | 'maxCompletionTokens' => 4096, |
| 757 | 'maxContextualTokens' => 200000, |
| 758 | 'finetune' => false, |
| 759 | 'tags' => ['core', 'chat', 'vision', 'functions', 'mcp'] |
| 760 | ], |
| 761 | [ |
| 762 | 'model' => 'claude-3-sonnet-20240229', |
| 763 | 'name' => 'Claude-3 Sonnet (2024/02/29)', |
| 764 | 'family' => 'claude-3', |
| 765 | 'features' => ['completion'], |
| 766 | 'price' => [ |
| 767 | 'in' => 3.00, |
| 768 | 'out' => 15.00, |
| 769 | ], |
| 770 | 'type' => 'token', |
| 771 | 'unit' => 1 / 1000000, |
| 772 | 'maxCompletionTokens' => 4096, |
| 773 | 'maxContextualTokens' => 200000, |
| 774 | 'finetune' => false, |
| 775 | 'tags' => ['core', 'chat', 'vision', 'functions', 'deprecated'] |
| 776 | ], |
| 777 | [ |
| 778 | 'model' => 'claude-3-opus-latest', |
| 779 | 'name' => 'Claude-3 Opus (Latest)', |
| 780 | 'family' => 'claude-3', |
| 781 | 'features' => ['completion'], |
| 782 | 'price' => [ |
| 783 | 'in' => 15.00, |
| 784 | 'out' => 75.00, |
| 785 | ], |
| 786 | 'type' => 'token', |
| 787 | 'unit' => 1 / 1000000, |
| 788 | 'maxCompletionTokens' => 4096, |
| 789 | 'maxContextualTokens' => 200000, |
| 790 | 'finetune' => false, |
| 791 | 'tags' => ['core', 'chat', 'vision', 'functions'] |
| 792 | ], |
| 793 | [ |
| 794 | // TODO: Starting January 5, 2026 at 9AM PT, Anthropic is retiring and will no longer support Claude Opus 3 (claude-3-opus-20240229) on the API. |
| 795 | 'model' => 'claude-3-opus-20240229', |
| 796 | 'name' => 'Claude-3 Opus (2024/02/29)', |
| 797 | 'family' => 'claude-3', |
| 798 | 'features' => ['completion'], |
| 799 | 'price' => [ |
| 800 | 'in' => 15.00, |
| 801 | 'out' => 75.00, |
| 802 | ], |
| 803 | 'type' => 'token', |
| 804 | 'unit' => 1 / 1000000, |
| 805 | 'maxCompletionTokens' => 4096, |
| 806 | 'maxContextualTokens' => 200000, |
| 807 | 'finetune' => false, |
| 808 | 'tags' => ['core', 'chat', 'vision', 'functions'] |
| 809 | ], |
| 810 | [ |
| 811 | 'model' => 'claude-3-5-haiku-20241022', |
| 812 | 'name' => 'Claude-3.5 Haiku (2024/10/22)', |
| 813 | 'family' => 'claude-3', |
| 814 | 'features' => ['completion'], |
| 815 | 'price' => [ |
| 816 | 'in' => 1.00, |
| 817 | 'out' => 5.00, |
| 818 | ], |
| 819 | 'type' => 'token', |
| 820 | 'unit' => 1 / 1000000, |
| 821 | 'maxCompletionTokens' => 8192, |
| 822 | 'maxContextualTokens' => 200000, |
| 823 | 'finetune' => false, |
| 824 | 'tags' => ['core', 'chat'] |
| 825 | ], |
| 826 | [ |
| 827 | 'model' => 'claude-3-haiku-20240307', |
| 828 | 'name' => 'Claude-3 Haiku (2024/03/07)', |
| 829 | 'family' => 'claude-3', |
| 830 | 'features' => ['completion'], |
| 831 | 'price' => [ |
| 832 | 'in' => 0.25, |
| 833 | 'out' => 1.25, |
| 834 | ], |
| 835 | 'type' => 'token', |
| 836 | 'unit' => 1 / 1000000, |
| 837 | 'maxCompletionTokens' => 4096, |
| 838 | 'maxContextualTokens' => 200000, |
| 839 | 'finetune' => false, |
| 840 | 'tags' => ['core', 'chat', 'vision', 'functions'] |
| 841 | ] |
| 842 | ] ); |
| 843 | |
| 844 | define( 'MWAI_PERPLEXITY_MODELS', [ |
| 845 | [ |
| 846 | 'model' => 'sonar-pro', |
| 847 | 'name' => 'Sonar Pro', |
| 848 | 'family' => 'sonar', |
| 849 | 'features' => ['completion'], |
| 850 | 'price' => [ |
| 851 | 'in' => 3.00, |
| 852 | 'out' => 15.00, |
| 853 | 'search' => 5.00, |
| 854 | ], |
| 855 | 'type' => 'token', |
| 856 | 'unit' => 1 / 1000000, |
| 857 | 'searchUnit' => 1 / 1000, |
| 858 | 'maxCompletionTokens' => 8192, |
| 859 | 'maxContextualTokens' => 200000, |
| 860 | 'finetune' => false, |
| 861 | 'tags' => ['core', 'chat'], |
| 862 | ], |
| 863 | [ |
| 864 | 'model' => 'sonar', |
| 865 | 'name' => 'Sonar', |
| 866 | 'family' => 'sonar', |
| 867 | 'features' => ['completion'], |
| 868 | 'price' => [ |
| 869 | 'in' => 1.00, |
| 870 | 'out' => 1.00, |
| 871 | 'search' => 5.00, |
| 872 | ], |
| 873 | 'type' => 'token', |
| 874 | 'unit' => 1 / 1000000, |
| 875 | 'searchUnit' => 1 / 1000, |
| 876 | 'maxCompletionTokens' => 4096, |
| 877 | 'maxContextualTokens' => 127000, |
| 878 | 'finetune' => false, |
| 879 | 'tags' => ['core', 'chat'], |
| 880 | ], |
| 881 | ] ); |
| 882 |