Convert a bank statement
convert_statementStarts converting one bank or credit-card statement (PDF, scanned image, CSV, QIF, OFX/QFX) into reconciled transactions on the user's stmtai account. Pass the bytes as file_base64 (about 4 MB at most) or as an attached file object; with neither, the result is an upload_required handshake holding a presigned PUT URL (valid 15 minutes) and the website address where the user can upload instead. Limits: 20 MB per file, 60 pages per file, and at most 15 pages are charged for one statement. Returns immediately with status "processing"; the conversion takes 10–40 seconds, so call get_conversion with the returned conversion_id after poll_after_seconds. Pages are charged from the user's plan when the conversion succeeds; failed conversions are not charged. An account with no pages left is refused before anything is uploaded.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_name": "<file_name>"
},
"name": "convert_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | A file attached in the assistant (OpenAI file object). The server downloads it from download_url. | |
| file_name | Yes | File name with its extension, e.g. "jan-2026.pdf". Supported: PDF, PNG/JPG/WEBP/GIF images, CSV, QIF, OFX/QFX. | |
| file_base64 | No | The file bytes as standard base64 (no data: prefix). Inline files are limited to about 4 MB; larger files go through `file` or the website. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limits | No | ||
| status | Yes | ||
| upload | No | ||
| website | No | ||
| next_step | Yes | ||
| conversion_id | Yes | ||
| poll_after_seconds | No |