ChatfireAPI
首页官网模型列表服务监控
关于更多
  • 充值
  • 联系客服
首页官网模型列表服务监控
关于更多
  • 充值
  • 联系客服
    • 返回首页
    • OpenAI
    • OpenAI SDK教程
    • 全模型开启Plus模式
      • 开启 联网
        POST
      • 开启 画画
        POST
      • 开启 文件问答
        POST
      • 开启 图片问答(推荐格式)
        POST
      • 开启 文件问答-支持多轮对话(推荐格式)
        POST
    • 多模态聊天(支持图片、视频)
      • 使用说明
      • OpenaiSDK用法
      • Gpt系列
        POST
      • Claude系列
        POST
      • Qwen系列
        POST
      • Internvl系列
        POST
      • Glm系列
        POST
      • Cpm系列
        POST
      • 视频解析
        POST
      • 音频解析
        POST
      • 豆包系列(混合推理,可关闭思考)
        POST
    • DeepClaude
      POST
    • 创建聊天补全(SeedEdit)
      POST
    • 图片编辑(Chat)
      POST
    • 联网模型
      POST
    • PPT助手
      POST
    • Google系列
      POST
    • 混元
      POST
    • Chat画画/视频
      POST
    • responses
      POST
    • o3
      POST

      图片编辑(Chat)

      POST
      {{YOUR_BASE_URL}}/v1/chat/completions
      最后修改时间:2025-04-14 02:09:44
      责任人:未设置

      支持多轮编辑图片#

      请求参数

      Authorization
      在 Header 添加参数
      Authorization
      ,其值为在 Bearer 之后拼接 Token
      示例:
      Authorization: Bearer ********************
      Header 参数
      Content-Type
      string 
      必需
      示例值:
      application/json
      Accept
      string 
      必需
      示例值:
      application/json
      Authorization
      string 
      可选
      示例值:
      Bearer {{YOUR_API_KEY}}
      Body 参数application/json
      model
      string 
      必需
      枚举值 gpt-4o-image gemini-2.0-flash-exp-image-generation
      messages
      array [object {2}] 
      必需
      role
      string 
      可选
      content
      string 
      可选
      也支持 {"type": "image_url", "image_url": {"url": ""}}
      示例
      {
          "model": "gemini-2.0-flash-exp-image-generation", // 枚举值 gpt-4o-image gemini-2.0-flash-exp-image-generation, chat-seededit
          "messages": [
            {
              "role": "user",
              "content": "https://oss.ffire.cc/files/kling_watermark.png 让这个女人带上眼镜" // 也支持 {"type": "image_url", "image_url": {"url": ""}}
            }
          ]
        }

      示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location -g --request POST '{{YOUR_BASE_URL}}/v1/chat/completions' \
      --header 'Accept: application/json' \
      --header 'Authorization: Bearer {{YOUR_API_KEY}}' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "model": "gemini-2.0-flash-exp-image-generation", // 枚举值 gpt-4o-image gemini-2.0-flash-exp-image-generation, chat-seededit
          "messages": [
            {
              "role": "user",
              "content": "https://oss.ffire.cc/files/kling_watermark.png 让这个女人带上眼镜" // 也支持 {"type": "image_url", "image_url": {"url": ""}}
            }
          ]
        }'

      返回响应

      🟢200成功
      application/json
      Body
      id
      string 
      必需
      choices
      array [object {4}] 
      必需
      finish_reason
      null 
      可选
      index
      integer 
      可选
      logprobs
      null 
      可选
      message
      object 
      可选
      created
      integer 
      必需
      model
      string 
      必需
      object
      string 
      必需
      service_tier
      null 
      必需
      system_fingerprint
      null 
      必需
      usage
      object 
      必需
      completion_tokens
      integer 
      必需
      prompt_tokens
      integer 
      必需
      total_tokens
      integer 
      必需
      completion_tokens_details
      null 
      必需
      prompt_tokens_details
      null 
      必需
      示例
      {
          "id": "oCrTEp6GtuWhyVqajzVDEs",
          "choices": [
              {
                  "finish_reason": null,
                  "index": 0,
                  "logprobs": null,
                  "message": {
                      "content": "![image_url](https://s3.ffire.cc/cdn/20250414/mu5ZrsM5QYSh6NxKPbaxRT)",
                      "refusal": null,
                      "role": "assistant",
                      "annotations": null,
                      "audio": null,
                      "function_call": null,
                      "tool_calls": null,
                      "reasoning_content": ""
                  }
              }
          ],
          "created": 1744596467,
          "model": "gemini-2.0-flash-exp-image-generation",
          "object": "chat.completion",
          "service_tier": null,
          "system_fingerprint": null,
          "usage": {
              "completion_tokens": 34,
              "prompt_tokens": 44,
              "total_tokens": 78,
              "completion_tokens_details": null,
              "prompt_tokens_details": null
          }
      }
      修改于 2025-04-14 02:09:44
      上一页
      创建聊天补全(SeedEdit)
      下一页
      联网模型
      Built with