Studio is part of Prodigi, the global print on demand platform.

Create photo books with the Studio API

Create books from Studio templates, then render immutable files for review and controlled order-integration testing. The export response supplies the ID and source digest automatically.

How the API integration works

  1. 1. Authenticate securely

    Use your existing merchant API key in X-API-Key from your backend. Keep it out of browser code.

  2. 2. Create and export

    Create the book, then call /exports directly with a stable idempotency key. Save id and binding.resolvedSha256 from its manifest.

  3. 3. Review and test

    Check integration-test readiness and use /test-assets for fresh download links. Production certification and physical print approval remain separate.

Use images already in your website or app

Your backend sends a published template ID and image URLs to POST /v1/books. Studio downloads and stores a copy of each image, then returns the new book ID and status. Placements and issues come from the book's preflight or its export manifest. Read the template contract first for its required image count, text fields and slot IDs.

Use HTTPS URLs that Studio can fetch without browser cookies or custom authentication headers. Private photos can use signed URLs that remain valid during import. Images must be JPEG, PNG or WebP, at most 50 MB each, and at least 200 × 200 pixels. Keep your Prodigi API key on your server.

curl --request POST 'https://studio.prodigi.com/v1/books' \
  --header "X-API-Key: $PRODIGI_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: customer-book-123' \
  --data '{
    "templateId": "your-published-template-id",
    "images": [
      { "clientId": "photo-001", "sourceUrl": "https://images.example.com/photo-001.jpg" },
      { "clientId": "photo-002", "sourceUrl": "https://images.example.com/photo-002.jpg" }
    ],
    "text": { "cover.title": "Our summer" },
    "externalReference": "customer-book-123"
  }'

# Example URLs and content above are placeholders.
# Supply the image count and text required by your published template.
# Save the returned id as bookId for /v1/books/{bookId}/exports.
# Reuse the same idempotency key and request body when retrying this creation.

This creates a book through the server API; the embedded visual editor cannot open it. To preload images into the embedded editor instead, pass the same image URLs to embed.js in the browser, with no API key.

API example

// Run on your server with your existing merchant API key.
// Create the book first, then render/freeze it in this single call.
const API_BASE_URL = 'https://studio.prodigi.com';
const bookId = process.env.STUDIO_BOOK_ID;
const headers = {
  'X-API-Key': process.env.PRODIGI_API_KEY,
  'Content-Type': 'application/json',
};

// Persist a stable key for this book revision and destination.
// Reuse this key AND body after a lost response; do not generate a new key.
const exportKey = process.env.STUDIO_EXPORT_KEY;
if (!bookId || !headers['X-API-Key'] || !exportKey) {
  throw new Error('Set STUDIO_BOOK_ID, PRODIGI_API_KEY and STUDIO_EXPORT_KEY');
}
const exportResponse = await fetch(`${API_BASE_URL}/v1/books/${bookId}/exports`, {
  method: 'POST',
  headers: { ...headers, 'Idempotency-Key': exportKey },
  body: JSON.stringify({
    purpose: 'review',
    destinationCountryCode: 'GB', // Use the intended destination; state if needed.
  }),
});

if (!exportResponse.ok) {
  // Reconcile failures via GET /v1/operations/export/{exportKey}.
  // Its completed response is the manifest; resourceId is the export ID.
  throw new Error(`Studio export failed: ${exportResponse.status}`);
}
const manifest = await exportResponse.json();
const exportId = manifest.id;
const resolvedSha256 = manifest.binding.resolvedSha256;
// Persist the manifest with the book revision. No /render call is needed.

if (!manifest.readiness.isIntegrationTestReady) {
  throw new Error('Review the export preflight report before testing');
}
const testAssetsResponse = await fetch(
  `${API_BASE_URL}/v1/exports/${exportId}/test-assets`,
  {
    method: 'POST',
    headers,
    body: JSON.stringify({ expectedResolvedSha256: resolvedSha256 }),
  }
);
if (!testAssetsResponse.ok) throw new Error('Test asset handoff failed');
const testAssets = await testAssetsResponse.json();
// URLs expire in ten minutes: keep them out of persistent logs.
// Verify downloaded SHA-256 against manifest.artifacts before test use.
// default: combined PDF page count, including covers; spine: omit pageCount.
// This creates no order/payment and does not certify production readiness.

Reference documentation

Endpoint details for building and troubleshooting your Studio integration. Deployed calls use the merchant's own Prodigi API key in X-API-Key; the server resolves the merchant from that key.

Download OpenAPI YAMLOpenAPI JSON

Render once and keep the export manifest

After creating a book, call /v1/books/{bookId}/exports directly. Save the returned id and binding.resolvedSha256 with your book revision. The digest identifies the resolved source; each artifact has its own PDF hash.

Export keys accept 1–128 letters, digits or ._:- and are scoped to the merchant and operation kind. The same key and equivalent request replay the saved result; changed input returns 409 idempotency_conflict. Recover a lost response through /v1/operations/export/{key}. There is no book-to-latest-export lookup.

Check readiness.isIntegrationTestReady before requesting test assets. After the controlled test, promote that exact export with its ID, resolved hash and destination. A successful promotion returns profile: studio-mhk-production-v1 and preserves the reviewed bytes; complete ISO certification and physical output remain outside that bounded profile.

For every supported print profile, use both combined/default and spine PDFs. The combined PDF includes front/back covers: use its returned PDF page count on default and omit pageCount on spine. Request bounded production URLs through /production-handoff, keep them server-side and verify file hashes before use.

GET/v1/templates/{templateId}
Auth required

Retrieve the published template contract, including derived product details, required image/text slots, page rules and placement behaviour.

Parameters

templateIdstring
required
Published template identifier

Returns: ApiTemplateResponse

POST/v1/books
Auth required

Create a book from a template, source images, text and optional placement hints. The template supplies the product SKU.

Parameters

bodyApiCreateBookRequest
required
Template ID, images, text and optional placements

Returns: ApiBookResponse

GET/v1/books/{bookId}
Auth required

Retrieve book status, image placements, source-content preflight and the latest legacy review PDF. Immutable export metadata is returned by /exports instead.

Returns: ApiBookResponse

POST/v1/books/{bookId}/preflight
Auth required

Check source content and return blocking issues and review warnings. canProceed permits rendering; it does not certify exported files.

Returns: ApiPreflightResponse

POST/v1/books/{bookId}/exports
Auth required

Render and freeze an immutable review export, or promote an exact measured passing review export without re-rendering. Returns id, binding.resolvedSha256, artifacts and readiness.

Parameters

Idempotency-Keyheader
required
Stable key per book revision and destination. Reuse the same key and body for retries.
bodyApiExportRequest
required
Review: destinationCountryCode and optional state. Production: sourceExportId, exact expectedResolvedSha256 and matching destination/state.

Returns: 201 ApiExportResponse; Location: /v1/exports/{id}

GET/v1/exports/{exportId}
Auth required

Retrieve the saved immutable manifest, including its source binding, artifact hashes and readiness. Use the id returned by export creation.

Returns: ApiExportResponse

GET/v1/operations/export/{key}
Auth required

Recover an export after a lost response using its Idempotency-Key. Returns status, resourceId and the completed response manifest. Reconcile in-progress or failed operations before creating a replacement.

Returns: ApiOperation

GET/v1/exports/{exportId}/artifacts/{role}
Auth required

Download exact immutable PDF bytes using the same merchant authentication. Match their SHA-256 against the manifest; these authenticated paths are not fulfilment URLs.

Returns: application/pdf binary

POST/v1/exports/{exportId}/preflight
Auth required

Inspect the exact stored files and source/measurement bindings, retaining a hash-bound report. The supported checks do not establish full PDF/X-4 certification.

Returns: ApiArtifactPreflightReport

POST/v1/exports/{exportId}/test-assets
Auth required

Recheck a measured export and issue ten-minute, read-only HTTPS URLs when supported checks pass. Keep URLs out of persistent logs; no order or payment is created.

Parameters

bodyApiExportTestAssetsRequest
required
expectedResolvedSha256 from the manifest binding.

Returns: ApiExportTestAssetsResponse

POST/v1/exports/{exportId}/order-preview
Auth required

Build a dry-run payload from both immutable files. It verifies hashes and proposes asset counts, leaves fulfilment URLs null and cannot submit an order.

Parameters

Idempotency-Keyheader
required
Proposed future logical order key; the preview does not reserve it.

Returns: ApiOrderPreviewResponse

POST/v1/exports/{exportId}/production-handoff
Auth required

Recheck an exact promoted production export and issue bounded HTTPS URLs for combined/default and separate spine. The contract is SKU-based and never creates or submits an order.

Parameters

bodyApiProductionHandoffRequest
required
Exact expectedResolvedSha256 and the matching destinationCountryCode/state.

Returns: ApiProductionHandoffResponse

POST/v1/books/{bookId}/render
Auth required

Legacy: generate the latest mutable combined review PDF. Returns no immutable export ID or resolved-source digest. Use /exports for the review and integration-test workflow.

Returns: ApiRenderResponse

GET/v1/books/{bookId}/artifacts/pdf
Auth required

Legacy: download the latest mutable review PDF. This is not the immutable export artifact path.

Returns: application/pdf binary

POST/v1/books/{bookId}/orders
Auth required

Legacy order intent for merchant-owned checkout. This path does not consume the immutable combined/spine export and is separate from controlled integration testing.

Returns: Order in AwaitingPayment state

POST/v1/orders/{orderId}/submit
Auth required

Confirm a completed checkout and submit the paid order to print.

Returns: Order in Paid or Submitted state

GET/v1/orders/{orderId}
Auth required

Retrieve checkout and print-submission status.

Returns: Order object

Other guides