Download the result
GET
upscalr.app/api/v1/jobs/{id}/resultRedirects to a signed URL for the upscaled image, valid for five minutes. Follow the redirect to stream the file, or ask for the URL as JSON.
Request
| Parameter | Type | Description |
|---|---|---|
| id | path, required | The job id. The job must have succeeded. |
| redirect | query | Pass false to receive the signed URL as JSON instead of a 302. |
| asset | query | result (default) or source. The original upload is downloadable too. |
curl -L https://upscalr.app/api/v1/jobs/cmrw0iqm8000bdcs3um6ii7fa/result \
-H "Authorization: Bearer $UPSCALR_API_KEY" \
-o upscaled.pngcurl needs -Lto follow the redirect; most HTTP clients follow it by default. Ruby's Net::HTTP does not, so that sample uses redirect=false instead.
Requires the jobs:read scope.
Getting the URL instead
With redirect=false the endpoint returns the signed URL as JSON, useful when a different system (a browser, a queue worker) will do the actual transfer.
curl "https://upscalr.app/api/v1/jobs/cmrw0iqm8000bdcs3um6ii7fa/result?redirect=false" \
-H "Authorization: Bearer $UPSCALR_API_KEY"Response · 200 OK
{
"url": "https://cdn.upscalr.app/results/cmrw0iqm8...png?sig=...",
"expires_in": 300,
"content_type": "image/png",
"bytes": 8412930
}Response codes
| Status | Meaning |
|---|---|
| 200 | The signed URL, when `redirect=false`. |
| 302 | Redirect to a signed URL valid for five minutes. |
| 404 | No job with that id. |
| 409 | The job has no result yet. |
Signed URLs expire after five minutes, but the result itself is retained. Request this endpoint again for a fresh link whenever you need the file.