Endpoints
Get Interview Page
Retrieve the interview interface for a specific session.
Path Parameters
The unique identifier of the interview session.
Response
Returns an HTML page with the interview interface, including conversation history and progress.Example Request
Example Response Data
Error Responses
- 403 Forbidden: “You don’t have access to this session”
- 404 Not Found: Session does not exist
- Redirect to Upload: If CV or job description is missing
Submit Answer
Submit an answer to the current interview question. Returns the next question via HTMX fragment.
Path Parameters
The unique identifier of the interview session.
Request Parameters
The candidate’s answer to the current question. Cannot be empty.
Response
Returns an HTML fragment containing the user’s message, AI’s next question (if any), and updated progress.Example Request
Success Response (Interview Continues)
Success Response (Interview Complete)
Error Responses
Example Errors:- “Answer cannot be empty.”
- “Session not found”
Interview Flow
The interview follows this sequence:- Start Interview: When the interview page is accessed for the first time, the AI generates the first question based on the CV and job description.
-
Answer Submission: The candidate submits answers via POST to
/session/<session_id>/message. -
Adaptive Questions: The AI generates follow-up questions based on:
- Previous answers
- CV content
- Job description requirements
- Number of questions remaining
- Completion: After 8 questions, the interview is marked complete and can proceed to feedback generation.
Interview Progress Object
The progress object tracks the interview state:Number of questions asked (0-8).
Maximum questions allowed (always 8).
True if at least one question has been asked.
True when question_count reaches max_questions.
Message Object Structure
Each message in the conversation has the following structure:Unique message identifier.
Associated session ID.
Message role: “assistant” (AI interviewer) or “user” (candidate).
The message text content.
When the message was created (ISO 8601 format).
Prerequisites
Before starting an interview, the session must have:- CV Text: Uploaded via the Documents API
- Job Description: Submitted via the Documents API
Error Handling
HTTP Status Codes
- 200 OK: Successful request
- 400 Bad Request: Validation error (empty answer, etc.)
- 403 Forbidden: Unauthorized session access
- 404 Not Found: Session not found
- 500 Internal Server Error: AI service error or unexpected error
Error Fragment
When an error occurs during answer submission, an error HTML fragment is returned:AI Interview Generation
The interview uses AI to:- Generate First Question: Analyzes CV and job description to create a relevant opening question
- Generate Follow-up Questions: Uses conversation history to ask adaptive, contextual questions
- Maintain Context: Each question considers previous answers and remaining question count