Preview a tailored resume's pages and save the job's spacing
const url = 'http://127.0.0.1:8765/api/tailored-resumes/preview';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"job_identity":"https://boards.greenhouse.io/acme/jobs/101","profile_id":"prof_1"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8765/api/tailored-resumes/preview \ --header 'Content-Type: application/json' \ --data '{ "job_identity": "https://boards.greenhouse.io/acme/jobs/101", "profile_id": "prof_1" }'Show the stored tailored resume as it will print (page pictures), and save this job’s spacing. The job page’s preview: the same render as POST /api/tailored-resumes/pdf (same template, header, spacing and fit; no model call), as one base64 PNG a page in images, so pages is the PDF’s page count. spacing_scale in the reply is the spacing rendered: the one saved for this job (saved true), else the saved layout’s (auto fit: the loosest spacing on the fewest pages). max_pages is the resume’s page limit; when pages is over it note says so in one plain sentence. Sending spacing_scale writes ONE small file beside this job’s stored resume and nothing else: the stored resume itself (its lines, edited, updated_at) is not written, nor the master, nor the saved layout (PUT /api/resume-display); a later pick of the job’s resume keeps it. header is used for these pictures only and is never stored. 0.1.11.5: the pictures always show a header, and header_shown says which, never a value: form (the header you sent); placeholder (no header: “Your Name” and one invented contact line in a lighter grey, as tall as a real header, so pages is the count of a PDF with a header; an agent always gets this one); file (the person’s own header file, shown ONLY to Scout’s own browser page, a request with this server’s Origin: NOT for agents). The placeholder is the preview’s alone: no PDF ever prints it, and the PDF routes are unchanged (no header, no header). The answer is Cache-Control: no-store. GigAI stores no name or contact details: without header the PDF has no header (a blank block keeps the page layout) and the response carries X-GigAI-Finish-Url, the local Scout page where the person adds their details in the Generate PDF form and downloads; an agent cannot finish that step unless it drives that person’s browser.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The Generate PDF form: {name, email, phone, location, github, linkedin, website, link, work_authorization}, each an optional string of at most 200 characters. github and linkedin take the id alone and website a site address (a profile address there is read as the id); they print as links. The header is the name and ONE contact line: location | work_authorization (e.g. VISA: H1B, as written) | the links | email | phone; an empty field leaves no separator, and a line too long for the page is set smaller before it wraps. Optional links: at most 6 more links, each {label, url}; a link prints without https:// or www. and its target is the full URL. Fills this one PDF’s header; never stored, logged or returned. Left out: the PDF has no header. Details an agent sends here went through that agent and its model provider; the default for an agent is the headerless PDF and the person finishing it in Scout.
object
The job identity.
Optional (0.1.11.9: a job has one resume, and the job names it). Still taken from callers of before; “ephemeral” names a pasted resume’s.
The job page’s spacing slider, 0.7 to 1.4: SAVED as this job’s spacing, then used for the preview and for the PDF. Leave it out to read the preview and save nothing.
Example
{ "job_identity": "https://boards.greenhouse.io/acme/jobs/101", "profile_id": "prof_1"}Responses
Section titled “Responses”Success.
object
Example
{ "header_shown": "placeholder", "image_type": "image/png", "images": [ "iVBORw0KGgo..." ], "max_pages": 2, "note": null, "pages": 2, "saved": true, "spacing": { "max": 1.4, "min": 0.7, "step": 0.05 }, "spacing_scale": 0.85}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Tailored_resume_not_found, target_unavailable
object
object
Example
{ "error": { "code": "tailored_resume_not_found", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Invalid_value, wrong_type, unknown_key
object
object
Example
{ "error": { "code": "invalid_value", "message": "..." }}Pdf_render_failed
object
object
Example
{ "error": { "code": "pdf_render_failed", "message": "..." }}