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"}'| Part | Notes |
|---|---|
file | The PDF (multipart file field) |
config | Optional JSON string of parse options |
Returns parsed JSON (inside the envelope).
Translation
Sync
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" }
}| Field | Type | Notes |
|---|---|---|
text | string | Source text |
target_language | string | Target language code/name |
custom_prompt | string | Optional translation instructions |
generate_resume_json | boolean | If true, also returns a structured resume |
config | object | LLM 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