openaiVision

OpenAI: GPT-4o-mini (2024-07-18)

GPT-4o mini is OpenAI's newest model after [GPT-4 Omni](/models/openai/gpt-4o), supporting both text and image inputs with text outputs. As their most advanced small model, it is many multiples more affordable...

Context
128k tokens
Input / 1M tokens
$0.15
Output / 1M tokens
$0.60
Benchmark

Pricing

Input tokens$0.15 per 1M tokens
Output tokens$0.60 per 1M tokens
Cache read$0.07 per 1M tokens

Technical details

Model IDopenai/gpt-4o-mini-2024-07-18
Context window128k tokens
Input modalitiestext, image, file, pdf
Output modalitiestext
TokenizerGPT
Max output tokens16,384

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'openai/gpt-4o-mini-2024-07-18',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use OpenAI: GPT-4o-mini (2024-07-18)?

Get an API key and start making requests in minutes.

Get an API key