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

      创建聊天补全(SeedEdit)

      POST
      {{YOUR_BASE_URL}}/v1/chat/completions
      最后修改时间:2025-04-07 03:08:09
      责任人:未设置
      给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
      为提供的提示和参数创建完成

      请求参数

      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 
      必需
      要使用的模型的 ID。有关哪些模型可与聊天 API 一起使用的详细信息,请参阅模型端点兼容性表。
      messages
      array [object {2}] 
      必需
      至今为止对话所包含的消息列表。Python 代码示例。
      role
      string 
      可选
      content
      string 
      可选
      temperature
      integer 
      可选
      使用什么采样温度,介于 0 和 2 之间。较高的值(如 0.8)将使输出更加随机,而较低的值(如 0.2)将使输出更加集中和确定。 我们通常建议改变这个或top_p但不是两者。
      top_p
      integer 
      可选
      一种替代温度采样的方法,称为核采样,其中模型考虑具有 top_p 概率质量的标记的结果。所以 0.1 意味着只考虑构成前 10% 概率质量的标记。 我们通常建议改变这个或temperature但不是两者。
      n
      integer 
      可选
      默认为 1
      为每个输入消息生成多少个聊天补全选择。
      stream
      boolean 
      可选
      默认为 false 如果设置,则像在 ChatGPT 中一样会发送部分消息增量。标记将以仅数据的服务器发送事件的形式发送,这些事件在可用时,并在 data: [DONE] 消息终止流。Python 代码示例。
      stop
      string 
      可选
      默认为 null 最多 4 个序列,API 将停止进一步生成标记。
      max_tokens
      integer 
      可选
      默认为 inf
      在聊天补全中生成的最大标记数。
      输入标记和生成标记的总长度受模型的上下文长度限制。计算标记的 Python 代码示例。
      presence_penalty
      number 
      可选
      -2.0 和 2.0 之间的数字。正值会根据到目前为止是否出现在文本中来惩罚新标记,从而增加模型谈论新主题的可能性。 查看有关频率和存在惩罚的更多信息。
      frequency_penalty
      number 
      可选
      默认为 0 -2.0 到 2.0 之间的数字。正值根据文本目前的存在频率惩罚新标记,降低模型重复相同行的可能性。 有关频率和存在惩罚的更多信息。
      logit_bias
      null 
      可选
      修改指定标记出现在补全中的可能性。
      接受一个 JSON 对象,该对象将标记(由标记器指定的标记 ID)映射到相关的偏差值(-100 到 100)。从数学上讲,偏差在对模型进行采样之前添加到模型生成的 logit 中。确切效果因模型而异,但-1 和 1 之间的值应减少或增加相关标记的选择可能性;如-100 或 100 这样的值应导致相关标记的禁用或独占选择。
      user
      string 
      可选
      代表您的最终用户的唯一标识符,可以帮助 OpenAI 监控和检测滥用行为。了解更多。
      response_format
      object 
      可选
      指定模型必须输出的格式的对象。 将 { "type": "json_object" } 启用 JSON 模式,这可以确保模型生成的消息是有效的 JSON。 重要提示:使用 JSON 模式时,还必须通过系统或用户消息指示模型生成 JSON。如果不这样做,模型可能会生成无休止的空白流,直到生成达到令牌限制,从而导致延迟增加和请求“卡住”的外观。另请注意,如果 finish_reason="length",则消息内容可能会被部分切断,这表示生成超过了 max_tokens 或对话超过了最大上下文长度。 显示属性
      seen
      integer 
      可选
      此功能处于测试阶段。如果指定,我们的系统将尽最大努力确定性地进行采样,以便使用相同的种子和参数进行重复请求应返回相同的结果。不能保证确定性,您应该参考 system_fingerprint 响应参数来监控后端的更改。
      tools
      array[string]
      必需
      模型可以调用的一组工具列表。目前,只支持作为工具的函数。使用此功能来提供模型可以为之生成 JSON 输入的函数列表。
      tool_choice
      object 
      必需
      控制模型调用哪个函数(如果有的话)。none 表示模型不会调用函数,而是生成消息。auto 表示模型可以在生成消息和调用函数之间进行选择。通过 {"type": "function", "function": {"name": "my_function"}} 强制模型调用该函数。 如果没有函数存在,默认为 none。如果有函数存在,默认为 auto。 显示可能的类型
      示例
      {
          "model": "chat-seededit",
          "messages": [
            {
              "role": "user",
              "content": "https://oss.ffire.cc/files/kling_watermark.png 衣服换成红色,并且带上墨镜🕶"
            }
          ],
          "stream": true
        }

      示例代码

      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": "chat-seededit",
          "messages": [
            {
              "role": "user",
              "content": "https://oss.ffire.cc/files/kling_watermark.png 衣服换成红色,并且带上墨镜🕶"
            }
          ],
          "stream": true
        }'

      返回响应

      🟢200OK
      application/json
      Body
      id
      string 
      必需
      object
      string 
      必需
      created
      integer 
      必需
      choices
      array [object {3}] 
      必需
      index
      integer 
      可选
      message
      object 
      可选
      finish_reason
      string 
      可选
      usage
      object 
      必需
      prompt_tokens
      integer 
      必需
      completion_tokens
      integer 
      必需
      total_tokens
      integer 
      必需
      示例
      data: {"id":"SzLczL7e2uAxMAGi5ZUYAC","choices":[{"delta":{"content":">","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"eFUbVUpcX7bKNifRDuB6rz","choices":[{"delta":{"content":" ","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"E9BNxHWcfwZJNoFdPptXDG","choices":[{"delta":{"content":"🖌","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"n26QACj947bPgwuCwBCvXC","choices":[{"delta":{"content":"️","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"PXSNQssc3AdLAsJ4fsVJCG","choices":[{"delta":{"content":"正","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"wwgMQWrsP28mWRWNrwonYs","choices":[{"delta":{"content":"在","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"Q6Hd7RKXoVzg5JguVfsL2B","choices":[{"delta":{"content":"绘","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"2N4e47Cbn5npuZJxAYaPjP","choices":[{"delta":{"content":"画","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"fqqfUJkHAErRJNSckLiHB9","choices":[{"delta":{"content":"\n","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"3wkL8YxP4aBXCKjz3pTmdV","choices":[{"delta":{"content":"\n","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"Vw8MdgYqoy4GFapEsr6f3e","choices":[{"delta":{"content":"`","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"EReChbMt84rw3tctpuWF7h","choices":[{"delta":{"content":"`","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"WihSD4nbkMMSuREtY8phxC","choices":[{"delta":{"content":"`","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"9V4tUjRihTD8NMLd9c3gBm","choices":[{"delta":{"content":"j","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"C4pJkqXERUvfgA7tKkX99Z","choices":[{"delta":{"content":"s","function_call":null,"refusal":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null}],"created":1734586291,"model":"chat-seededit","object":"chat.completion.chunk","service_tier":null,"system_fingerprint":null,"usage":null}
      
      data: {"id":"QUDNBTwa87fbtfrwFqLRRL","choices":[{"delta":{"content":"o","function_call":null
      修改于 2025-04-07 03:08:09
      上一页
      DeepClaude
      下一页
      图片编辑(Chat)
      Built with