Send form data and style preferences to generate a complete CV HTML document. The endpoint validates the input, builds a style-specific prompt based on the requested template, and routes the request through the OpenRouter multi-model fallback system. The resulting HTML is a self-contained document ready to display in a browser or forward to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CristianParadaLopez/cv-builder/llms.txt
Use this file to discover all available pages before exploring further.
/api/cv/pdf endpoint.
Request
Method:POSTPath:
/api/cv/generateContent-Type:
application/json
A
CVFormData object containing all of the candidate’s resume information. The name and email fields are required within this object; all other fields are optional. See the CVFormData reference for the full field list.The visual template to use. Must be one of
"moderno", "clasico", "minimalista", or "creativo". Invalid or missing values default to "moderno". See CV Types for a description of each style.The layout mode. Must be
"designed" or "ats". When set to "ats", the style value is ignored and a single-column, black-and-white ATS-safe layout is generated instead. Invalid or missing values default to "designed".Validation
The controller applies the following checks before calling the AI service:formDatamust be present and must be a plain object.formData.nameandformData.emailmust both be non-empty strings.styleis validated against["moderno", "clasico", "minimalista", "creativo"]; any value not in this list is silently replaced with"moderno".modeis validated against["ats", "designed"]; any value not in this list is silently replaced with"designed".
formData contains a photo field with a base64 data URI (e.g. "data:image/jpeg;base64,...") it is stripped before the prompt is sent to the AI model and re-injected into the returned HTML afterward. The AI receives a literal PHOTO_PLACEHOLDER string as the src attribute value instead of the full base64 string.
Response
Status:200 OK
A complete HTML document beginning with
<!DOCTYPE html> and ending with </html>. The document embeds all CSS in a <style> block in the <head> and is constrained to a max-width of 794 px (A4 width). It includes @media print rules so it renders correctly when sent to /api/cv/pdf.Error responses
| Status | Condition |
|---|---|
400 | formData is missing, not an object, or formData.name / formData.email is absent |
500 | All configured AI models and API keys failed to return a valid response |