- OpenAI通用接口
- 全能模型接口
- kimi
- 通义千问
- 智谱
- 秘塔搜索
- 讯飞星火
- 海螺
- deepseek
- Openai
- Suno(音乐)
- Midjourney(绘画)
- Flux(绘图)
- Recraft(绘图)
- Ideogram(绘画)
- Luma(视频)
- Runway(视频)
- 可灵(视频)
GPT-4o全能版(文档解读)
POST
https://api.ecovai.cn/v1/chat/completions
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string
必需
示例值:
application/json
Accept
string
必需
示例值:
application/json
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
string
必需
messages
array [object {2}]
必需
role
string
可选
content
string
必需
示例
{
"model": "gpt-4o-all",
"messages": [
{
"role": "user",
"content": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf文档里说了什么?"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ecovai.cn/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o-all",
"messages": [
{
"role": "user",
"content": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf文档里说了什么?"
}
]
}'
返回响应
🟢200OK
application/json
Body
id
string
必需
model
string
必需
object
string
必需
created
integer
必需
choices
array [object {3}]
必需
index
integer
可选
message
object
可选
finish_reason
string
可选
usage
object
必需
prompt_tokens
integer
必需
completion_tokens
integer
必需
total_tokens
integer
必需
示例
{
"id": "chatcmpl-89D2lyyAGmObtoigz6rjRnkirMStF",
"model": "gpt-4o-all",
"object": "chat.completion",
"created": 1730454919,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n``` \n open_url(\"https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf\")\n```\nThe document appears to contain ancient love spells, likely from historical magical or mystical texts. Here’s a summary of the main sections:\n\n1. **Valentine Ritual**: A spell involving bread pieces, ritual dirt, and invoking gods like Hecate to invoke love and obsession in a target by causing them mental anguish until they reciprocate the caster's affection.\n\n2. **Invocation of Daemons**: A spell calling on mystical powers to bind two people together with intense desire, using phrases to connect their bodies and souls, particularly aimed at inciting passionate attraction.\n\n3. **Aphrodite’s Secret Name**: This section reveals a mystical name of Aphrodite and outlines a ritual involving purity and the repeated whispering of this name to win the love of a beautiful person.\n\n4. **Myrrh Spell**: A ritual that uses myrrh, invoking its bitter qualities to create unacknowledged love in a target. The spell calls for relentless obsession, urging the target to think of the caster constantly until they unite.\n\nThese spells focus on compelling another person’s love or attraction, with an intense, almost forceful approach common in historical love rituals."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 35,
"completion_tokens": 266,
"total_tokens": 301
}
}
修改于 2024-12-02 07:22:11