PaperPony

Jobs

Every render, whatever produced it. Job history is product-agnostic: image rendering and conversion will appear here unchanged.

List jobs, newest first

gethttps://api.paperpony.dev/v1/jobs

Cursor pagination, never offset: a job created while you page through cannot shift the window and hide a result.

Parameters

NameInDescription
limitquery
cursorqueryThe `next_cursor` from the previous page. Opaque.
statusquery
productquery

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

listJobs response
FieldTypeDescription
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Responses

StatusCodeMeaning
200A page of jobs.
401unauthorized · invalid_api_keyNo credential, or the credential is malformed, unknown or revoked.
422invalid_requestThe body or the query failed validation. The message names the field.
429rate_limitedToo many requests. Authenticated routes count per account, never per key.
500internal_errorUnexpected failure. Quote request_id when reporting it.

Job status and result

gethttps://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

NameInDescription
idrequiredpath

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

getJob response
FieldTypeDescription
idrequiredstring
statusrequired"queued" | "processing" | "succeeded" | "failed"
productrequiredstring
moderequired"sync" | "async"
template_idrequiredstring | null
output_urlrequiredstring | nullSigned and expiring, never permanent. Signed fresh on every read of the job.
output_bytesrequiredinteger | null
output_expires_atrequiredstring | nullWhen the object itself is deleted, from the plan's retention.date-time
page_countrequiredinteger | null
credits_chargedrequiredinteger
credits_remainingrequiredinteger
watermarkedrequiredboolean
errorrequiredobject | null
coderequiredstring
messagerequiredstring
created_atrequiredstringdate-time
started_atrequiredstring | nulldate-time
finished_atrequiredstring | nulldate-time

Responses

StatusCodeMeaning
200The job.
401unauthorized · invalid_api_keyNo credential, or the credential is malformed, unknown or revoked.
404job_not_foundNo route matches the path (not_found), or the resource does not exist on this account (template_not_found, job_not_found).
422invalid_requestThe body or the query failed validation. The message names the field.
429rate_limitedToo many requests. Authenticated routes count per account, never per key.
500internal_errorUnexpected 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.