什么事Chatique?
Chatique是一个低价聚合llm平台,具体介绍/客户端下载地址请见https://chatique.top/
或者只需要知道Chatique很好就可以了()
API说明
调用地址
海外反代线路:https://api.chatique.top/
国内线路:cn.api.chatique.top
https调用方法:由于域名未备案,需要获取ip后,使用host www.baidu.com 进行访问,并信任下方自签名证书(sha256/ImszcfW8zWl7lRBNKx8xHIP+bCjm5hnGtvykyhY+0Zo=)
-----BEGIN CERTIFICATE-----
MIICyjCCAlGgAwIBAgIQAKZ4AbFhM+puXVwWLP2TZTAKBggqhkjOPQQDAjB3MRYw
FAYDVQQDDA13d3cuYmFpZHUuY29tMRUwEwYDVQQKDAxHbG9iYWwgTkIgQ0ExFTAT
BgNVBAsMDEdsb2JhbCBOQiBDQTELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB0JlaWpp
bmcxEDAOBgNVBAcMB0JlaWppbmcwHhcNMjQxMTA4MDczMDUzWhcNMzQxMTA2MDcz
MDUzWjB3MRYwFAYDVQQDDA13d3cuYmFpZHUuY29tMRUwEwYDVQQKDAxHbG9iYWwg
TkIgQ0ExFTATBgNVBAsMDEdsb2JhbCBOQiBDQTELMAkGA1UEBhMCQ04xEDAOBgNV
BAgMB0JlaWppbmcxEDAOBgNVBAcMB0JlaWppbmcwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAATFXCY1GSZR+ivnR+j5izvKn3hM4FkOhSNvwmfZjCSfxBVkOlUnWGTaYrm7
g/SPCDuqfAFUcsY1euQcN/BuNxarEZ0bJ20lhQ+HIy1CtdoAuDlyfLaDmNFP6baX
i9zoRdKjgaEwgZ4wHQYDVR0OBBYEFBHQu8JOUxcLS5n6Y7zocTOTqiIkMA4GA1Ud
DwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MDsGA1UdJQQ0MDIGCCsGAQUFBwMC
BggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCDAfBgNVHSME
GDAWgBQR0LvCTlMXC0uZ+mO86HEzk6oiJDAKBggqhkjOPQQDAgNnADBkAjAuIszR
h0ZpRe8AFtkJ1B4N/oFMzPOSnefmcVA6cXNox0+oQapoktN6iQV2mJB21scCMFB1
nL1DYhLAshBDI1HrqmBU4bYuXkkCIoOM69x2njqxtZAHnx4+KDgj3BiFCfOI2Q==
-----END CERTIFICATE-----
http调用方法 使用<ip>:19198(不推荐)
获取鉴权token
GET /user/get_token?username=<用户名>&password=<密码>
token不会自行变化,获取一次即可
返回数据示例:
"我是Token哼哼哼啊啊啊啊"
获取系统配置
系统配置包含模型信息
GET /user/get_sys_config
返回数据示例:
{"price":10.0,"checkin_award":1000.0,"latest_version_code":1001,"url":"https://assistant.quq.world","latest_version":"1.0.1","id":1,"update_description":"客户端性能优化;Bug修复","is_force_update":false,"availableModels":[{"model_id":"gpt-4o-mini","name":"gpt-4o-mini","billing_rate":1.0,"description":"低价,快速响应","support_files":false,"support_assistant":true},{"model_id":"claude-3-5-sonnet-20240620","name":"claude-3.5","billing_rate":6.0,"description":"适合编码","support_files":false,"support_assistant":false},{"model_id":"claude-3-5-sonnet-20241022","name":"claude-3.5-new","billing_rate":10.0,"description":"最新的claude模型,回复慢","support_files":false,"support_assistant":false},{"model_id":"gpt-4o-2024-08-06","name":"gpt-4o","billing_rate":6.0,"description":"通用模型","support_files":false,"support_assistant":false},{"model_id":"gemini-1.5-flash-latest","name":"gemini-1.5 flash","billing_rate":1.5,"description":null,"support_files":false,"support_assistant":false},{"model_id":"gemini-exp-1114","name":"gemini-1.5 pro","billing_rate":6.0,"description":null,"support_files":false,"support_assistant":false},{"model_id":"grok-beta","name":"grok","billing_rate":7.0,"description":null,"support_files":false,"support_assistant":false},{"model_id":"gpt-4o-all","name":"gpt-4o online","billing_rate":8.0,"description":"具有联网和绘图能力的模型,回复慢","support_files":true,"support_assistant":false},{"model_id":"o1-mini-2024-09-12","name":"o1-mini","billing_rate":15.0,"description":"具有高级推理功能的模型,回复慢","support_files":false,"support_assistant":false}],"pay_methods":[{"id":"wxpay","name":"微信"},{"id":"alipay","name":"支付宝"}]}
生成回复
目前已兼容官方API格式(支持参数stream)
流式响应等见官方API文档 https://platform.openai.com/docs/api-reference/chat/create
POST /v1/chat/completions
调用示例:
curl https://.../v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 我是Token哼哼哼啊啊啊啊" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
返回数据示例:
{"id":"chatcmpl-1919810","choices":[{"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"Hello! How can I assist you today?","refusal":null,"role":"assistant","audio":null,"function_call":null,"tool_calls":null}}],"created":17335xxxxx,"model":"gpt-4o-mini","object":"chat.completion","service_tier":null,"system_fingerprint":"fp_04751dxxxx","usage":{"completion_tokens":9,"prompt_tokens":19,"total_tokens":28,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0}}}
其他
完整功能可查看 https://api.chatique.top/redoc (不会用的话可以尝试逆向官方客户端)