mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	docs: add API docs
This commit is contained in:
		@@ -109,6 +109,7 @@ _✨ 通过标准的 OpenAI API 格式访问所有的大模型,开箱即用 
 | 
			
		||||
    + 微信公众号授权(需要额外部署 [WeChat Server](https://github.com/songquanpeng/wechat-server))。
 | 
			
		||||
23. 支持主题切换,设置环境变量 `THEME` 即可,默认为 `default`,欢迎 PR 更多主题,具体参考[此处](./web/README.md)。
 | 
			
		||||
24. 配合 [Message Pusher](https://github.com/songquanpeng/message-pusher) 可将报警信息推送到多种 App 上。
 | 
			
		||||
25. 支持**扩展**,详情请参考此处 [API 文档](./docs/API.md)。
 | 
			
		||||
 | 
			
		||||
## 部署
 | 
			
		||||
### 基于 Docker 进行部署
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								docs/API.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								docs/API.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
# 使用 API 操控 & 扩展 One API
 | 
			
		||||
> 欢迎提交 PR 在此放上你的拓展项目。
 | 
			
		||||
 | 
			
		||||
## 鉴权
 | 
			
		||||
One API 支持两种鉴权方式:Cookie 和 Token,对于 Token,参照下图获取:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
之后,将 Token 作为请求头的 Authorization 字段的值即可,例如下面使用 Token 调用测试渠道的 API:
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## API 列表
 | 
			
		||||
> 当前 API 列表不全,请自行通过浏览器抓取前端请求
 | 
			
		||||
 | 
			
		||||
欢迎此处 PR 补充。
 | 
			
		||||
 | 
			
		||||
如果现有的 API 没有办法满足你的需求,欢迎提交 issue 讨论。
 | 
			
		||||
		Reference in New Issue
	
	Block a user