Campus Tool - AI Evaluation API Reference
Base URL
http://localhost:8000
Key endpoints
| Endpoint | Use case |
|---|---|
GET /v1/health | Health check |
POST /v1/evaluate/direct | Prompt-only evaluation (testing) |
POST /v1/evaluate/build/direct | Full build eval: prompt judge -> codegen -> code judge |
POST /v1/evaluate | Prompt eval in competition round flow |
POST /v1/evaluate/build | Build eval in competition round flow |
GET /v1/rubrics | Prompt rubric |
GET /v1/rubrics/code | Code rubric |
Build eval example
curl -X POST http://localhost:8000/v1/evaluate/build/direct \
-H "Content-Type: application/json" \
-d '{
"problem_statement": "Build a todo app using React...",
"user_prompt": "You are a React developer. Build a todo app...",
"problem_type": "react_spa",
"acceptance_criteria": ["add task", "mark complete", "delete task"]
}'
Important: user_prompt is the participant's prompting answer, not submitted code.
Env vars
| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY | Yes | - | OpenAI API key |
OPENAI_MODEL | No | gpt-4o | Judge / codegen model |
DATABASE_URL | No | sqlite:///./evaluations.db | DB URL |
PROMPT_SCORE_WEIGHT | No | 0.4 | Prompt weight |
OUTPUT_SCORE_WEIGHT | No | 0.6 | Code output weight |
n8n final-score webhook (shape)
Includes email, name, round, testScheduleId, api_base_url, problem fields, pass_threshold, optional previous_rounds.