模型定价企业
500+ AI 模型 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 is an artificial intelligence model provided by 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 的竞争性定价,满足不同预算与使用需求,灵活方案确保随需求扩展。
Comet 价格 (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 的集成流程,我们提供逐步指导,助你发挥模型潜能。
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
gpt-4o-mini-2024-07-18
gpt-4o-mini-audio-preview
gpt-4o-mini-realtime-preview
gpt-4o-mini-realtime-preview-2024-12-17
gpt-4o-mini-search-preview
gpt-4o-mini-search-preview-2025-03-11
gpt-4o-mini-transcribe
gpt-4o-mini-audio-preview-2024-12-17
gpt-4o-mini-tts

更多模型

O

O3 Pro

O

O3 Pro

输入:$16/M
输出:$64/M
OpenAI o3‑pro is a “pro” variant of the o3 reasoning model engineered to think longer and deliver the most dependable responses by employing private chain‑of‑thought reinforcement learning and setting new state‑of‑the‑art benchmarks across domains like science, programming, and business—while autonomously integrating tools such as web search, file analysis, Python execution, and visual reasoning within API.
L

Llama-4-Scout

L

Llama-4-Scout

输入:$0.216/M
输出:$1.152/M
Llama-4-Scout is a general-purpose language model for assistant-style interaction and automation. It handles instruction following, reasoning, summarization, and transformation tasks, and can support light code-related assistance. Typical uses include chat orchestration, knowledge-augmented QA, and structured content generation. Technical highlights include compatibility with tool/function calling patterns, retrieval-augmented prompting, and schema-constrained outputs for integration into product workflows.
L

Llama-4-Maverick

L

Llama-4-Maverick

输入:$0.48/M
输出:$1.44/M
Llama-4-Maverick is a general-purpose language model for text understanding and generation. It supports conversational QA, summarization, structured drafting, and basic coding assistance, with options for structured outputs. Common applications include product assistants, knowledge retrieval front-ends, and workflow automation that require consistent formatting. Technical details such as parameter count, context window, modality, and tool or function calling vary by distribution; integrate according to the deployment’s documented capabilities.
M

Kimi-K2

M

Kimi-K2

输入:$0.48/M
输出:$1.92/M
- **kimi-k2-250905**: Moonshot AI's Kimi K2 series 0905 version, supporting ultra-long context (up to 256k tokens, frontend and Tool calls). - 🧠 Enhanced Tool Calling: 100% accuracy, seamless integration, suitable for complex tasks and integration optimization. - ⚡️ More Efficient Performance: TPS up to 60-100 (standard API), up to 600-100 in Turbo mode, providing faster response and improved Inference capabilities, knowledge cutoff up to mid-2025.
O

GPT-4.1 nano

O

GPT-4.1 nano

输入:$0.08/M
输出:$0.32/M
GPT-4.1 nano is an artificial intelligence model provided by OpenAI. gpt-4.1-nano: Features a larger context window—supporting up to 1 million context tokens and capable of better utilizing that context through improved long-context understanding. Has an updated knowledge cutoff time of June 2024. This model supports a maximum context length of 1,047,576 tokens.
O

GPT 4.1 mini

O

GPT 4.1 mini

输入:$0.32/M
输出:$1.28/M
GPT-4.1 mini is an artificial intelligence model provided by OpenAI. gpt-4.1-mini: A significant leap in small model performance, even beating GPT-4o in many benchmarks. It meets or exceeds GPT-4o in intelligence evaluation while reducing latency by nearly half and cost by 83%. This model supports a maximum context length of 1,047,576 tokens.

相关博客

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%。