Coding agent documentation index Fetch the complete documentation index at: https://docs.worklittle.com/docs-agent-manifest.json Use this file to discover all available pages before exploring further.

Create cover letters

Generate a one-page hiring-ready cover letter for a company and role (HTML, PDF, and/or DOCX).

Overview

POST /jobs/cover-letters writes a short cover letter for a specific company and role, grounded in the candidate's real background.

curl -s -X POST "https://api.worklittle.com/jobs/cover-letters" \
  -H "Authorization: Bearer $WORKLITTLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "job_id": "abc123",
    "company": "Example Co",
    "role": "Senior Engineer",
    "resume_text": "…",
    "instructions": "Warm, concise tone"
  }'

The key needs the agent:tools scope. Only AI tokens are billed, once per call, whatever formats you request - see Pricing. MCP: create_cover_letter takes the same JSON body. For resumes, see Create resumes.

Request body

Every field is optional, but set company and role (or job_id) or the letter will be generic.

| Field | Type | Description |
| --- | --- | --- |
| `job_id` | string | Target job. The server loads the posting and fills in `company` and `role` if you omit them. |
| `company` | string | Employer name. |
| `role` | string | Job title. |
| `resume_text` | string | Candidate background, used for the letter body. |
| `profile` | object | Structured profile JSON. |
| `job_context` | object | Pre-fetched job fields or keywords, for example from `get_job_keywords`. |
| `instructions` | string | Tone or emphasis, such as "warm, concise". Not a place to paste the job description. |
| `formats` | string[] | Any of `html`, `pdf`, `docx`. |
| `format` | string | Single-value alias for `formats`: `html`, `pdf`, or `docx`. |

The letter has no placeholders and never invents experience. With little background, supply more resume_text or profile. To keep the letter consistent with an attached resume, pass the same resume_text or profile to both calls.

Output formats

Same formats, format, and Accept rules and the same default (html and pdf) as Create resumes. The PDF is one Letter page. The DOCX does not scale to fit.

Response

{
  "document_type": "cover_letter",
  "mode": "ready",
  "formats": ["html", "pdf"],
  "html": "<h1>…</h1>…",
  "pdf_base64": "JVBERi0xLjQK…",
  "pdf_mime": "application/pdf",
  "pdf_filename": "cover-letter.pdf",
  "docx_base64": null,
  "docx_mime": null,
  "docx_filename": null,
  "billing": { }
}

Fields for formats you did not request are null.

Attach to an application

On submit_job_application, send the letter as text or HTML in cover_letter, or as base64 bytes in cover_letter_file. Do not put it in resume_file. See Apply for jobs.

Errors

| Status | Cause |
| --- | --- |
| `400` | Missing JSON body, empty or invalid `formats`, or generation failed |
| `401` | Missing or invalid API key |
| `402` | Billing not set up or payment failed |
| `403` | Key lacks `agent:tools` |
| `406` | `Accept` lists only unsupported types |
| `429` | Rate limit exceeded |

Legacy route: POST /v1/agent/tool with { "name": "create_cover_letter", "args": { … } }.