POST
/
action
/
save_to_file
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/save_to_file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_type": "pdf",
  "body": "# Sample Document\n\nThis is a sample document content that will be saved to a file.",
  "output_variable_name": "saved_file"
}'
{
  "status": 200,
  "response": {
    "saved_file": "https://s3.example.com/asset-uploads/document.pdf"
  }
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/settings#credits)

Body

application/json

Response

200
application/json

File saved successfully

The response is of type object.