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.
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"
}
]
}
Bearer token from your account (https://agent.ai/user/settings#credits)
Converted file(s)
The response is of type object
.