---
title: "Download file content"
method: GET
path: "/api/files/{file_id}/content/"
tags: ["OpenAI Batch"]
---

# Download file content

`GET /api/files/{file_id}/content/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/files/{file_id}/content/`
- Auth: HTTP bearer

Download file content. Batch output files are returned as JSONL.

## Path parameters

- `file_id` string, required

## Query parameters

- `provider_id` string, required

## Response `200`

File content.

## Other responses

- `401`: You haven't added your own key for the provider in Settings › Providers, or the provider rejected it. Files and batches always run on your own key; Respan credits can't cover them.
- `403`: The API key is missing, invalid or expired.
- `404`: Not Found

## Changes

- **2026-10-21** `c30bcb383ee8`: 2 breaking, 5 info
  - the response property `error/code` became nullable for the status `401`
  - the response property `error/param` became nullable for the status `401`
  - api operation id `openAiBatch_retrieveFileContent` removed and replaced with `retrieveFileContent`
  - api tag `OpenAI Batch` added
  - …3 more
- **2026-10-02** `b830b79cfd52`: 1 breaking, 3 warning, 6 info
  - the `error` response's property type changed from `string` to `object` for status `401`
  - removed the optional property `detail` from the response with the `401` status
  - removed the optional property `error_class` from the response with the `401` status
  - removed the optional property `id` from the response with the `401` status
  - …6 more
- **2026-09-17** `6fa8242da8c2`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `RespanApiKey` was added to the API
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `retrieve-file-content` removed and replaced with `openAiBatch_retrieveFileContent`

[Operation history](https://skmtc.dev/respan/apis/respan-api/changes/api/files/:file_id/content/get.md)

---

[API](https://skmtc.dev/respan/apis/respan-api.md) - [All operations](https://skmtc.dev/respan/apis/respan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/respan/apis/respan-api/revisions/900841387635?raw)
