Jobs
Every render, whatever produced it. Job history is product-agnostic: image rendering and conversion will appear here unchanged.
List jobs, newest first
get
https://api.paperpony.dev/v1/jobsCursor pagination, never offset: a job created while you page through cannot shift the window and hide a result.
Parameters
| Name | In | Description |
|---|---|---|
limit | query | |
cursor | query | The `next_cursor` from the previous page. Opaque. |
status | query | |
product | query |
Example
curl https://api.paperpony.dev/v1/jobs?limit=20&status=succeeded \
-H "Authorization: Bearer $PAPERPONY_API_KEY"import { PaperPony } from 'paperpony';
const pony = new PaperPony({ apiKey: process.env.PAPERPONY_API_KEY });
const page = await pony.jobs.list({ limit: 20, status: 'succeeded' });
for (const job of page.data) console.log(job.id, job.credits_charged);
if (page.next_cursor) await pony.jobs.list({ cursor: page.next_cursor });import os
import requests
response = requests.get(
"https://api.paperpony.dev/v1/jobs?limit=20&status=succeeded",
headers={"Authorization": f"Bearer {os.environ['PAPERPONY_API_KEY']}"},
)
response.raise_for_status()
print(response.json())Returns
| Field | Type | Description |
|---|---|---|
datarequired | object[] | |
has_morerequired | boolean | |
next_cursorrequired | string | null |
Responses
| Status | Code | Meaning |
|---|---|---|
200 | A page of jobs. | |
401 | unauthorized · invalid_api_key | No credential, or the credential is malformed, unknown or revoked. |
422 | invalid_request | The body or the query failed validation. The message names the field. |
429 | rate_limited | Too many requests. Authenticated routes count per account, never per key. |
500 | internal_error | Unexpected failure. Quote request_id when reporting it. |
Job status and result
get
https://api.paperpony.dev/v1/jobs/{id}output_url is signed fresh on every read, so a link you fetch on day six still works, for as long as the object itself lives, which is the plan's retention.
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path |
Example
curl https://api.paperpony.dev/v1/jobs/job_01JZ3M8Q0000000000000000CD \
-H "Authorization: Bearer $PAPERPONY_API_KEY"import { PaperPony } from 'paperpony';
const pony = new PaperPony({ apiKey: process.env.PAPERPONY_API_KEY });
const job = await pony.jobs.get('job_01JZ3M8Q0000000000000000CD');
console.log(job.status);import os
import requests
response = requests.get(
"https://api.paperpony.dev/v1/jobs/job_01JZ3M8Q0000000000000000CD",
headers={"Authorization": f"Bearer {os.environ['PAPERPONY_API_KEY']}"},
)
response.raise_for_status()
print(response.json())Returns
| Field | Type | Description |
|---|---|---|
idrequired | string | |
statusrequired | "queued" | "processing" | "succeeded" | "failed" | |
productrequired | string | |
moderequired | "sync" | "async" | |
template_idrequired | string | null | |
output_urlrequired | string | null | Signed and expiring, never permanent. Signed fresh on every read of the job. |
output_bytesrequired | integer | null | |
output_expires_atrequired | string | null | When the object itself is deleted, from the plan's retention.date-time |
page_countrequired | integer | null | |
credits_chargedrequired | integer | |
credits_remainingrequired | integer | |
watermarkedrequired | boolean | |
errorrequired | object | null | |
coderequired | string | |
messagerequired | string | |
created_atrequired | string | date-time |
started_atrequired | string | null | date-time |
finished_atrequired | string | null | date-time |
Responses
| Status | Code | Meaning |
|---|---|---|
200 | The job. | |
401 | unauthorized · invalid_api_key | No credential, or the credential is malformed, unknown or revoked. |
404 | job_not_found | No route matches the path (not_found), or the resource does not exist on this account (template_not_found, job_not_found). |
422 | invalid_request | The body or the query failed validation. The message names the field. |
429 | rate_limited | Too many requests. Authenticated routes count per account, never per key. |
500 | internal_error | Unexpected failure. Quote request_id when reporting it. |
Every error uses one envelope, and every response carries an
X-Request-Id. Quote it if you report a problem.