DuckLLM
  1. Rerank API
DuckLLM
  • 发出请求
  • 模型接口
    • 完成对象
    • 模型(Models)
      • 列出模型
    • 聊天接口(Chat)
      • 聊天接口(通用)
      • 官方Function calling调用
      • 官方N测试
      • 官方最新response_format
      • gpt-4o(分析图片)
    • Anthropic Claude
      • 聊天接口
      • 识图接口
    • 谷歌Gemini
      • 聊天接口
      • 识图接口
    • GPTs 相关
      • GPTs对话
      • 搜索相关 GPTs
      • 批量查询 GPTs 详情
      • gpt-4-all(分析图片)
      • gpt-4-all(生成图片)
    • 文生音乐 Suno
      • 文生音乐(Chat格式)
    • 文生视频
      • 智谱清言GLM
      • 文生视频(luma)
      • 文生视频(runway)
    • Rerank API
      • Rerank API
        POST
    • 自动补全接口(Completions)
      • 内容补全接口
    • 文生图接口
      • DALL·E 3
      • ideogram
      • Stable-Diffusion
    • 向量生成接口(Embeddings)
      • 创建嵌入
    • 音频接口(Audio)
      • 创建转录
      • 创建翻译
      • TTS文本转语音
  • 帮助中心
    • 隐私条款
    • 服务条款
    • 关于我们
    • 常见问题及解决办法
    • 已弃用
      • 查询 GPTs 详情
      • 生成歌曲(API格式)
      • 生成歌词(API格式)
      • 查询单个任务(API格式)
      • Flux(OpenAI dall-e-3格式)
  1. Rerank API

Rerank API

正式环境
https://api.duckllm.com/v1
正式环境
https://api.duckllm.com/v1
POST
/rerank
模型供应商选择Jina,按要求填写模型信息即可接入Dify。

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "rerank-multilingual-v3.0",
  "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://api.duckllm.com/v1/rerank' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "rerank-multilingual-v3.0",
  "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": "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-06-11 05:19:31
上一页
文生视频(runway)
下一页
内容补全接口
Built with