---
title: 文本排序API-文本排序-API黄页|万维易源ShowAPI
canonical_url: "https://www.showapi.com/playground/aliyun/bailian/text-sort"
last_updated: "2026-09-21T07:43:00.348Z"
meta:
  description: 阿里云百炼提供的文本排序API，基于大模型技术实现语义相关性排序，提升搜索与推荐效果，助力企业智能化升级。
  keywords: 文本排序API，语义相关性排序，阿里云百炼，大模型服务平台，API接入点
  "og:description": 阿里云百炼提供的文本排序API，基于大模型技术实现语义相关性排序，提升搜索与推荐效果，助力企业智能化升级。
  "og:title": 文本排序API-文本排序-API黄页|万维易源ShowAPI
---

*

*

*

# **文本排序**

[阿里云-大模型服务平台百炼](https://www.showapi.com/playground/aliyun/bailian)** 产品首页 [**API文档](https://bailian.console.aliyun.com/?spm=5176.29597918.nav-v2-dropdown-menu-0.d_main_0_0.60cc7ca0Jb9TKX&scm=20140722.M_10774053._.V_1&tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2780056.html) [**应用示例](https://www.showapi.com/aiapp/aliyun/bailian/text-sort.html)

**9865

2025-04-11更新

**184 [提交收录](https://www.showapi.com/island/feedback-page?submitrequire=true) [反馈问题](https://www.showapi.com/island/feedback-page?apiurl=/playground/aliyun/bailian/text-sort) [ 创建我的API](https://www.showapi.com/playground)

该API提供文本排序功能，能够根据用户需求对文本进行顺序调整，支持多种排序算法和自定义排序规则。

**基础配置**

**Token****\*****[去获取Token](https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2712195.html&renderType=iframe)

API-KEY的获取方式参考上方文档中的调用前准备

选择接入点：

**POST**

**

**Run

**接入点文档：**[查看](https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2780056.html&renderType=iframe)

Run: Ctrl+

↵

接入点描述：用于根据查询与候选文本的语义相关性进行排序

**请求参数**

**input.query****\***

query最大长度不能超过4,000个Token

**input.documents\[0]**

候选文档

**input.documents\[1]**

候选文档

**input.documents\[2]**

候选文档

**model****\***

指明需要调用的模型，仅可选择\`gte-rerank-v2\`

**parameters.top\_n**

排序返回的top文档数量，未指定时默认返回全部候选文档，如果指定的top\_n值大于输入的候选document数量，返回全部候选文档

****

**parameters.return\_documents**

返回的排序结果列表中是否返回每一条document原文，默认值False

**返回结果**

当前为示例返回

**

返回体

返回头

**使用其他软件测试API**

您可以拷贝Curl语句，直接导入Postman进行测试

**拷贝Curl语句