Knowledge Base
In-depth guides drawn from this product's actual API routes.
Importing a script (Final Draft, Fountain, PDF, TXT)
Send your file to POST /api/import with { content, fileName } (or { pdf } for PDF text). Supported sources include .fdx, .fountain and .txt; PDF text is extracted server-side. The importer normalizes formatting and runs a format check before creating the screenplay.
Exporting a script with export jobs
Create an export via POST /api/export-jobs and track it with GET /api/export-jobs, which lists your jobs newest-first. Jobs are processed through the export queue worker, and you can fetch a single job at /api/export-jobs/[id].
Using the AI co-writer chat
POST /api/ai/chat with { message, agentId } (for example agentId co_writer) plus optional scriptContent and history. Responses are rate-limited, cached per prompt, and logged for usage tracking. When no AI provider is configured, the endpoint returns a deterministic sample reply without a model call.
Managing characters per project
List characters with GET /api/characters?projectId=YOUR_ID; the project must belong to you or you get a 404. Use this to keep a per-project character roster alongside your screenplay.
Commenting and @mentioning collaborators
GET and POST /api/collaboration/comments on a screenplay you own. Comment bodies support @mentions, which notify the mentioned user, and bodies are scanned for abuse before saving. Ownership is enforced per screenplay.
Managing billing through the customer portal
POST /api/billing/portal creates a Stripe customer-portal session (via createPortalSession) returning { url }, rooted at /billing. You need an existing subscription with a Stripe customer id, otherwise the API returns a 400.
Securing your account with 2FA (TOTP)
Set up time-based one-time passwords via POST /api/auth/2fa/setup (issuer IDEOSCREEN). Setup is rate-limited to 10 attempts per 15 minutes per user/IP and requires a signed-in session. Complete verification and challenge steps at the sibling 2fa routes.
Requesting a GDPR export of your data
List past requests with GET /api/privacy/export and file a new one with POST /api/privacy/export (handled by gdprManager, CSRF-protected and rate-limited). Download the finished bundle at /api/privacy/export/download.