> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olostep.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取文件内容

> 下载已完成文件的内容。返回 JSON 文件内容。



## OpenAPI

````yaml zh/openapi/files.json GET /v1/files/{file_id}/content
openapi: 3.0.3
info:
  title: 文件 API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/files/{file_id}/content:
    get:
      summary: 通过 ID 获取文件对象。
      description: >-
        获取一个预签名的 URL 以下载已完成文件的内容。可以选择使用 `expires_in` 查询参数指定下载 URL 的过期时间（默认为 600
        秒 / 10 分钟）。
      parameters:
        - name: file_id
          in: path
          required: true
          description: 要下载文件的唯一标识符。
          schema:
            type: string
        - name: expires_in
          in: query
          required: false
          description: 下载 URL 过期前的秒数。默认为 600 秒（10 分钟）。
          schema:
            type: integer
            default: 600
      responses:
        '200':
          description: 成功响应并返回下载 URL。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 文件 ID
                  object:
                    type: string
                    description: 对象类型。此端点为 "file"。
                  created:
                    type: integer
                    description: 创建的纪元时间戳
                  filename:
                    type: string
                    description: 上传文件的文件名
                  bytes:
                    type: integer
                    description: 文件大小（字节）
                  download_url:
                    type: string
                    format: uri
                    description: 用于下载文件的预签名 URL。在指定的 `expires_in` 时间后过期。
                  expires_in:
                    type: integer
                    description: 下载 URL 过期前的秒数。
        '400':
          description: 错误请求。文件未完成。
        '401':
          description: 无效的 API 密钥
        '404':
          description: 文件未找到
        '500':
          description: 内部服务器错误
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: Bearer认证头格式为Bearer <token>，其中<token>是你的认证令牌。

````