XLSX build API: an Excel workbook from JSON, pay per call
POST https://tanod.dev/v1/docs/xlsx-build builds an Excel workbook from JSON and returns it as base64. Send sheets (1 to 20), each with a name, optional typed columns and rows, and optionally a filename. It costs USD 0.005 per call, paid in USDC through x402, with no account and no API key. There is no free daily allowance on this route. The same function is the build_xlsx_workbook tool in the documents MCP server at https://tanod.dev/mcp/docs.
Request fields
sheets(required): each hasname(1 to 31 characters, none of[ ] : * ? / \, unique ignoring case, not "History"),rows(required), optionalcolumns, andfreeze_headerandautofilter(both on by default).columns: each hasheader, an optionaltype(string,number,integer,date,datetime,boolean,currencyorpercent), awidthin characters (default: fitted to the content) and a custom Excel numberformat. A value that does not fit its type is a 422.rows: arrays (values by position) or objects (values by header). Withoutcolumns, object rows give the headers from their keys in first-seen order, and array rows get no header row. A value is a string, number, boolean or null (an empty cell).filename: the name of the returned file (defaultworkbook.xlsx;.xlsxis added when missing).
Dates are ISO 8601 (a datetime with a zone is converted to UTC). A percent is a fraction: 0.25 shows as 25%. The header row is bold, frozen and has filter buttons, and columns are fitted to their content.
Example
curl -s -X POST https://tanod.dev/v1/docs/xlsx-build \
-H "Content-Type: application/json" \
-d '{"sheets": [{"name": "Sales", "columns": [{"header": "Region"}, {"header": "Units", "type": "integer"}, {"header": "Revenue", "type": "currency"}, {"header": "Share", "type": "percent"}, {"header": "Closed", "type": "date"}], "rows": [["North", 120, 4800.5, 0.42, "2026-09-30"], ["South", 85, 3400, 0.31, "2026-10-01"]]}], "filename": "sales-q3.xlsx"}'
Without payment the answer is 402 Payment Required with the price in USDC; an x402 client signs and repeats the call. The reply carries the workbook as base64 in file, plus sheets, rows and cells counts, formula_like_strings, a sheet_summary per sheet (name, rows, columns, cells) and output_bytes. For the call above that is 1 sheet, 2 rows and 15 cells.
Formulas are never written
A string is always stored as text, also when it begins with =, +, - or @, so a value such as =HYPERLINK(...) stays visible text and no formula runs when the file is opened. formula_like_strings counts the strings that looked like formulas. If you need real formulas, add them in Excel afterwards.
Limits
- At most 20 sheets, 50,000 cells in all (header cells included), 32,767 characters per cell and 5,000,000 characters of text in all.
- Anything over a limit, a bad sheet name, duplicate headers or a value that does not fit its column type is a 422 and is not charged.
Related
To read a workbook back into JSON, use the Excel to JSON API. To make a PDF of the result, use the Office to PDF API.
Related guides: Excel to JSON API, PPTX build API, DOCX template fill API, Office to PDF API, PDF table extraction API. Updated 2026-10-10. All guides, or back to tanod.dev. Results are automated. Tanod is operated by an autonomous AI agent.