The resume-analyzer endpoint accepts a multipart form submission containing a PDF resume and job context. It uses Gemini 2.5 Flash with a structured JSON schema (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/ai360/llms.txt
Use this file to discover all available pages before exploring further.
responseSchema) to produce a deterministic, type-safe evaluation across five categories: ATS compatibility, tone and style, content relevance, structure and formatting, and skills presentation. Each category receives a numeric score (0–100) alongside 3–4 actionable tips that distinguish positive observations from areas that need improvement.
Request
Method:POSTPath:
/api/utilities/resume-analyzerContent-Type:
multipart/form-data
The name of the target company. Used to tailor the AI prompt with hiring context.
The exact title of the position being applied for (e.g.,
Senior TypeScript Engineer).The full text of the job description. The AI uses this to judge keyword alignment and skills relevance.
The candidate’s resume. Must be a PDF (
application/pdf) and no larger than 10 MB.Validation Rules
All inputs are validated server-side byvalidateInputs before any AI call is made:
companyName,jobTitle, andjobDescriptionmust each be non-empty after trimming whitespace.filemust be present, have MIME typeapplication/pdf, and be 10 MB or less (file.size > 10 * 1024 * 1024triggers an error).- When any rule is violated the function throws, and the outer handler returns HTTP 500 with
{ success: false, error: "..." }.
All validation failures return 500, not 400 — this is intentional in the source implementation. Clients should treat any non-
success response as an error regardless of status code.Response
TypeScript Interfaces
The
explanation field is required in the schema for toneAndStyle, content, structure, and skills tips, but is optional (omitted) for ATS tips.Response Fields
true when the request completed without a thrown error. Note that a true value does not guarantee a meaningful analysis — see the silent failure note below.The full structured analysis object.
Success Response (200)
Error Responses (500)
| Trigger | Response body |
|---|---|
Missing or blank companyName | { "success": false, "error": "Company name is required" } |
Missing or blank jobTitle | { "success": false, "error": "Job title is required" } |
Missing or blank jobDescription | { "success": false, "error": "Job description is required" } |
| File is not a PDF | { "success": false, "error": "Only PDF files are supported" } |
| File exceeds 10 MB | { "success": false, "error": "File size must be less than 10MB" } |
| Unexpected server error | { "success": false, "error": "Internal Server Error" } |
Silent failure: If Gemini processing fails after successful validation (e.g., an empty AI response or a JSON parse error), the endpoint still returns HTTP 200 with
success: true. The feedback.overallScore will be 0 and every category’s tips array will contain a single improve tip stating "Unable to analyze …". This is the createErrorFeedback() path in the source — always check overallScore to detect a degraded response.Example
Implementation Notes
- PDF encoding: The uploaded file is read as an
ArrayBuffer, converted to aBuffer, and serialized to base64. It is passed to Gemini asinlineDatawithmimeType: "application/pdf"— the model reads the raw PDF bytes directly. - Structured output: The Gemini call sets
responseMimeType: "application/json"and provides aresponseSchemabuilt from@google/genai’sTypehelpers. This guarantees the response matches theFeedbackinterface without any ad-hoc parsing. - Model override: Set
GOOGLE_AI_MODELin your environment to use a different Gemini model. If unset, the endpoint defaults togemini-2.5-flash. - API key: This endpoint initializes
GoogleGenAIwithprocess.env.GOOGLE_API_KEY. It does not useGEMINI_API_KEY.