Appearance
AI Gear 已经支持的Open AI 接口
想要了解我们已支持接口的访问细节,请参考OpenAI官方API文档。
AIGEAR_API_KEY 指的是在API Key管理页面中获取的API密钥
Chat
给定一组描述对话的消息列表,该模型将返回一个回复。
Create chat completion Stream
为给定的聊天对话创建模型回复。
可用模型
gpt-3.5-turbo, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-0301, gpt-4-0314, gpt-4-0613, gpt-4, gpt-4-1106-preview
💡支持gpt-4
💡支持 tools call
💡支持 function call (deprecated)
POST https://api.aigear.top/v1/chat/completionsPOST https://api.aigear.top/v1/chat/completionsExample Request
bash
curl https://api.aigear.top/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AIGEAR_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'curl https://api.aigear.top/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AIGEAR_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'Parameters
json
{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}Example Response
json
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}Completions Stream Under Construction
给出一个提示,模型会返回一个或多个预测的Completion,并且还可以在每个位置返回备选标记的概率。
Create completion
根据提供的提示和参数创建Completion。
可用模型
text-davinci-003, text-davinci-002, text-curie-001, text-babbage-001, text-ada-001
POST https://api.aigear.top/v1/completionsPOST https://api.aigear.top/v1/completionsEdits Under Construction
模型将根据一个提示和一条指令返回一个修改过的提示的版本。
Create edit
为所提供的输入、指令和参数创建一个新的编辑。
可用模型
text-davinci-edit-001, code-davinci-edit-001
POST https://api.aigear.top/v1/editsPOST https://api.aigear.top/v1/editsImages Under Construction
给定一个提示和/或输入图像,该模型将生成一张新的图像。
Create image
根据提示创建图像。
可用模型
DALL · E
POST https://api.aigear.top/v1/images/generationsPOST https://api.aigear.top/v1/images/generationsCreate image edit
通过给定的原始图像和提示信息创建编辑或扩展后的图像。
可用模型
DALL · E
POST https://api.aigear.top/v1/images/editsPOST https://api.aigear.top/v1/images/editsCreate image variation
创建给定图像的变体。
可用模型
DALL · E
POST https://api.aigear.top/v1/images/variationsPOST https://api.aigear.top/v1/images/variationsEmbeddings Under Construction
获得一个给定输入的向量表示,以便机器学习模型和算法可以轻松地进行处理。
Create embeddings
创建一个表示输入文本的嵌入向量。
可用模型
text-embedding-ada-002, text-search-ada-doc-001
POST https://api.aigear.top/v1/embeddingsPOST https://api.aigear.top/v1/embeddingsAudio
将音频转换为文字。
Create transcription
将音频转录为输入语言。
可用模型
whisper-1
POST https://api.aigear.top/v1/audio/transcriptionsPOST https://api.aigear.top/v1/audio/transcriptionsCreate translation Under Construction
将音频翻译成英语。
可用模型
whisper-1
POST https://api.aigear.top/v1/audio/translationsPOST https://api.aigear.top/v1/audio/translations