模型定價企業
500+ AI 模型 API,全部整合在一個 API 中。就在 CometAPI
模型 API
開發者
快速入門說明文件API 儀表板
公司
關於我們企業
資源
AI模型部落格更新日誌支援
服務條款隱私政策
© 2026 CometAPI · All rights reserved
Home/Models/OpenAI/GPT-4o mini
O

GPT-4o mini

輸入:$0.12/M
輸出:$0.48/M
GPT-4o mini 是由 OpenAI 提供的人工智慧模型。
新
商業用途
概覽
功能
定價
API
版本

Technical Specifications of gpt-4o-mini

AttributeDetails
Model IDgpt-4o-mini
ProviderOpenAI
Model typeArtificial intelligence model
Primary useNatural language understanding and generation
API accessAvailable through CometAPI
Integration styleStandard REST API requests
Input formatText
Output formatText

What is gpt-4o-mini?

gpt-4o-mini is an artificial intelligence model provided by OpenAI. It is designed to process natural language inputs and generate useful text outputs for a wide range of applications, including chat, content generation, summarization, classification, and automation workflows.

Through CometAPI, developers can access gpt-4o-mini using a unified API format, making it easier to integrate the model into applications without managing provider-specific complexity. This helps teams prototype quickly and deploy AI features with a consistent developer experience.

Main features of gpt-4o-mini

  • Natural language processing: Understands and generates human-like text for conversational and task-oriented use cases.
  • Versatile application support: Can be used for summarization, question answering, content drafting, rewriting, and workflow automation.
  • Developer-friendly access: Available through CometAPI with a consistent API interface that simplifies integration.
  • Fast integration workflow: Supports straightforward request and response patterns for rapid development.
  • Scalable deployment: Suitable for embedding into products, internal tools, and automated services.

How to access and integrate gpt-4o-mini

Step 1: Sign Up for API Key

To access gpt-4o-mini, first register on the CometAPI platform and generate your API key from the dashboard. This key is required to authenticate all API requests and should be stored securely in your application environment.

Step 2: Send Requests to gpt-4o-mini API

After obtaining your API key, send a POST request to the CometAPI chat completions endpoint and specify gpt-4o-mini as the model.

curl https://api.cometapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_COMETAPI_KEY" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {
        "role": "user",
        "content": "Write a short introduction to AI."
      }
    ]
  }'

Step 3: Retrieve and Verify Results

Once the request is processed, the API returns a structured response containing the model output. You can parse the returned content, validate it against your application requirements, and then display or store the result as needed.

GPT-4o mini 的功能

探索 GPT-4o mini 的核心功能,專為提升效能和可用性而設計。了解這些功能如何為您的專案帶來效益並改善使用者體驗。

GPT-4o mini 的定價

探索 GPT-4o mini 的競爭性定價,專為滿足各種預算和使用需求而設計。我們靈活的方案確保您只需為實際使用量付費,讓您能夠隨著需求增長輕鬆擴展。了解 GPT-4o mini 如何在保持成本可控的同時提升您的專案效果。
彗星價格 (USD / M Tokens)官方價格 (USD / M Tokens)折扣
輸入:$0.12/M
輸出:$0.48/M
輸入:$0.15/M
輸出:$0.6/M
-20%

GPT-4o mini 的範例程式碼和 API

存取完整的範例程式碼和 API 資源,以簡化您的 GPT-4o mini 整合流程。我們詳盡的文件提供逐步指引,協助您在專案中充分發揮 GPT-4o mini 的潛力。
Python
JavaScript
Curl
from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)
response = client.responses.create(
    model="gpt-4o-mini", input="Tell me a three sentence bedtime story about a unicorn."
)

print(response)

Python Code Example

from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)
response = client.responses.create(
    model="gpt-4o-mini", input="Tell me a three sentence bedtime story about a unicorn."
)

print(response)

JavaScript Code Example

import OpenAI from "openai";

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const api_key = process.env.COMETAPI_KEY;
const base_url = "https://api.cometapi.com/v1";

const openai = new OpenAI({
  apiKey: api_key,
  baseURL: base_url,
});

const response = await openai.responses.create({
  model: "gpt-4o-mini",
  input: "Tell me a three sentence bedtime story about a unicorn.",
});

console.log(response);

Curl Code Example

curl https://api.cometapi.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -d '{
    "model": "gpt-4o-mini",
    "input": "Tell me a three sentence bedtime story about a unicorn."
  }'

GPT-4o mini的版本

GPT-4o mini擁有多個快照的原因可能包括:更新後輸出結果存在差異需保留舊版快照以確保一致性、為開發者提供適應與遷移的過渡期,以及不同快照對應全球或區域端點以優化使用者體驗等潛在因素。各版本間的具體差異請參閱官方文件說明。
version
gpt-4o-mini-search-preview-2025-03-11
gpt-4o-mini-tts
gpt-4o-mini-2024-07-18
gpt-4o-mini-audio-preview
gpt-4o-mini-search-preview
gpt-4o-mini-transcribe
gpt-4o-mini
gpt-4o-mini-audio-preview-2024-12-17
gpt-4o-mini-realtime-preview
gpt-4o-mini-realtime-preview-2024-12-17

更多模型

O

O3 Pro

O

O3 Pro

輸入:$16/M
輸出:$64/M
OpenAI o3‑pro 是 o3 推理模型的「pro」變體,經過工程化設計,以進行更長程的思考並輸出最可靠的回應,藉由採用私有思維鏈強化學習,並在科學、程式設計與商業等領域樹立全新的最先進基準——同時可在 API 中自主整合如網路搜尋、檔案分析、Python 執行與視覺推理等工具。
L

Llama-4-Scout

L

Llama-4-Scout

輸入:$0.216/M
輸出:$1.152/M
Llama-4-Scout 是一款用於助理式互動與自動化的通用型語言模型。它能處理遵循指令、推理、摘要與轉換等任務,並可支援輕量的程式碼相關協助。典型用例包括對話編排、知識增強的 QA,以及結構化內容生成。技術亮點包括與工具/函式呼叫模式的相容性、檢索增強的提示,以及受模式約束的輸出,便於整合至產品工作流程。
L

Llama-4-Maverick

L

Llama-4-Maverick

輸入:$0.48/M
輸出:$1.44/M
Llama-4-Maverick 是一款用於文字理解與生成的通用型語言模型。它支援對話式問答、摘要、結構化撰寫與基礎程式碼協助,並提供結構化輸出選項。常見應用包括產品助理、知識檢索前端,以及需要一致格式的工作流程自動化。參數量、上下文視窗、模態以及工具或函式呼叫等技術細節會因發行版本而異;請依部署的文件所載能力進行整合。
M

Kimi-K2

M

Kimi-K2

輸入:$0.48/M
輸出:$1.92/M
- **kimi-k2-250905**: Moonshot AI 的 Kimi K2 系列 0905 版本,支援超長上下文 (最多 256k tokens, 前端與工具呼叫)。 - 🧠 增強的工具呼叫:100% 準確率,無縫整合,適用於複雜任務與整合優化。 - ⚡️ 更高效的效能:TPS 可達 60-100 (標準 API),在 Turbo 模式下可達 600-100,提供更快的回應與更強的推理能力,知識截止時間可至 2025 年年中。
O

GPT-4.1 nano

O

GPT-4.1 nano

輸入:$0.08/M
輸出:$0.32/M
GPT-4.1 nano 是由 OpenAI 提供的人工智慧模型。 gpt-4.1-nano: 具備更大的上下文視窗—支援最多 1 million 個上下文 token,並能透過改進的長上下文理解更好地利用該上下文。 知識截止時間更新為 2024 年 6 月。 此模型支援的最大上下文長度為 1,047,576 個 token。
O

GPT 4.1 mini

O

GPT 4.1 mini

輸入:$0.32/M
輸出:$1.28/M
GPT-4.1 mini 是由 OpenAI 提供的人工智慧模型。gpt-4.1-mini:在小型模型效能上實現重大躍進,在許多基準測試中甚至超越 GPT-4o。它在智慧評估上達到或超越 GPT-4o,同時將延遲降低近一半,成本降低 83%。此模型支援的最大上下文長度為 1,047,576 個 token。

相關部落格

ChatGPT 能進行文字轉語音嗎?2026 年最新語音與 TTS 模型指南
Apr 2, 2026

ChatGPT 能進行文字轉語音嗎?2026 年最新語音與 TTS 模型指南

ChatGPT 可以進行文字轉語音,但答案取決於你所指的內容。在 ChatGPT 應用程式中,Voice 讓 ChatGPT 能夠朗讀,並且最近已更新,可更好地遵循指令並更有效地使用像網路搜尋這樣的工具。對於開發者,OpenAI 也透過 audio/speech 端點提供專用的文字轉語音 API,模型包括 gpt-4o-mini-tts、tts-1 和 tts-1-hd。OpenAI 表示,其最新的 TTS 快照相較於前一代,在 Common Voice 和 FLEURS 上的詞錯誤率約降低 35%。