PlotToFilm

Developer API

Use a scoped workspace token for server-side requests. Register a product, create a storyboard, quote candidate images, then confirm the exact amount.

Member image and video API

Paid workspaces can use the image and video APIs with their own verified provider keys. The provider bills your account directly. Approve the first frame in Studio before quoting video.

Connect a provider

Create a scoped API key in Developer Settings. Read the project revision and shot IDs, then quote the model. Review the supplier estimate before confirming with a separate idempotency key. Poll the batch for download links.

GET /api/v1/projects/{projectId}/image-status
POST /api/v1/projects/{projectId}/images
GET /api/v1/projects/{projectId}/image-status?batchId={batchId}

GET /api/v1/projects/{projectId}/video-status
POST /api/v1/projects/{projectId}/videos
GET /api/v1/projects/{projectId}/video-status?batchId={batchId}
Authorization: Bearer <ptf_live_key>
Idempotency-Key: <unique-action-id>

{"action":"quote","expectedRevision":1,"shotIds":["<shotId>"],"modelSelection":{"provider":"<provider>","modelId":"<modelId>"}}

{"action":"confirm","quoteId":"<quoteId>","authorizedMicrocredits":"0"}

Create a storyboard with cURL

In an Agency API workspace, create a token with projects:write and projects:read. Set PLOTTOFILM_API_KEY in your server environment and PRODUCT_VERSION_ID to an existing SKU version. The example uses a POSIX shell and jq.

API="https://plottofilm.com/api/v1"
OPERATION_ID="order-123.storyboard.v1"
jq -n --arg sku "$PRODUCT_VERSION_ID" --arg brief "Show the product in everyday use, followed by a close-up of the packaging." '{productVersionId:$sku, brief:$brief, placement:"9:16", duration:15, language:"en"}' |
  curl --fail-with-body "$API/projects/product-ad" \
    -H "Authorization: Bearer $PLOTTOFILM_API_KEY" \
    -H "Idempotency-Key: $OPERATION_ID" \
    -H "Content-Type: application/json" --data-binary @-

Save one operation ID per brief. Retry a failed connection using the same ID and body. Use a new ID for a new brief, a quote, or a confirmation.

To register a new SKU, request an image upload, PUT the bytes to its signed URL using the returned headers, then finalize the upload. Pass each returned referenceImageUrl to assets/products. Its data.id is the productVersionId.

POST /api/v1/assets/uploads
PUT  <data.url>
POST /api/v1/assets/uploads/{uploadId}/finalize
POST /api/v1/assets/products

Quote and approve candidate images

Read the project revision and shot IDs. Send action=quote to the candidates endpoint with expectedRevision and shotIds. Show the returned funding, model and authorizedMicrocredits to the approver. After approval, send action=confirm with the same quoteId and exact amount. A 202 response contains the batchId. BYOK can still incur supplier charges.

POST /api/v1/projects/{projectId}/candidates

{"action":"quote","expectedRevision":1,"shotIds":["<shotId>"],"candidateCount":1}

{"action":"confirm","quoteId":"<quoteId>","authorizedMicrocredits":"<authorizedMicrocredits>"}

Client approval and exports

Create a review link with reviews:write, then share data.url privately. After review.signed_off, read the project and find the signed link under data.reviews. Supply its id as reviewLinkId to export the signed version. Without that parameter, the export uses the current board.

POST /api/v1/projects/{projectId}/review-links
GET  /api/v1/projects/{projectId}
GET  /api/v1/projects/{projectId}/exports?format=json&locale=en&reviewLinkId={reviewLinkId}

Automation examples

n8n · HTTP Request

In an HTTP Request node, use Header Auth for Authorization with value Bearer followed by your token. POST to the product-ad URL below. Map your order ID into Idempotency-Key and your SKU version into the JSON body. Read data.projectId from the response.

POST https://plottofilm.com/api/v1/projects/product-ad
Idempotency-Key: {{ $json.orderId }}.storyboard.v1

{
  "productVersionId": "{{ $json.productVersionId }}",
  "brief": "Show the product in everyday use, followed by a close-up of the packaging.",
  "placement": "9:16",
  "duration": 15,
  "language": "en"
}

Make · HTTP

In HTTP → Make a request, create an API key credential in the header Authorization with value Bearer followed by your token. After a verified sign-off event, map the project ID into the export URL and the signed review link ID into reviewLinkId. Select CSV to send the file to your production team.

Use projects:read to fetch the event’s project. When data.signOffSnapshot.id equals the event’s data.resourceId, use data.signOffSnapshot.reviewLinkId for the exports:read call. If no snapshot matches, pause the scenario for review.

GET https://plottofilm.com/api/v1/projects/{projectId}/exports?format=csv&locale=en&reviewLinkId={reviewLinkId}

Receive signed events

Register an HTTPS receiver and save the signing secret when displayed. Persist the event before acknowledging it with a 2xx response. Failed deliveries are retried with backoff. Verify the signature before using any project ID from the event.

Use the test button in Developer Settings to send webhook.test with data.test=true. Route this event to a connectivity check.

storyboard.created
candidates.completed
review.changes_requested
review.signed_off

X-PlotToFilm-Signature: t=<timestamp>,v1=<hex>

Validate the HMAC-SHA256 of timestamp + "." + the raw body. Reject stale timestamps and deduplicate by event id.

MCP

Start the MCP server with Node.js 24. Set PLOTTOFILM_API_KEY in the client environment.

PLOTTOFILM_BASE_URL=https://plottofilm.com node packages/mcp-server/server.mjs

For HTTP/SSE, set PLOTTOFILM_MCP_TRANSPORT=http and a separate PLOTTOFILM_MCP_HTTP_TOKEN in the listener environment. Connect your MCP client to the loopback URL with that listener token as its bearer credential.

http://127.0.0.1:8765/mcp

Handle errors

Read error.code, error.safeMessage and error.requestId. Check the token for 401, the workspace plan and scope for 403, and the quote or idempotency key for 409. On 429, wait until the next minute before retrying.