---
title: 上传文件-OpenAI兼容-File-API黄页|万维易源ShowAPI
canonical_url: "https://www.showapi.com/playground/aliyun/bailian/openai-file"
last_updated: "2026-09-20T15:37:03.901Z"
meta:
  description: 阿里云百炼平台提供OpenAI兼容的文件上传接口，支持qwen-long模型文档分析与Batch推理服务，高效获取file_id，简化AI工作流程。
  keywords: 阿里云大模型，百炼平台，OpenAI兼容API，文件上传接口，qwen-long模型
  "og:description": 阿里云百炼平台提供OpenAI兼容的文件上传接口，支持qwen-long模型文档分析与Batch推理服务，高效获取file_id，简化AI工作流程。
  "og:title": 上传文件-OpenAI兼容-File-API黄页|万维易源ShowAPI
---

*

*

*

# **OpenAI兼容-File**

[阿里云-大模型服务平台百炼](https://www.showapi.com/playground/aliyun/bailian)** 产品首页 [**API文档](https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2833610.html) [**应用示例](https://www.showapi.com/aiapp/aliyun/bailian/openai-file.html)

**8639

2025-04-11更新

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

该API提供了文件上传、管理和处理的接口，支持多种文件格式，适用于需要文件处理的AI应用场景。用户可以通过该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%2F2833610.html&renderType=iframe)

Run: Ctrl+

↵

接入点描述：当您使用qwen-long模型分析文档，或使用Batch推理服务时，需要使用上传文件接口获取file\_id，通过purpose参数指定上传文件的用途。

**请求参数**

**file****\***

待上传的文件

**

拖动文件到此，或点击上传

**purpose****\***

上传文件的用途，可选值为 'file-extract' 或 'batch'

**返回结果**

当前为示例返回

**

返回体

返回头

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

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

**拷贝Curl语句