pydo.files.content()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.files.content(file_id="a1b2c3d4-e5f6-4789-90ab-cdef12345678")
Returns JSONRaises HttpResponseError

Serverless inference methods can authenticate with a model access key instead of a DigitalOcean API token:

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
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
{
  "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 in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.