> ## Content Index
> Fetch the complete content index at: https://lucent.blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# [replicate] QQ机器人调用 replicate Stable Diffusion 绘画接口
- URL: https://lucent.blog/replicateqq-ji-qi-ren-diao-yong-replicatestablediffusionhui-hua-jie-kou/
- Published: 2023-03-24T09:33:54.000Z
- Updated: 2026-08-21T00:49:54.000Z
- Author: Lucent

### 前提

1.已经通过之前的文章搭建起了你的聊天机器人  
2.拥有一个Github账号，没有就注册一个

### 注册replicate 并获取key

1. 打开[https://replicate.com/signin?next=/](https://replicate.com/signin?next=/&ref=lucent.blog),通过GitHub登录

登录后直接进入这个链接: [https://replicate.com/account](https://replicate.com/account?ref=lucent.blog)  
复制图中的token  

![](https://img-1251540275.cos.ap-shanghai.myqcloud.com/uPic/i3Df9M.png)

### 修改配置文件

打开py/config.json  

![](https://img-1251540275.cos.ap-shanghai.myqcloud.com/uPic/zFfq5R.png)

### 生成图片

指令 /sd 提示词  

![](https://img-1251540275.cos.ap-shanghai.myqcloud.com/uPic/1hqNBU.png)

### 注意

由于提示词等参数只能通过聊天框设置，所以除了正向提示词，其他参数都在代码里面默认了，如果你想要使用更多参数，比如反向提示词，可以自己修改代码，自己设计一种命令格式，将其他参数一同传递给后端,本教程只是基础用法