Stable response envelope
Every JSON response uses a success flag. Lists add a pagination object.
Use a server-side API key to create projects, send conversational edits, reuse templates, render MP4s, and inspect usage.
curl https://parafraim.com/api/v1/me \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Base URL
https://parafraim.comQuickstart
API keys are created from Settings -> API keys. The secret starts with pfk_, is shown once, and usage is billed to the owning account.
export PARAFRAIM_API_KEY="pfk_..."
curl https://parafraim.com/api/v1/me \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Authentication
Every JSON response uses a success flag. Lists add a pagination object.
Use API keys from trusted backend code for production workflows. Do not embed keys in public apps.
Use API keys only from trusted server-side code for production workflows. Do not embed keys in public client applications.
{
"success": true,
"data": {}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}Workflow
Start blank or from a template, then save the project id.
Create or revise the HTML preview with natural-language instructions.
Start a render, poll the job, then store the final video URL.
Reference
Expand an endpoint to see request parameters, response fields, and a copyable curl example. Mutating endpoints are marked as POST.
Returns the user associated with the API key, including current plan and available render credits.
Request
No body required.
iduuidAuthenticated user id.
emailstringAccount email address.
planstringCurrent billing plan.
renderCreditsnumberAvailable credits.
Example
curl https://parafraim.com/api/v1/me \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Returns total balance, monthly allowance, usage counters, plan limits, and recent credit transactions.
Request
No body required.
balancenumberAvailable credits.
planstringNormalized plan id.
monthlyAllowancenumberCredits granted by the current monthly plan.
usednumberCredits spent this month net of refunds.
usedTodaynumberCredits spent today net of refunds.
recentarrayLatest credit transaction records.
Example
curl https://parafraim.com/api/v1/credits \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Returns projects owned by the account. Composition HTML is omitted from list responses for compact payloads.
Request
pagenumberPage number. Defaults to 1.
pageSizenumberItems per page, clamped between 1 and 50.
data[]arrayProject summaries with preview availability.
paginationobjectPage, pageSize, total, and totalPages.
Example
curl "https://parafraim.com/api/v1/projects?page=1&pageSize=20" \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Creates a blank project or seeds it from a template. Project creation is subject to account plan limits.
Request
namestringrequiredProject name, 1-100 characters.
descriptionstringOptional project description, up to 500 characters.
aspectRatio16:9 | 9:16 | 1:1Preferred format for blank projects.
templateIduuidOptional template id to copy composition and context from.
iduuidCreated project id.
compositionHtmlstringCurrent editable HTML composition, empty for blank projects.
hasPreviewbooleanWhether the composition appears renderable.
Example
curl https://parafraim.com/api/v1/projects \
-X POST \
-H "Authorization: Bearer $PARAFRAIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch video",
"description": "30 second product launch explainer",
"aspectRatio": "16:9"
}'Starts a sandbox task that creates or edits the project composition through natural language. A project can have only one running task at a time.
Request
projectIduuidrequiredProject to create or revise.
messagestringrequiredUser instruction, 1-10,000 characters.
selectedElementobjectOptional clicked preview element for targeted edits.
selectedElementsarrayOptional list of up to 8 selected preview elements.
taskIdstringTask id for polling or streaming progress.
workspaceIdstringSandbox workspace used for the task.
traceIdstringDiagnostic trace id.
Example
curl https://parafraim.com/api/v1/projects/{projectId}/messages \
-X POST \
-H "Authorization: Bearer $PARAFRAIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Make the opening more direct and shorten the second scene."
}'Returns the persisted task status, assistant message, project snapshot, and latest render job for the task.
Request
taskIdstringrequiredTask id returned by the messages endpoint.
statusrunning | completed | error | cancelledCurrent task lifecycle state.
lastEventIdnumberLatest persisted SSE event id.
assistantMessageobject | nullAssistant response linked to the task.
projectobjectProject snapshot including compositionHtml and hasPreview.
Example
curl https://parafraim.com/api/v1/tasks/{taskId} \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Streams task progress as server-sent events. Use the optional from query parameter to resume after the last event id.
Request
projectIduuidrequiredProject that owns the task.
taskIdstringrequiredTask to stream.
fromnumberOptional event id offset for resume.
textSSE eventAssistant text delta.
html_updateSSE eventUpdated project HTML preview.
resultSSE eventTerminal success event.
task_errorSSE eventTerminal error event.
Example
curl https://parafraim.com/api/v1/projects/{projectId}/tasks/{taskId}/stream \
-H "Authorization: Bearer $PARAFRAIM_API_KEY" \
-H "Accept: text/event-stream"Precharges estimated credits, asks the sandbox to render the current preview, and returns a render job id.
Request
projectIduuidrequiredRenderable project id.
config.widthnumberOutput width, 480-3840. Defaults to 1920.
config.heightnumberOutput height, 270-2160. Defaults to 1080.
config.fpsnumberFrame rate, 24-60. Defaults to 30.
config.formatmp4 | gifOutput format. Defaults to mp4.
config.qualitydraft | standard | highRender quality tier. Defaults to standard.
config.includeAudiobooleanWhether audio is included. Defaults to true.
config.includeSubtitlesbooleanWhether subtitles are included. Defaults to true.
jobIduuidRender job id.
traceIdstringDiagnostic trace id.
Example
curl https://parafraim.com/api/v1/projects/{projectId}/render \
-X POST \
-H "Authorization: Bearer $PARAFRAIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": {
"width": 1920,
"height": 1080,
"fps": 30,
"format": "mp4",
"quality": "standard",
"includeAudio": true,
"includeSubtitles": true
}
}'Returns render status, progress, video URL, and error details for a render owned by the API key account.
Request
jobIduuidrequiredRender job id returned by start render.
statuspending | generating | rendering | uploading | complete | failedRender lifecycle state.
progressnumberInteger percentage progress.
videoUrlstring | nullFinal MP4 URL when complete.
errorstring | nullFailure reason when failed.
Example
curl https://parafraim.com/api/v1/render-jobs/{jobId} \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Search and filter reusable templates. Composition HTML is omitted from list responses.
Request
categorystringOptional exact category filter.
qstringOptional search across name, description, and category.
pagenumberPage number. Defaults to 1.
pageSizenumberItems per page, clamped between 1 and 50.
data[]arrayTemplate summaries with hasPreview.
paginationobjectPage, pageSize, total, and totalPages.
Example
curl "https://parafraim.com/api/v1/templates?page=1&pageSize=20&category=news&q=recap" \
-H "Authorization: Bearer $PARAFRAIM_API_KEY"Copies a template into a new user project and increments template usage count.
Request
templateIduuidrequiredTemplate to reuse.
namestringOptional project name. Defaults to the template name.
descriptionstringOptional project description.
iduuidCreated project id.
compositionHtmlstringTemplate composition copied into the project.
hasPreviewbooleanWhether the copied composition is renderable.
Example
curl https://parafraim.com/api/v1/templates/{templateId}/use \
-X POST \
-H "Authorization: Bearer $PARAFRAIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly recap",
"description": "Founder-focused news recap"
}'Troubleshooting
UNAUTHORIZEDThe API key is missing, malformed, revoked, or invalid.
INSUFFICIENT_CREDITSThe account does not have enough available credits for the requested operation.
TASK_RUNNINGThe project already has an active message task. Wait for it to finish before sending another.
NO_PREVIEWThe project needs a renderable HTML preview before rendering.
VALIDATIONThe request body or query parameters failed validation.
PROJECT_LIMITThe account has reached its project limit for the current plan.
CONCURRENCY_LIMITThe account has reached its concurrent task limit.
Create an API key from your account settings. The full secret is only shown once, so store it in your server-side secret manager.