P
Paperly
Back to Documentation

API Reference

Interact with Paperly programmatically.

Warning: This API is currently for internal use and may change without notice.

Endpoints

1. Compile Document

POST/api/compile

Compiles LaTeX source code into a PDF.

Request Body

{
  "files": [
    {
      "name": "main.tex",
      "content": "\documentclass{article}..."
    }
  ],
  "mainFile": "main.tex"
}

2. AI Assistance

POST/api/ai

Sends a prompt to the AI agent.

Request Body

{
  "prompt": "Fix this error...",
  "currentCode": "...",
  "type": "chat" | "fix" | "completion"
}