Skip to content

Latest commit

 

History

History
174 lines (120 loc) · 8.41 KB

File metadata and controls

174 lines (120 loc) · 8.41 KB

目录

SF插件 两种 API 接口简介

  • 目前市面上存在 OpenAI 接口和 GEMINI API 接口这两种调用LLM的方式
  • #g 接口为 SF插件 调用 GEMINI API 接口的命令前缀
  • #s 接口为 SF插件 调用 OpenAI API 接口的命令前缀

API 动态

2026年5月10日(推荐使用)

2025年10月11日

  • 大香蕉: 推荐使用 gcli2api 以个人学习、研究、教育用途地免费使用 gemini-2.5-flash-image-preview 模型
  • 部署好 gcli2api 之后将 GeminiCLI 转换为 GEMINI API 接口后继续阅读下面的教程, 其中 接口地址接口密钥 填写你部署好的 gcli2api 提供的 接口地址接口密钥

#g手办化 接口创建教程

配置教程

Tip

连接 Gemini 官网或使用反代

目前(2026年5月10日)Gemini已经不提供免费的 大/小香蕉 额度了,不过还有其他方法(免费学生会员法),请大家八仙过海吧。

  • 按照图片填入 锅巴插件-sf插件配置-对话功能(标签页)-模型提供商-Gemini-接口列表 中

    • 其中接口地址留空则优先使用插件内自带的Gemini反代地址

    • 其中Key填写你的 GeminiKey 或者留空使用本插件的公益站(如果还有额度的话)

      image

      其中提示词为:

      Please turn this photo into a figure. Behind it, there should be a packaging box with a large clear front window, printed character artwork, the product name, logo, barcode, a small specs or authenticity panel, and a handwriten price tag sticker on one corner. There is also a computer monitor screen at the back, showing the design sketch of the figure. In front of the box, on a round plastic base, place the figure version of the photo I gave you, and the figure must be three-dimensional. I'd like the PVC material to be clearly represented. It would be even better if the background is indoors.
      
  • 对Bot使用 #g手办化 指令即可(可引用图片/附带图片/后续发送图片)

    image

#s手办化 接口创建教程

OpenAI API 接入教程

  • 按照图片填入 锅巴插件-sf插件配置-对话功能(标签页)-模型提供商-OpenAI API-接口列表 中
image
  • 对Bot使用该指令
image
  • Bot返回
image

OpenRouter.ai 配置教程

Tip

本篇无任何 邀请码(AFF),纯发电

目前(2025年9月5日)OpenRouter.ai 的 google/gemini-2.5-flash-image-preview:free 开始收费了

不过它还有其他的免费模型,例如参考下面的配置教程用免费的 DeepSeek: DeepSeek V3.1 (free)Venice: Uncensored (free) 玩玩角色扮演对话... >///<

OpenRouter.ai 配置教程

  • 注册并登录 openrouter.ai

  • 创建你的 key 保存备用

  • 打开 models 找到你想要的模型,例如现在介绍的手办化ai生图模型 Google: Gemini 2.5 Flash Image Preview (free),点击 API 选项卡可以看到此模型的调用方式:

    fetch("https://openrouter.ai/api/v1/chat/completions", {
    method: "POST",
    headers: {
        "Authorization": "Bearer <OPENROUTER_API_KEY>",
        "HTTP-Referer": "<YOUR_SITE_URL>", // Optional. Site URL for rankings on openrouter.ai.
        "X-Title": "<YOUR_SITE_NAME>", // Optional. Site title for rankings on openrouter.ai.
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        "model": "google/gemini-2.5-flash-image-preview:free",
        "messages": [
        {
            "role": "user",
            "content": [
            {
                "type": "text",
                "text": "What is in this image?"
            },
            {
                "type": "image_url",
                "image_url": {
                "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
                }
            }
            ]
        }
        ]
    })
    });
  • 按照图片填入 锅巴插件-sf插件配置-对话功能(标签页)-模型提供商-OpenAI API-接口列表 中

    image image

    其中提示词为:

    Please turn this photo into a figure. Behind it, there should be a packaging box with a large clear front window, printed character artwork, the product name, logo, barcode, a small specs or authenticity panel, and a handwriten price tag sticker on one corner. There is also a computer monitor screen at the back, showing the design sketch of the figure. In front of the box, on a round plastic base, place the figure version of the photo I gave you, and the figure must be three-dimensional. I'd like the PVC material to be clearly represented. It would be even better if the background is indoors.
    
  • 对Bot使用 #s手办化 指令即可(可引用图片/附带图片/后续发送图片)

    image

类似 ControlNet 一般控制图片

Tip

同时适用于 #s#g 接口

  • 锅巴设置中如下,把 必需图片 改为 2

    image
  • 对Bot使用该指令

    image
  • Bot返回

    image

多模态模型的更多的提示词


🎨 让AI绘画成为日常,让创意永不枯竭!✨

📚 查看插件主页 | 💬 加入交流群 | ⭐ 给个Star