cURL
curl --request POST \ --url https://api-lr.agent.ai/v1/action/convert_file \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input_file": "https://www.irs.gov/pub/irs-pdf/fw4.pdf", "convert_to_extension": "txt" }'
{ "status": 200, "response": [ { "contents": "Form\n\nW-4\n\nDepartment of the Treasury\nInternal Revenue Service\n\nStep 1:\nEnter\nPersonal\nInformation\n\nEmployee’s Withholding Certificate\n\nOMB No. 1545-0074...", "url": "https://s3.us-east-2.amazonaws.com/asset-uploads.agent.ai/wka0ndlr_fw4.txt" } ] }
Convert a file to a different format.
Bearer token from your account (https://agent.ai/user/integrations#api)
Input file URL
"https://www.irs.gov/pub/irs-pdf/fw4.pdf"
Desired output file extension (e.g., pdf, txt, png).
"txt"
Converted file(s)
HTTP status code of the action response
Response data from the action