Skip to main content

Documentation 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.

Send the current CV HTML and an editing instruction written in plain language. The AI reads the full document, applies only the change described in the prompt, and returns the complete updated HTML. You do not need to re-supply the original form data — the AI works directly on the rendered HTML.

Request

Method: POST
Path: /api/cv/edit
Content-Type: application/json
currentHTML
string
required
The full HTML document to modify. This should be the html value returned by a previous call to /api/cv/generate or /api/cv/edit. Must be a non-empty string.
prompt
string
required
A natural language instruction describing the change to make. For example: "Cambia el color del encabezado a azul marino". Must be a non-empty string and cannot exceed 1000 characters.

Behavior

Before the HTML is sent to the AI model, the service scans it for an embedded base64 photo (any src attribute whose value begins with data:image/ and is at least 20 characters long). If one is found:
  1. The base64 data URI is replaced with the literal string PHOTO_PLACEHOLDER in the HTML that is sent to the AI.
  2. After the AI returns the modified HTML, PHOTO_PLACEHOLDER is replaced back with the original base64 string.
This keeps the prompt size small and avoids passing large binary payloads to the language model. The photo is always preserved in the final response regardless of what the prompt says. The AI instruction explicitly requires the model to return the full HTML document — not a diff, not a partial snippet — so the response from this endpoint is always a complete, ready-to-use HTML string.

Validation

  • currentHTML must be a non-empty string. Returns 400 otherwise.
  • prompt must be a non-empty string. Returns 400 otherwise.
  • prompt must be 1000 characters or fewer. Returns 400 if exceeded.

Response

Status: 200 OK
html
string
The full modified HTML document, beginning with <!DOCTYPE html> and ending with </html>. Only the aspects targeted by the prompt are changed; all other content, structure, and styling remain intact.

Error responses

StatusCondition
400currentHTML or prompt is missing or empty
400prompt exceeds 1000 characters
500All AI models failed to return a valid response

Example request

curl -X POST http://localhost:3001/api/cv/edit \
  -H 'Content-Type: application/json' \
  -d '{
    "currentHTML": "<!DOCTYPE html>...",
    "prompt": "Cambia el color del encabezado a azul marino y aumenta el tamaño del nombre a 32px"
  }'

Example response

{ "html": "<!DOCTYPE html><html lang='es'><head>...</head><body>...</body></html>" }

Example prompts

The prompt field accepts any natural language instruction in Spanish or English. Here are some prompts that work well:
  • "Cambia el color de la barra lateral a verde"
  • "Agrega una sección de certificaciones debajo de educación"
  • "Usa una fuente serif en lugar de sans-serif"
  • "Mueve las habilidades al lado derecho"
  • "Aumenta el interlineado de las descripciones de experiencia"
  • "Elimina la sección de idiomas"
Keep prompts focused on a single change per request. Compound prompts with many simultaneous instructions sometimes cause the model to miss one or more of the requested modifications.

Build docs developers (and LLMs) love