Get Task Agent Run File

Download a file associated with a TaskAgentRun. Files include uploads submitted with the run and files generated by Task tools during the run. The file is served with appropriate content type headers for inline viewing or download based on the `inline` parameter. `file_name` is the `stored_filename` from the run's `files` array, not the name the caller uploaded. Each entry there also carries a ready-made `download_url` for this endpoint, and a `source` of `input` or `output` saying which side of the run produced it. The response carries the stored file's own content type — a `.txt` attachment comes back as `text/plain`, not as an opaque byte stream — and a `Content-Disposition` header naming the stored file.

Authentication

AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

OR
AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

Path parameters

org_idstringRequiredformat: "uuid"
The organization ID
project_idstringRequiredformat: "uuid"
The project ID
task_agent_idstringRequiredformat: "uuid"
The task agent ID
run_idstringRequiredformat: "uuid"
The task agent run ID
file_namestringRequired
The stored file name to fetch.

Query parameters

inlinebooleanOptionalDefaults to false
If true, serve file inline instead of as attachment

Response headers

Content-DispositionstringOptional

attachment; filename="<stored_filename>", or inline; filename="<stored_filename>" when inline=true.

Content-TypestringOptional
The stored file's own media type.

Response

File content returned successfully

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error