Skip to Content
Agent ServicePDF & Translation

PDF & Translation

Two document utilities round out the agent-service: PDF parsing and translation. Resume PDF export is generated client-side by the frontend.

PDF parse

POST /api/pdf/parse extracts structured data from an uploaded PDF. It’s a multipart upload with the file under the file field.

curl -X POST http://localhost:3112/api/pdf/parse \ -F "file=@/path/to/resume.pdf" \ -F 'config={"language":"en"}'
PartNotes
fileThe PDF (multipart file field)
configOptional JSON string of parse options

Returns parsed JSON (inside the envelope).

Translation

POST /api/translate/text — translate and return the full result as JSON.

{ "text": "资深前端工程师,6 年 React 经验…", "target_language": "en", "generate_resume_json": false, "config": { "model": "gpt-4o-mini" } }
FieldTypeNotes
textstringSource text
target_languagestringTarget language code/name
custom_promptstringOptional translation instructions
generate_resume_jsonbooleanIf true, also returns a structured resume
configobjectLLM overrides

Translation request fields use snake_case (target_language, custom_prompt, generate_resume_json) — these endpoints preserve the legacy client contract. The rest of the API uses camelCase.

Last updated on