钱多多-全链路API聚合
首页钱多多首页
首页钱多多首页
  1. Rerank API
  • 发出请求
  • 模型接口
    • 完成对象
    • OpenAI接口
      • 文本生成(通用)
      • 图片理解(通用)
      • 图片生成(gpt-image-1)
      • 图片生成(dall-e-3)
      • 图片编辑(edits接口)
      • 图片编辑(网页版)
      • Web search(联网搜索)
      • Responses API
      • Function calling
      • response_format
      • N测试
      • 创建文本嵌入
      • 批量创建嵌入
      • 文本转语音(TTS)
      • 语音转文本(STT)whisper-1
      • 语音转文本(STT)gpt-4o-transcribe
      • 音频翻译
      • Audio接口(输出)
      • Audio接口(输入)
      • 内容补全接口
      • gpt-image-1(网页版)
      • 图片变体生成
      • 创建内容审核
      • 列出模型
    • 文生图接口
      • Grok 2 Image Gen
      • flux-schnell(OpenAI图像格式)
      • FLUX1.1-pro(OpenAI图像格式)
      • stable-diffusion(OpenAI图像格式)
      • ideogram
      • recraftv3
    • Realtime (实时语音、对话)
      • Realtime API
    • Anthropic Claude
      • 文本生成
      • 图片理解
      • 文本生成(v1/messages)
      • Tool use (function calling)
    • 谷歌Gemini
      • 文本生成
      • 文本生成 (联网)
      • 图片生成(2.0 Flash)
      • 图片生成 (Imagen 3)
      • 图片理解
      • 音频理解
      • 视频理解
    • Midjourney
      • 提交Imagine任务
      • 提交Blend任务
      • 提交Describe任务
      • 提交Modal
      • 提交swap_face任务
      • 执行Action动作
      • 上传文件到discord
      • 根据ID列表查询任务
      • 指定ID获取任务
      • 获取任务图片的seed
    • GPTs 相关
      • gpt-4-all(分析图片)
      • gpt-4-all(生成图片)
      • GPTs对话
      • 搜索相关 GPTs
      • 查询 GPTs 详情
      • 批量查询 GPTs 详情
    • 文生音乐
      • Suno
        • 生成歌曲(API格式)
        • 生成歌词(API格式)
        • 查询单个任务(API格式)
        • Suno(Chat格式)
      • Udio
        • Udio(Chat格式)
    • 文生视频
      • 文生视频(luma)
      • 文生视频(runway)
      • 智谱清言GLM
      • 文生视频(可灵)
    • Rerank API
      • Jina AI 重排序格式
        POST
      • Cohere 重排序格式
        POST
      • Xinference 重排序格式
        POST
  • Python配置方式
    • Python基础对话
    • Python使用gpt-4o识别图片
    • Python使用Claude识别图片
  • 帮助中心
    • 常见问题及解决办法
  • 回收站
    • 查询所有任务
      GET
    • 根据ID列表查询任务-字段displays
      POST
    • 分页查询任务
      POST
    • 查询任务队列
      GET
    • 取消任务
      POST
    • 提交Shorten任务
      POST
    • Stable-Diffusion
      POST
  1. Rerank API

Jina AI 重排序格式

主站接口①
主站接口①
POST
https://api2.aigcbest.top/v1
/rerank
官方文档:https://jina.ai/reranker
标准格式:Jina AI的rerank格式被采用为标准格式。所有其他供应商(如Xinference、Cohere等)的rerank响应都会被格式化为Jina AI的格式,以提供统一的开发体验。
简介:Jina AI Rerank 是一个强大的文本重排序模型,可以根据查询对文档列表进行相关性排序。该模型支持多语言,可以处理不同语言的文本内容,并为每个文档分配相关性分数。

请求参数

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 
必需
要使用的模型的 ID。有关哪些模型适用于聊天 API 的详细信息,请参阅模型端点兼容性表。
messages
array [object {2}] 
必需
以聊天格式生成聊天完成的消息。
role
string 
可选
content
string 
可选
temperature
integer 
可选
使用什么采样温度,介于 0 和 2 之间。较高的值(如 0.8)将使输出更加随机,而较低的值(如 0.2)将使输出更加集中和确定。 我们通常建议改变这个或top_p但不是两者。
top_p
integer 
可选
一种替代温度采样的方法,称为核采样,其中模型考虑具有 top_p 概率质量的标记的结果。所以 0.1 意味着只考虑构成前 10% 概率质量的标记。 我们通常建议改变这个或temperature但不是两者。
n
integer 
可选
为每个输入消息生成多少个聊天完成选项。
stream
boolean 
可选
如果设置,将发送部分消息增量,就像在 ChatGPT 中一样。当令牌可用时,令牌将作为纯数据服务器发送事件data: [DONE]发送,流由消息终止。有关示例代码,请参阅 OpenAI Cookbook 。
stop
string 
可选
API 将停止生成更多令牌的最多 4 个序列。
max_tokens
integer 
可选
聊天完成时生成的最大令牌数。 输入标记和生成标记的总长度受模型上下文长度的限制。
presence_penalty
number 
可选
-2.0 和 2.0 之间的数字。正值会根据到目前为止是否出现在文本中来惩罚新标记,从而增加模型谈论新主题的可能性。 查看有关频率和存在惩罚的更多信息。
frequency_penalty
number 
可选
-2.0 和 2.0 之间的数字。正值会根据新标记在文本中的现有频率对其进行惩罚,从而降低模型逐字重复同一行的可能性。 查看有关频率和存在惩罚的更多信息。
logit_bias
null 
可选
修改指定标记出现在完成中的可能性。 接受一个 json 对象,该对象将标记(由标记器中的标记 ID 指定)映射到从 -100 到 100 的关联偏差值。从数学上讲,偏差会在采样之前添加到模型生成的 logits 中。确切的效果因模型而异,但 -1 和 1 之间的值应该会减少或增加选择的可能性;像 -100 或 100 这样的值应该导致相关令牌的禁止或独占选择。
user
string 
可选
代表您的最终用户的唯一标识符,可以帮助 OpenAI 监控和检测滥用行为。了解更多。
示例
{
  "model": "jina-reranker-v2-base-multilingual",
  "query": "What is the capital of the United States?",
  "top_n": 3,
  "documents": [
    "Carson City is the capital city of the American state of Nevada.",
    "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
    "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.",
    "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.",
    "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."
  ]
}

示例代码

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://api2.aigcbest.top/v1/rerank' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "jina-reranker-v2-base-multilingual",
  "query": "What is the capital of the United States?",
  "top_n": 3,
  "documents": [
    "Carson City is the capital city of the American state of Nevada.",
    "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
    "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.",
    "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.",
    "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."
  ]
}'

返回响应

🟢200OK
application/json
Body
id
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-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
  }
}
修改于 2025-05-08 00:28:56
上一页
文生视频(可灵)
下一页
Cohere 重排序格式
Built with