OhMyGPT API
中文
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
中文
  • 中文
  • English
  • 日本語
中文
  • 中文
  • English
  • 日本語
  1. 其它
  • 本站介绍
  • 更新日志
  • 推广计划奖励使用说明
  • OpenAI
    • Responses
      • 创建 model response
      • 获取 model response
      • 删除 model response
      • 取消响应
      • 列出 input items
    • Conversations
      • 创建 conversation
      • 检索 conversation
      • 更新 conversation
      • 删除 conversation
      • 创建 items
      • 列出 items
      • 检索 item
      • 删除 item
    • Chat.Completions API
      POST
    • TTS文本转语音
      POST
    • Embeddings
      POST
    • 图像生成
      POST
    • 图像编辑
      POST
  • Claude
    • batches
      • 创建消息批次
      • 检索消息批次
      • 检索消息批次结果
      • 列出消息批次
      • 取消消息批次
      • 删除消息批次
    • Claude Code专用接口
      • Claude Code专用接口 (Messages原生API)
      • Claude Code API (Chat.Completions 兼容API)
    • Anthropic 原生 Completions 企业商用 API
      POST
    • Anthropic 原生 Messages API
      POST
    • Anthropic 原生 Messages Token Count API
      POST
  • 图像生成
    • 其它
      • ND图像生成 API
    • Flux
      • Flux Schnell 图像生成
      • Flux Dev 图像生成
      • Flux Pro 图像生成
      • Flux Pro 1.1 图像生成
      • Flux 1.1 Pro Ultura 图像生成
  • 覆写规则
    • 创建规则
      POST
    • 更新规则
      POST
    • 删除规则
      POST
    • 获取规则
      POST
    • 列出规则
      POST
    • 批量启用/禁用
      POST
    • 复制规则
      POST
    • 测试规则
      POST
    • 获取统计信息
      POST
    • 获取限制配置
      POST
    • 检查规则名
      POST
    • 批量删除
      POST
    • 导出规则
      POST
    • 导入规则
      POST
  • Store
    • 列出聊天完成项
    • 获取聊天完成
    • 删除聊天完成
  • OAuth
    • 开放OAuth API介绍
    • 用户授权页
    • Code展示页
    • 申请access_token
    • 读取用户基本信息
    • 读取用户余额信息
    • 收取用户费用
    • 为用户创建一个Stripe Checkout充值订单
    • 为用户创建一个Stripe Invoice充值订单
    • 调用其它开放API
    • 通过OAuth Token读取用户管理Token
    • 通过OAuth Token更新用户管理Token
  • 存储服务
    • 文件存储服务
    • 文件上传
    • 文件信息更新
    • 删除文件
    • 用户查询 (分页)
    • 用户元数据查询 (by fileUinqueIds)
    • 文件下载接口(Public公开文件下载)
    • 文件下载接口(Private私有文件下载)
    • 公开文件元数据获取
  • API KEY 管理
    • 创建新的API Key
    • 修改API Key信息
    • 查询用户所有的API Key
    • 删除指定API Key
    • 查询用户会员到期日期接口
    • 用户余额查询接口
    • 查询当前模型倍率接口
  • 其它
    • 搜索
      • Google Custom Search API
      • Google Search By Serper
    • Azure
      • Azure 文本转语音
      • Azure 获取TTS 语音列表
    • [Beta] OhMyGPT Socket.IO 统一API端点
    • Gemini 3 Pro Image Preview API
      POST
  • 归档文档
    • 自助开票系统使用文档
    • Telegram Bot使用文档
    • 自建Cloudflare Worker反代教程
    • Claude Code转发服务
    • CodeX转发服务
    • 新版网站介绍
  • 模型列表
    GET
  • 数据模型
    • Chat
      • ChatSession
      • ChatMessage
      • ChatGPTParams
      • UserPrompts
      • OnlinePrompts
    • User
      • User
      • UserLog
      • UserToken-D
    • Pay
      • UserOrder
      • UserBill
    • System
      • OpenAIKey
      • SystemOpenAIKey
      • Settings
      • SmtpSettings
      • MailDto
    • Draw
      • AIImages
      • MjImagineQueryResult
    • InteralDataModelDefine
    • Schemas
      • Scope
      • ApiType
      • RuleCondition
      • ActionType
      • RuleAction
      • ParameterOverrideRule
      • CreateRuleRequest
      • CreateRuleResponse
      • UpdateRuleRequest
      • IdRequest
      • ToggleRulesRequest
      • DuplicateRuleRequest
      • ListRulesRequest
      • RulesArray
      • ListRulesResponse
      • StatsResponse
      • RestrictionsResponse
      • CheckRuleNameRequest
      • CheckRuleNameResponse
      • BatchDeleteRequest
      • ExportRulesResponse
      • ImportRulesRequest
      • ImportRulesResponse
      • TestRulesRequest
      • AppliedRule
      • TestRulesResponse
      • GenericOk
      • GenericError
    • Payload
    • PubResponse
OhMyGPT
OhMyGPT
中文
  • 中文
  • English
  • 日本語
中文
  • 中文
  • English
  • 日本語
  1. 其它

Gemini 3 Pro Image Preview API

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/v1/chat/completions
注:将 body.omg_extra_body.gemini_b64img_upload_enabled 设置为true,可以让返回的Base 64改成图像URL,图像URL有效期14天。

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json必填

示例

返回响应

🟢200成功
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cn2us02.opapi.win/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "vertex-gemini-3-pro-image-preview",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "基于这个图片生成一套二次元表情包"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://pi.dogenet.work/api/v1/f/pub/jAmKdzrMRHrXF7RCG-NdR1"
                    }
                }
            ]
        }
    ],
    "stream": true
}'
响应示例响应示例
Stream Example
data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "content": "",
                "role": "assistant"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "reasoning_content": "**Developing Animated Emotes**\n\nI am now focused on generating a set of animated emotes featuring a blue-haired anime girl. I'm ensuring the character maintains her signature blue hair, double hair clips, sailor uniform, and blue eyes. The current plan is to create six distinct expressions.\n\n\n"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "reasoning_content": "**Considering Emote Characters**\n\nI'm working on integrating the provided character's features into the emotes. The goal is to keep the blue hair, hair clips, uniform, and blue eyes consistent. I'm aiming for six distinct expressions.\n\n\n"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "reasoning_content": "**Confirming the Manifestation**\n\nI am verifying that the generated meme set adheres to the specified criteria. The character's transformation into a cohesive anime-style meme set appears successful. The expressions (happy, surprised, sad, angry, shy, and confused) are all accounted for, accompanied by text and cute stickers. I will now rigorously assess the particulars.\n\n\n"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "reasoning_content": "**Analyzing the Output**\n\nI'm assessing how well the meme set aligns with the initial request. The conversion seems complete, accurately capturing the character's core traits in the anime style. I am checking to make sure that each emotion (happy, surprised, sad, angry, shy, and confused) is rendered correctly with associated text and stickers. I'm now verifying the final results.\n\n\n"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {
                "content": "![image](data:image/png;base64,iVBORxxxx........)"
            },
            "logprobs": null,
            "finish_reason": null,
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": null,
    "choices": [
        {
            "delta": {},
            "logprobs": null,
            "finish_reason": "stop",
            "index": 0
        }
    ],
    "usage": null
}

data: {
    "id": "chatcmpl-20251209153731610783868KCHZKZG",
    "object": "chat.completion.chunk",
    "created": 1765265876,
    "model": "gemini-3-pro-image-preview",
    "system_fingerprint": "",
    "choices": [],
    "usage": {
        "prompt_tokens": 538,
        "completion_tokens": 1367,
        "total_tokens": 1905,
        "prompt_tokens_details": {
            "cached_tokens": 0,
            "text_tokens": 538,
            "audio_tokens": 0,
            "image_tokens": 0
        },
        "completion_tokens_details": {
            "text_tokens": 0,
            "audio_tokens": 0,
            "reasoning_tokens": 247
        },
        "input_tokens": 0,
        "output_tokens": 0,
        "input_tokens_details": null,
        "claude_cache_creation_5_m_tokens": 0,
        "claude_cache_creation_1_h_tokens": 0
    }
}

data: [DONE
]
修改于 2025-12-09 09:17:14
上一页
[Beta] OhMyGPT Socket.IO 统一API端点
下一页
自助开票系统使用文档
Built with