Skip to main content
POST
Save To File

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
file_type
enum<string>
default:pdf
required

Enter the output file type (i.e. PDF).

Available options:
pdf,
docx,
html,
md,
odt,
tex,
azw3,
epub,
png
Example:

"pdf"

body
string
required

Provide the content to be saved in the file, including text, bullet points, or other structured information.

Example:

"# Sample Document\n\nThis is a sample document content that will be saved to a file."

output_variable_name
string
required

Provide a variable name to store the file URL to.

Pattern: ^[a-zA-Z0-9_]+$
Example:

"saved_file"

Response

File saved successfully

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action