Problem (relates to #5)
Only Streamlit UI and CLI are available. No programmatic API for:
- Integration with other tools/scripts
- Mobile app backends
- Browser extensions
- Automation workflows
Solution
Create a FastAPI application with these endpoints:
POST /api/v1/extract-job → Extract JD from URL
POST /api/v1/parse-resume → Parse user resume (PDF/JSON)
POST /api/v1/tailor-resume → Generate tailored resume
POST /api/v1/cover-letter → Generate cover letter
POST /api/v1/score → Compute similarity metrics
POST /api/v1/pipeline → Run full pipeline (SSE streaming)
GET /api/v1/health → Health check
Streaming with SSE
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
@app.post("/api/v1/pipeline")
async def run_pipeline(request: PipelineRequest):
async def event_stream():
async for event in pipeline.run_streaming(request):
yield f"data: {event.model_dump_json()}\n\n"
return StreamingResponse(event_stream(), media_type="text/event-stream")
Related
Files
zlm/api.py (new - FastAPI app)
zlm/api_schemas.py (new - request/response models)
Problem (relates to #5)
Only Streamlit UI and CLI are available. No programmatic API for:
Solution
Create a FastAPI application with these endpoints:
Streaming with SSE
Related
Files
zlm/api.py(new - FastAPI app)zlm/api_schemas.py(new - request/response models)