Orsnap

API reference

Orsnap Render API

Render templates to PNG, JPEG, WebP, PDF or MP4 with account API keys.

Version 1.0.0 · OpenAPI 3.1.0 · Base URL /

Authentication

Create a key in the Developers console, then send it on every request as a Bearer token. Keys are shown once; store them in your secret manager. Session cookies are never accepted by this API.

curl https://your-studio-host/api/v1/templates \
  -H "Authorization: Bearer os_live_..."

Each key may make 60 requests per minute; a 429 response carries Retry-After in seconds. Every response includes an X-Request-Id header and a requestId field you can quote to support.

Endpoints

7 operations across 7 paths. Examples and field definitions below come from the OpenAPI document that this page and /api/openapi.json share.

POST/api/v1/renders

Create a render

Starts a render for one template version or draft revision. In sync mode the response waits for the render (up to 25 seconds) and returns 200 with the files; if it is still running, the response is 202 with a Location header to poll. In async mode the response is always 202. The same Idempotency-Key with the same body replays the original response; a different body returns 409 IDEMPOTENCY_CONFLICT. MP4 uses the selected template's saved animation by default. Send animation overrides to customize this render.

SDK studio.render(input) / studio.renderAsync(input)

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstring · ^[a-zA-Z0-9_-]{16,100}$Unique key of 16-100 characters from A-Z, a-z, 0-9, underscore or hyphen. A UUID works. Retries of the same request must reuse the key.

Request body RenderRequest

Render page 1 with two text overrides

{
  "templateId": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
  "version": 4,
  "modifications": {
    "headline": "Spring launch",
    "price": "42"
  },
  "output": {
    "format": "png",
    "scale": 2,
    "pages": [
      1
    ]
  }
}

Queue an MP4 with request-only animation overrides

{
  "templateId": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
  "version": 4,
  "mode": "async",
  "modifications": {
    "headline": "Spring launch",
    "price": "42"
  },
  "output": {
    "format": "mp4",
    "pages": [
      1
    ]
  },
  "animation": {
    "pages": [
      {
        "page": 1,
        "preset": "cinema-cut",
        "focus": "headline",
        "durationMs": 3600
      }
    ]
  }
}

Queue a PDF render and notify a webhook

{
  "templateId": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
  "version": 4,
  "mode": "async",
  "webhookId": "e8c4a1d6f3b9e2a5c7d0f4b8a6e1c3d9",
  "output": {
    "format": "pdf"
  }
}

Responses

200The render finished before the sync wait elapsed.
Example response
{
  "data": {
    "id": "g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1",
    "status": "succeeded",
    "format": "png",
    "pages": 1,
    "credits": {
      "available": 980,
      "reserved": 0,
      "spent": 20
    },
    "files": [
      {
        "id": "f4a2c6e8b0d1f3a5c7e9b2d4f6a8c0e1",
        "name": "spring-launch-poster-1.png",
        "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "size": 184320,
        "width": 1200,
        "height": 1600,
        "page": 1,
        "url": "/api/v1/renders/g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1/files/f4a2c6e8b0d1f3a5c7e9b2d4f6a8c0e1?token=v1.4f2c...",
        "expiresAt": "2026-11-24T13:40:00.000Z"
      }
    ]
  },
  "requestId": "2b7e1516-28ae-4b7d-9c3a-6f1e2d4c5b6a"
}
202The render is queued or running. Poll the Location header or GET /api/v1/renders/{id}.
Example response
{
  "data": {
    "id": "g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1",
    "status": "running"
  },
  "requestId": "2b7e1516-28ae-4b7d-9c3a-6f1e2d4c5b6a"
}
400The body or idempotency key is malformed.
INVALID_JSONREQUEST_TOO_LARGEINVALID_REQUESTIDEMPOTENCY_KEY_REQUIREDIDEMPOTENCY_KEY_INVALID
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
402The account has no credits left for this render.
INSUFFICIENT_CREDITS
409The idempotency key or the pinned template version conflicts with current state.
IDEMPOTENCY_CONFLICTSOURCE_CHANGEDREVISION_CONFLICT
422The render input is invalid or the render failed. `error.issues` names the offending fields; `error.detail` carries the renderer code for RENDER_FAILED.
UNKNOWN_PARAMETERMISSING_PARAMETERINVALID_PARAMETERINVALID_INPUTOUTPUT_LIMITINVALID_PAGEINVALID_CALLBACK_URLINVALID_WEBHOOKRENDER_FAILED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/renders/{id}

Get a render

Returns the current state of a render created by the calling key. Succeeded renders include fresh file links; a render still in flight returns 202 with a Location header. File URLs are short-lived and reissued by this call.

SDK studio.getRender(id)

Parameters

NameInTypeDescription
id requiredpathstring · ^g[a-f0-9]{32}$Render id returned by POST /api/v1/renders.

Responses

200The render succeeded; files are ready to download.
Example response
{
  "data": {
    "id": "g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1",
    "status": "succeeded",
    "format": "pdf",
    "pages": 2,
    "credits": {
      "available": 980,
      "reserved": 0,
      "spent": 20
    },
    "files": [
      {
        "id": "f4a2c6e8b0d1f3a5c7e9b2d4f6a8c0e1",
        "name": "spring-launch.pdf",
        "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "size": 512000,
        "width": 1200,
        "height": 1600,
        "page": 1,
        "url": "/api/v1/renders/g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1/files/f4a2c6e8b0d1f3a5c7e9b2d4f6a8c0e1?token=v1.4f2c...",
        "expiresAt": "2026-11-24T13:40:00.000Z"
      }
    ]
  },
  "requestId": "2b7e1516-28ae-4b7d-9c3a-6f1e2d4c5b6a"
}
202The render is queued or running.
Example response
{
  "data": {
    "id": "g9b1c3d5e7f2a4b6c8d0e1f3a5b7c9d1",
    "status": "queued"
  },
  "requestId": "2b7e1516-28ae-4b7d-9c3a-6f1e2d4c5b6a"
}
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
404No render with this id belongs to the calling key.
NOT_FOUND
410The render's files passed their retention window.
FILE_EXPIRED
422The render reached a failed terminal state.
RENDER_FAILED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/renders/{id}/files/{fileId}

Download a render file

Streams one rendered file. Authentication uses the Bearer key plus the short-lived `token` query parameter from the file URL. Expired links return 403 or 410; render again for fresh files.

SDK GET file.url with the same Bearer key

Parameters

NameInTypeDescription
id requiredpathstring · ^g[a-f0-9]{32}$Render id.
fileId requiredpathstringFile id from the render payload.
token requiredquerystringDownload token embedded in the file `url`.

Responses

200The file bytes.
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
403The download token is missing or does not match this file.
DOWNLOAD_TOKEN_INVALID
404No such render file belongs to the calling key.
NOT_FOUND
410The file passed its retention window.
FILE_EXPIRED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/templates

List templates

Lists the calling account's templates with their published version. Pass `nextCursor` back unchanged to read the next page.

SDK studio.templates({ limit, cursor })

Parameters

NameInTypeDescription
limitqueryinteger · default 20Page size.
cursorquerystring`nextCursor` from the previous page.

Responses

200One page of templates.
Example response
{
  "data": [
    {
      "id": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
      "name": "Spring launch poster",
      "width": 1200,
      "height": 1600,
      "pages": 2,
      "revision": 7,
      "publishedVersion": 4
    }
  ],
  "nextCursor": "eyJvZmZzZXQiOjF9"
}
400The cursor or a query parameter is invalid.
INVALID_CURSORINVALID_REQUEST
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/templates/{id}

Get a template contract

Returns the template summary plus its parameter contract. Send exactly one of `version` (published) or `revision` (draft). The contract lists every accepted `modifications` key, its kind, default and enum options.

SDK studio.template(id, { version, revision })

Parameters

NameInTypeDescription
id requiredpathstring · ^t[a-f0-9]{32}$Template id from GET /api/v1/templates.
versionqueryintegerPublished version to read. Mutually exclusive with `revision`.
revisionqueryintegerDraft revision to read. Mutually exclusive with `version`.

Responses

200The template summary, parameter contract, and animation defaults and layer IDs.
Example response
{
  "id": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
  "name": "Spring launch poster",
  "width": 1200,
  "height": 1600,
  "pages": 2,
  "revision": 7,
  "publishedVersion": 4,
  "animation": {
    "pages": [
      {
        "page": 1,
        "id": "p1",
        "durationMs": 5360,
        "preset": "cinema-cut",
        "focus": "headline",
        "layers": [
          {
            "id": "headline",
            "type": "text",
            "parentId": null,
            "label": "Headline",
            "motion": null
          }
        ]
      },
      {
        "page": 2,
        "id": "p2",
        "durationMs": 4000,
        "preset": null,
        "layers": []
      }
    ]
  },
  "contract": {
    "templateId": "t3f9a2c7d1e84b6f0a5c9d3e7b2f8a41",
    "version": {
      "kind": "published",
      "version": 4,
      "revision": 7,
      "documentSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    "pages": [
      {
        "id": "p1",
        "alias": "page1",
        "name": "Cover",
        "index": 0
      },
      {
        "id": "p2",
        "alias": "page2",
        "name": "Details",
        "index": 1
      }
    ],
    "parameters": [
      {
        "key": "headline",
        "label": "Headline",
        "kind": "string",
        "type": "text",
        "required": true,
        "defaultValue": "Spring launch",
        "pageId": "p1",
        "pageAlias": "page1",
        "pageName": "Cover"
      },
      {
        "key": "price",
        "label": "Price",
        "kind": "string",
        "type": "text",
        "required": false,
        "defaultValue": "42",
        "pageId": "p1",
        "pageAlias": "page1",
        "pageName": "Cover"
      }
    ]
  }
}
400Exactly one of version or revision is required.
INVALID_REQUEST
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
404No template with this id belongs to the calling key.
NOT_FOUND
409The requested revision is not the template's current revision.
REVISION_CONFLICTSOURCE_CHANGED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/logs

List render logs

Lists the renders created by the calling key, newest first. `nextCursor` is null on the last page.

SDK studio.logs({ limit, cursor })

Parameters

NameInTypeDescription
limitqueryinteger · default 20Page size between 1 and 100.
cursorquerystring`nextCursor` from the previous page.

Responses

200One page of render logs.
Example response
{
  "data": [
    {
      "id": "r7c1e3a5b9d2f4c6e8a0b1d3f5c7e9a2b",
      "status": "succeeded",
      "format": "png",
      "pages": 1,
      "createdAt": "2026-11-17T13:40:00.000Z",
      "durationMs": 1840,
      "errorCode": null
    }
  ],
  "nextCursor": null
}
400The cursor or a query parameter is invalid.
INVALID_CURSORINVALID_REQUEST
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE
GET/api/v1/webhooks

List webhook deliveries

Lists delivery attempts for the calling account's webhook endpoints, newest first. Endpoints are created, disabled and redelivered in the session-only Webhooks screen; this API only reads delivery history.

SDK studio.webhooks({ limit })

Parameters

NameInTypeDescription
limitqueryinteger · default 20Number of deliveries to return, between 1 and 100.

Responses

200Recent webhook delivery attempts.
Example response
{
  "data": [
    {
      "id": "w1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b",
      "requestId": "2b7e1516-28ae-4b7d-9c3a-6f1e2d4c5b6a",
      "url": "https://example.com/hooks/studio",
      "event": "render.succeeded",
      "attempts": 1,
      "deliveredAt": "2026-11-17T13:40:02.000Z",
      "lastError": null,
      "createdAt": "2026-11-17T13:40:00.000Z"
    }
  ]
}
400A query parameter is invalid.
INVALID_REQUEST
401The Bearer key is missing, unknown or revoked.
API_KEY_REQUIREDAPI_KEY_INVALIDAPI_KEY_REVOKED
429The key passed 60 requests in one minute.
RATE_LIMITED
503A dependency is briefly unavailable; retry with backoff.
SERVICE_UNAVAILABLE

Errors

Failures share one envelope: {"error":{"code":"...","message":"...","issues":[...]},"requestId":"..."}. Branch on code, not on the HTTP status alone; issues names the fields that need fixing.

CodeStatusMeaningFix
API_KEY_REQUIRED401No Bearer token was sent.Send Authorization: Bearer <key>.
API_KEY_INVALID401The key is unknown or malformed.Create a key in the Developers console, or copy the one shown once at creation. Keys start with os_live_.
API_KEY_REVOKED401The key was revoked.Create a new key in the Developers console.
IDEMPOTENCY_KEY_REQUIRED400The Idempotency-Key header is missing.Send a unique key of 16-100 letters, digits, underscores or hyphens.
IDEMPOTENCY_KEY_INVALID400The Idempotency-Key header has the wrong shape.Use 16-100 letters, digits, underscores or hyphens.
IDEMPOTENCY_CONFLICT409The same Idempotency-Key was reused with a different body.Use a new Idempotency-Key for a different request.
INVALID_JSON400The body is not a JSON object.Send Content-Type: application/json with an object body.
REQUEST_TOO_LARGE400The body is larger than 512 KB.Trim modifications or split the request.
INVALID_REQUEST400A field or query parameter is not supported.Remove unknown fields; only the documented ones are accepted.
INVALID_CURSOR400The pagination cursor cannot be decoded.Start again without a cursor and follow nextCursor.
INSUFFICIENT_CREDITS402The account has no credits left for this render.Wait for the monthly allowance to reset or add credits in Billing.
UNKNOWN_PARAMETER422A modification key does not exist on this template.Read the contract from GET /api/v1/templates/:id first.
MISSING_PARAMETER422A required parameter was not supplied.Send every parameter whose contract entry says required.
INVALID_PARAMETER422A value does not match its declared kind.Numbers, colours (#rrggbb), links and enum options must match the contract.
INVALID_INPUT422The request body is structurally invalid.Read issues[].field in the response.
OUTPUT_LIMIT422The render exceeds a duration, pixel or credit limit.Select fewer pages or shorten the animation. MP4 is limited to 30 seconds.
INVALID_PAGE422output.pages references a page this template does not have.Ask for pages 1 to contract.pages.length.
INVALID_CALLBACK_URL422callbackUrl is not a public https endpoint.Use https on port 443 with a publicly resolvable host.
INVALID_WEBHOOK422webhookId is unknown, belongs to another account, or the endpoint is disabled.Pick an active endpoint in Webhooks, or send callbackUrl instead.
SOURCE_CHANGED409The template changed after the request was prepared.Send the request again with the current revision.
REVISION_CONFLICT409revision does not match the template any more.Read the template again and retry.
RENDER_FAILED422The render reached a failed terminal state.Check error.detail for the renderer code; retry with a new Idempotency-Key.
FILE_EXPIRED410The rendered files passed their retention window.Render again to get fresh files.
DOWNLOAD_TOKEN_INVALID403The download token is missing, invalid or expired.Use the url returned by the latest response.
NOT_FOUND404The render or template does not belong to this key.Check the id and use the key that created it.
RATE_LIMITED429The key passed 60 requests in one minute.Wait for Retry-After seconds.
SERVICE_UNAVAILABLE503A dependency is briefly unavailable.Retry with backoff.

SDK

@studio/sdk is a zero-dependency Node 20+ client for these endpoints. It sends the Bearer token, generates an Idempotency-Key per render, applies a 30 second timeout and unwraps response data.

The package lives in this repository at packages/sdk and is not published to npm yet, so depend on it through the workspace instead of the registry.

{
  "dependencies": { "@studio/sdk": "workspace:*" }
}
import { createClient } from '@studio/sdk';

const studio = createClient({ apiKey: process.env.STUDIO_API_KEY! });
const { data: templates } = await studio.templates();
const run = await studio.render({ templateId: templates[0].id });

Non-2xx answers reject with StudioApiError (status, code, message, issues, requestId, retryAfter); transport failures and timeouts reject with StudioNetworkError. Pass idempotencyKey to replay a render deliberately, or timeoutMs to change the deadline.

Create an API key in the Developers console and download the ready-to-run example project from the same page.