Generate AI Content
Runs an AI generation action (rewriting a section, generating a cover letter, tailoring a resume to a job description, etc). Requires the `ai:write` scope when called with an API key. Credits are handled with a two-phase reserve → commit/release flow: the cost for the chosen action + mode is reserved from the caller's AI credit wallet before the AI provider is called, then committed only after a successful response. If the AI call fails or errors out, the reservation is released instead of committed — a failed generation never burns credits. Expert mode uses a stronger, more expensive model than Standard mode for the same action.
Your personal API key — vw_ followed by 64 hex characters. The same key is also accepted
as Authorization: Bearer vw_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/ai/generate" \ -H "Content-Type: application/json" \ -d '{ "action": "generate_cover_letter", "mode": "standard", "input": { "text": "", "context": "5 years of experience building React applications.", "jobDescription": "We are looking for a Senior Frontend Engineer...", "instructions": "Keep it under 300 words." }, "requestId": "ai-gen-8f3ac1e2b9" }'{ "success": true, "message": "Success", "data": { "content": "Dear Hiring Manager, ...", "usage": { "promptTokens": 420, "completionTokens": 280, "totalTokens": 700 }, "credits": { "spent": 4, "balance": 46 } }}List AI ActionsGET
Lists every available AI generation action along with its Standard and Expert mode credit costs. Use this to build pricing UI before calling `/ai/generate`. Costs only — no user data is returned, and no credits are spent. This endpoint carries no scope requirement, but it is not open to the public: the request must carry an API key or originate from a whitelisted first-party origin, or it is rejected with `401`. The response always contains an entry for all seven action keys. **Treat this endpoint as the only source of truth for pricing** — the actual credit values come from server-side configuration and can change without a documentation update, so read them at runtime rather than hardcoding the illustrative numbers shown here.
ATS Resume Scanning
Deterministic and AI-assisted ATS resume scanning against a job description.