본문으로 건너뛰기

POST /jobs/{job_id}/convert

Convert a completed job's Markdown result to an Office format (XLSX, DOCX, or PPTX).

Request​

curl -X POST https://your-domain.com/api/v1/jobs/job-abc123/convert \
-H "X-API-Key: chu_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"format": "docx"}'

Body​

FieldTypeDescription
formatstringxlsx_basic, xlsx_advanced, docx, or pptx

Response​

{
"download_url": "https://supabase-storage.example.com/results/job-abc123/result.docx?token=...",
"format": "docx",
"storage_path": "results/job-abc123/result.docx"
}

Cost​

FormatCost
xlsx_basic$0.001 per unit (1 milli-USD), first conversion only
xlsx_advanced$0.003 per unit (3 milli-USD), first conversion only
docxFree
pptxFree

If the file was already converted (e.g., you request xlsx_basic again), the existing file is returned at no cost.

Errors​

StatusMeaning
400Job is not done, or unsupported format
402Insufficient credits for XLSX conversion
502Conversion or upload failed