Generate fully-compiled academic PDF assignments via a REST API with real-time progress streaming.
Upload source code (zip), PPTs, PDFs, screenshots, or individual code files. The agent analyzes everything and generates an academic project report.
| .zip | Source code, file tree, screenshots inside |
| Reference docs β text extracted via pdftotext | |
| .pptx / .ppt | Slide text content extracted |
| .docx / .doc | Document text extracted |
| Images | .png .jpg .gif .webp β described by vision model |
| Code files | .py .js .ts .java .c .go etc. β read directly |
Creates an assignment job and returns immediately. Use the job_id to stream progress or poll status.
curl -X POST http://localhost:8080/api/jobs \ -H "Content-Type: application/json" \ -H "X-API-Key: your_key" \ # omit if auth disabled -d '{ "topic": "Impact of quantum computing on cryptography", "subject": "Computer Science", "level": "Masters", "style": "IEEE", "pages": 10 }' # Response (202 Accepted) { "job_id": "a1b2c3d4", "stream_url": "/api/jobs/a1b2c3d4/stream", "status_url": "/api/jobs/a1b2c3d4" }
curl http://localhost:8080/api/jobs \ -H "X-API-Key: your_key" # Returns array of JobListItem sorted by created_at desc
curl http://localhost:8080/api/jobs/a1b2c3d4
Server-Sent Events stream. Reconnect-safe β replays full log history. Event types: connected, log, progress, done, error, stream_end.
// JavaScript const es = new EventSource("/api/jobs/a1b2c3d4/stream"); es.addEventListener("log", e => { const data = JSON.parse(e.data); console.log(data.message, data.level); }); es.addEventListener("progress", e => { const { stage, state, pct } = JSON.parse(e.data); }); es.addEventListener("done", e => { const { pdf_url, docx_url, doc_url, elapsed } = JSON.parse(e.data); }); es.addEventListener("stream_end", () => es.close());
curl -O http://localhost:8080/api/jobs/a1b2c3d4/pdf curl -O http://localhost:8080/api/jobs/a1b2c3d4/docx curl -O http://localhost:8080/api/jobs/a1b2c3d4/doc
curl -X DELETE http://localhost:8080/api/jobs/a1b2c3d4
curl http://localhost:8080/health { "status": "ok", "version": "2.0.0", "workers_busy": 1, "workers_total": 3, "jobs_total": 12, "jobs_running": 1 }
| Variable | Default | Description |
|---|---|---|
OPENROUTER_API_KEY | β | Required. Your OpenRouter API key. |
OPENROUTER_MODEL | deepseek/deepseek-v4-pro | LLM model slug. |
OUTPUT_DIR | ./outputs | Directory for generated PDFs and LaTeX files. |
CORS_ORIGINS | * | Comma-separated allowed origins. Use * to allow all. |
MAX_WORKERS | 10 | Concurrent job worker threads. |
API_KEYS | (empty) | Comma-separated valid API keys. Empty = auth disabled. |
RATE_LIMIT_RPM | 10 | Max requests/min per API key (or client IP when auth off), on job submit, edit, and upload. 0 = disabled. |
EDIT_WINDOW_HOURS | 48 | Edit allowed within N hours of submission; afterwards every artifact except the PDF is purged. |
JOB_TTL_HOURS | 0 | Optional final hard-delete (removes the PDF too). 0 = keep PDFs forever; never fires before the edit window. |
MAX_QUEUED_JOBS | 0 | Max concurrent pending+running jobs. 0 = unlimited. |
PROMPT_RATE_PER_M | 0.435 | USD per 1M prompt tokens (for cost display). |
COMPLETION_RATE_PER_M | 0.87 | USD per 1M completion tokens. |
USD_TO_INR | 95.0 | Exchange rate for INR cost display. |