Skip to content

Preview a tailored resume's pages and save the job's spacing

POST
/api/tailored-resumes/preview
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.

Media typeapplication/json
object
header

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
job_identity
required

The job identity.

string
profile_id

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.

string
spacing_scale

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.

number
Example
{
"job_identity": "https://boards.greenhouse.io/acme/jobs/101",
"profile_id": "prof_1"
}

Success.

Media typeapplication/json
object
key
additional properties
any
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).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Tailored_resume_not_found, target_unavailable

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "tailored_resume_not_found",
"message": "..."
}
}

Unsupported_media_type: writes need Content-Type: application/json.

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Invalid_value, wrong_type, unknown_key

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "invalid_value",
"message": "..."
}
}

Pdf_render_failed

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "pdf_render_failed",
"message": "..."
}
}