Skip to content
screenjson

screenjson-cli

Start the ScreenJSON REST API server

Run screenjson-cli in server mode and hit its REST endpoints for convert, export, and validate operations.

Last updated January 2026

Start it

screenjson serve --host 0.0.0.0 --port 8080

Optional flags:

FlagDescription
--workersWorker pool size. Defaults to CPU cores.
--gotenbergGotenberg URL for HTML→PDF.
--tikaApache Tika URL for content extraction.
--llmOpenAI-compatible LLM endpoint URL.

Endpoints

MethodPathPurpose
GET/Queue status / metrics
GET/healthLiveness
GET/formatsSupported formats
POST/convertScreenplay file → ScreenJSON
POST/exportScreenJSON → screenplay file
POST/validateScreenJSON → { valid, errors[] }

Convert via HTTP

Multipart (simplest for browsers):

curl -X POST http://localhost:8080/convert \
  -F "[email protected]" \
  -F "format=fdx" \
  -F "lang=en"

Octet-stream (cleanest for bots):

curl -X POST http://localhost:8080/convert \
  -H "Content-Type: application/octet-stream" \
  -H "X-Input-Format: fdx" \
  --data-binary @screenplay.fdx

Export via HTTP

curl -X POST http://localhost:8080/export \
  -H "Content-Type: application/json" \
  -H "X-Output-Format: fountain" \
  -d @screenplay.json \
  -o screenplay.fountain

Validate via HTTP

curl -X POST http://localhost:8080/validate \
  -H "Content-Type: application/json" \
  -d @screenplay.json

Returns:

{ "valid": true, "errors": [] }

In Docker

docker run --rm -p 8080:8080 screenjson/cli serve --port 8080

Next