---
title: pydo.files.content()
description: Get Batch Inference Results Download Links
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/inference/get_batch_results/
last_updated: "2026-08-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.files.content()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.files.content(file_id="a1b2c3d4-e5f6-4789-90ab-cdef12345678")
```

Returns `JSON`Raises `HttpResponseError`

Serverless inference methods can authenticate with a [model access key](https://docs.digitalocean.com/products/inference/how-to/manage-model-access-keys/index.html.md) instead of a DigitalOcean API token:

```python
client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))
```

## Description

Returns short-lived presigned download URLs for the output (and optional error sidecar) of a completed batch job. If results are not yet ready, the response sets `result_available: false` or returns `412 Precondition Failed`; in both cases, keep polling batch status and retry.

Download the artifacts soon after fetching — the URLs are short-lived. Result files themselves are retained for up to 30 days after the job completes, after which they are deleted.

## Parameters

`file_id` string required

The file ID, typically read from `batch.output_file_id` on a completed batch.

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))

resp = client.files.content(file_id=batch.output_file_id)
print(resp.text)
```

## Response Example

## Show Response Example

```json
{
  "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21",
  "result_available": true,
  "output_file_url": "https://batch-inference.nyc3.digitaloceanspaces.com/outputs/0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21.jsonl?X-Amz-Signature=...",
  "error_file_url": "string",
  "expires_at": "2026-04-24T20:19:19Z"
}
```

## More Information

See [`/v1/batches/{batch_id}/results`](https://docs.digitalocean.com/reference/api/reference/batch-inference/index.html.md#inference_get_batch_results) in the API reference for additional detail on responses, headers, parameters, and more.