From e2cf52284438eb0b56abb4ae263d75d426c21d84 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Wed, 27 Mar 2024 10:45:50 +0800 Subject: [PATCH] update README --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index ee471b3..6ea6b7d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Moonshot AI(Kimi.ai)接口转API [kimi-free-api](https://github.com/LLM-Red- * [原生部署](#原生部署) * [接口列表](#接口列表) * [对话补全](#对话补全) + * [AI绘图](#AI绘图) * [文档解读](#文档解读) * [图像解析](#图像解析) * [注意事项](#注意事项) @@ -264,6 +265,39 @@ Authorization: Bearer [refresh_token] } ``` +### AI绘图 + +对话补全接口,与openai的 [images-create-api](https://platform.openai.com/docs/api-reference/images/create) 兼容。 + +**POST /v1/images/generations** + +header 需要设置 Authorization 头部: + +``` +Authorization: Bearer [refresh_token] +``` + +请求数据: +```json +{ + // 如果使用智能体请填写智能体ID到此处,否则可以乱填 + "model": "cogview-3", + "prompt": "一只可爱的猫" +} +``` + +响应数据: +```json +{ + "created": 1711507449, + "data": [ + { + "url": "https://sfile.chatglm.cn/testpath/5e56234b-34ae-593c-ba4e-3f7ba77b5768_0.png" + } + ] +} +``` + ### 文档解读 提供一个可访问的文件URL或者BASE64_URL进行解析。