GET Download Job File

Download a file artifact produced by a Wire task

GEThttps://api.anakin.io/v1/wire/jobs/{id}/download

Download a file produced by a completed Wire task, for actions that return a file (e.g. a PDF) rather than inline JSON. When a result is a file, GET /jobs/{id} returns data: null with a files manifest; this endpoint streams the actual bytes.

The response body is the file — not JSON. It sets Content-Type and Content-Disposition: attachment; filename="…". Write it to disk; do not JSON-parse a successful response.


Path Parameters

ParameterTypeDescription
id requiredstringThe job ID returned from POST /v1/wire/task

Query Parameters

ParameterTypeDescription
filestringFor a multi-file result, the name of the file to download (from the files manifest in GET /jobs/{id}). Omit to stream the primary file.

Response — Success

200 OK

The raw file bytes, with headers describing the file:

Content-Type: application/pdf
Content-Disposition: attachment; filename="statement-2026-07-15.pdf"
Content-Length: 128623

Response — Error

400 Bad Request

Errors are returned as JSON (only the success body is binary), so branch on the status code before treating the body as a file:

{
  "status": "error",
  "error": { "code": "NO_DOWNLOAD", "message": "Result is not available for download." }
}

Error Responses

CodeHTTPWhen
NO_DOWNLOAD400The job has no downloadable result, or ?file=<name> doesn't match any file in the manifest
NOT_FOUND404The job doesn't exist, or belongs to another user

Multi-file results

A job can return more than one file. List them from GET /jobs/{id} (files), then download each by name:

curl "https://api.anakin.io/v1/wire/jobs/{id}/download?file=statement.pdf" -H "X-API-Key: your_api_key" -o statement.pdf
curl "https://api.anakin.io/v1/wire/jobs/{id}/download?file=usage.csv"     -H "X-API-Key: your_api_key" -o usage.csv

Code Examples

curl https://api.anakin.io/v1/wire/jobs/7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c/download \
  -H "X-API-Key: your_api_key" \
  -o result.pdf