API Reference & Playground

Generate fully-compiled academic PDF assignments via a REST API with real-time progress streaming.

πŸš€ Submit a Job
πŸ“ Job Parameters
The brief is also passed into the generation prompt.
βœ“ Abstract βœ“ Introduction βœ“ Conclusion βœ“ References
πŸ“‘ Live Monitor
Research
Analysis
LaTeX
Edit
Compile
Review

πŸ“‚ Project Report
πŸ“ Upload Project Files

Upload source code (zip), PPTs, PDFs, screenshots, or individual code files. The agent analyzes everything and generates an academic project report.

βš™ Formatting Options
ℹ️ Supported File Types
.zipSource code, file tree, screenshots inside
.pdfReference docs β€” text extracted via pdftotext
.pptx / .pptSlide text content extracted
.docx / .docDocument text extracted
Images.png .jpg .gif .webp β€” described by vision model
Code files.py .js .ts .java .c .go etc. β€” read directly
Generated Report Structure:
  1. Table of Contents
  2. Abstract + Keywords
  3. Introduction (objectives, motivation)
  4. Literature Review
  5. System Design (architecture, tech stack)
  6. Implementation (code explanations)
  7. Screenshots & Results
  8. Testing
  9. Conclusion + Future Scope
  10. References

πŸ“š API Endpoints
POST /api/jobs Submit a new job β–Ό

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"
}
GET /api/jobs List all jobs β–Ό
curl http://localhost:8080/api/jobs \
  -H "X-API-Key: your_key"

# Returns array of JobListItem sorted by created_at desc
GET /api/jobs/{job_id} Job status + log history β–Ό
curl http://localhost:8080/api/jobs/a1b2c3d4
GET /api/jobs/{job_id}/stream SSE live stream β–Ό

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());
GET /api/jobs/{job_id}/pdf & /docx & /doc Download outputs β–Ό
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
DELETE /api/jobs/{job_id} Delete a completed job β–Ό
curl -X DELETE http://localhost:8080/api/jobs/a1b2c3d4
GET /health Server health & capacity β–Ό
curl http://localhost:8080/health

{
  "status": "ok",
  "version": "2.0.0",
  "workers_busy": 1,
  "workers_total": 3,
  "jobs_total": 12,
  "jobs_running": 1
}

πŸ“‹ Job History
IDTopicStatusElapsedCost (β‚Ή)Cost ($)Actions
No jobs yet

βš™ Environment Variables
VariableDefaultDescription
OPENROUTER_API_KEYβ€”Required. Your OpenRouter API key.
OPENROUTER_MODELdeepseek/deepseek-v4-proLLM model slug.
OUTPUT_DIR./outputsDirectory for generated PDFs and LaTeX files.
CORS_ORIGINS*Comma-separated allowed origins. Use * to allow all.
MAX_WORKERS10Concurrent job worker threads.
API_KEYS(empty)Comma-separated valid API keys. Empty = auth disabled.
RATE_LIMIT_RPM10Max requests/min per API key (or client IP when auth off), on job submit, edit, and upload. 0 = disabled.
EDIT_WINDOW_HOURS48Edit allowed within N hours of submission; afterwards every artifact except the PDF is purged.
JOB_TTL_HOURS0Optional final hard-delete (removes the PDF too). 0 = keep PDFs forever; never fires before the edit window.
MAX_QUEUED_JOBS0Max concurrent pending+running jobs. 0 = unlimited.
PROMPT_RATE_PER_M0.435USD per 1M prompt tokens (for cost display).
COMPLETION_RATE_PER_M0.87USD per 1M completion tokens.
USD_TO_INR95.0Exchange rate for INR cost display.

✏ Edit Completed Report

Job:  Β·  Edits used: /5

Describe what to change. The reviewer will apply your instructions to the existing LaTeX source.

⏳ Reports can be edited only within 48 hours of submission (max 5 edits). After that the LaTeX source and images are cleaned up and only the PDF is kept.