logo

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

GPT-4o-mini is OpenAI's latest model, launched on July 18, 2024. This model supports both text and image inputs, providing text outputs. It is designed to be highly affordable, costing 15 cents per million input tokens and 60 cents per million output tokens. GPT-4o-mini is over 60% cheaper than its predecessor, GPT-3.5 turbo. It achieves an impressive score of 82% on the MMLU benchmark. This model is especially useful for various applications, making advanced AI accessible to many users. With a context window of 128,000 tokens, it can handle large amounts of text efficiently. GPT-4o-mini represents a significant step forward in AI technology, combining cost-effectiveness with high performance.

import OpenAI from "openai"

const openai = new OpenAI({
  baseURL: "https://api.aiapilab.com/v1",
  apiKey: $AIAPILAB_API_KEY
})

async function main() {
  const completion = await openai.chat.completions.create({
    model: "openai/gpt-4o-mini-2024-07-18",
    messages: [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "What's in this image?"
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
            }
          }
        ]
      }
    ]
  })

  console.log(completion.choices[0].message)
}
main()

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

Context128000
Input$0.15 / M
Output$0.6 / M

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

Let's chat with OpenAI: GPT-4o-mini (2024-07-18) now and verify the model's response effectiveness to your questions.
What can I do for you?

Description

OpenAI released the GPT-4o-mini on July 18, 2024. This model is smaller and cheaper than its predecessor, GPT-4o. It can handle both text and images, providing text outputs. The performance of GPT-4o-mini is impressive, scoring 82% on the MMLU benchmark. This score is better than many other models, including GPT-3.5 turbo. The context window for GPT-4o-mini is large, allowing it to manage up to 128,000 tokens. It can also produce outputs of up to 16,000 tokens. This model shines in tasks like reasoning, math, and coding. It scored 87% on the MGSM math reasoning benchmark, surpassing competitors like Gemini Flash. Moreover, GPT-4o-mini performs well in coding tasks, achieving 87.2% on the HumanEval benchmark. It is efficient in processing large inputs and tasks needing quick responses. The improved tokenizer helps it understand non-English languages, making it useful in many areas. Safety features are strong, as GPT-4o-mini uses a new instruction hierarchy method. This method lowers risks like prompt injections and system manipulations. OpenAI’s focus on safety ensures reliable outputs when dealing with sensitive data. This powerful model is available through APIs, allowing developers to use its features in their apps. Explore the future of AI with the capable GPT-4o-mini model. Using our AIAPILAB services to integrate this model can lead to even better pricing options.

Model API Use Case

The GPT-4o-mini API is a useful tool. It can be used in many areas like customer service, content creation, and data analysis. It costs $0.15 for every million input tokens. This price is over 60% lower than the previous version, making it a smart choice for businesses. Companies can use chatbots for customer support. For instance, a retail company might answer thousands of questions each day, speeding up response times and keeping customers happy. Marketers can also use the API for content creation. It helps in writing articles, social media posts, and product descriptions that are interesting and relevant. Schools can benefit from GPT-4o-mini too. It can provide personalized tutoring and help summarize difficult texts. Its performance is impressive, scoring 82% on MMLU. This shows it understands language and reasoning well. In summary, the GPT-4o-mini API is a strong tool for developers and businesses. It helps them add advanced AI features, boosting productivity and efficiency in many fields.

Model Review

Pros

1. GPT-4o-mini excels in reasoning tasks, scoring 82% on the MMLU benchmark. 2. It handles up to 128,000 tokens, allowing extensive context management. 3. The model shines in math, achieving 87% on the MGSM benchmark. 4. It demonstrates strong coding skills, scoring 87.2% on the HumanEval benchmark. 5. Robust safety features reduce risks of prompt injections and system manipulations.

Cons

1. GPT-4o-mini struggles with complex reasoning tasks, lacking depth in nuanced responses. 2. The model's context window may lead to high token usage, increasing operational costs unexpectedly. 3. Limited multimodal support means it cannot process audio and video inputs at launch, restricting versatility.

Comparison

Feature/AspectGPT-4oGPT-3.5 TurboOpenAI GPT-4o Mini
Release DateMay 13, 2024March 14, 2023July 18, 2024
Context Window128,000 tokens8,192 tokens128,000 tokens
Input ModalitiesText, images, audio, and videoText (limited image handling)Text and images
Output ModalitiesText and visionTextText
MMLU Benchmark ScoreHigher than GPT-469.8%82%

API

import OpenAI from "openai"

const openai = new OpenAI({
  baseURL: "https://api.aiapilab.com/v1",
  apiKey: $AIAPILAB_API_KEY
})

async function main() {
  const completion = await openai.chat.completions.create({
    model: "openai/gpt-4o-mini-2024-07-18",
    messages: [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "What's in this image?"
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
            }
          }
        ]
      }
    ]
  })

  console.log(completion.choices[0].message)
}
main()
from openai import OpenAI

client = OpenAI(
  base_url="https://api.aiapilab.com/v1",
  api_key="$AIAPILAB_API_KEY",
)

completion = client.chat.completions.create(
  model="openai/gpt-4o-mini-2024-07-18",
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What's in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
          }
        }
      ]
    }
  ]
)
print(completion.choices[0].message.content)

FAQ

Q1: What inputs does GPT-4o-mini support? A1: GPT-4o-mini supports text and image inputs, with future audio and video plans. Q2: How does GPT-4o-mini handle context? A2: It manages up to 128,000 tokens for input and 16,000 tokens for output. Q3: What tasks can GPT-4o-mini perform? A3: It excels in reasoning, coding, and multimodal tasks, providing quick responses. Q4: What safety measures are in place for GPT-4o-mini? A4: It employs instruction hierarchy to resist prompt injections and enhance security. Q5: How can developers access GPT-4o-mini? A5: Developers can use GPT-4o-mini via the assistant API and chat completions API.

The Best Growth Choice

for Start Up