Skip to main content
POST
/
v1
/
files
CreateFile
curl --request POST \
  --url https://api.manus.ai/v1/files \
  --header 'API_KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>"
}
'
import requests

url = "https://api.manus.ai/v1/files"

payload = { "filename": "<string>" }
headers = {
"API_KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {API_KEY: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>'})
};

fetch('https://api.manus.ai/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.manus.ai/v1/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filename' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API_KEY: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.manus.ai/v1/files"

payload := strings.NewReader("{\n \"filename\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("API_KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.manus.ai/v1/files")
.header("API_KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.manus.ai/v1/files")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["API_KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "object": "<string>",
  "filename": "<string>",
  "status": "<string>",
  "upload_url": "<string>",
  "upload_expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}
API v1 is deprecated and will be removed in the future. Please migrate to API v2 for new features and long-term support.
Creates a file record and returns a presigned URL for uploading the file content to S3. After receiving the upload URL, use a PUT request to upload your file content. The file can then be referenced in task attachments using the returned file_id.

Authorizations

API_KEY
string
header
required

Body

application/json
filename
string
required

Name of the file to upload

Response

200 - application/json

File record created successfully.

id
string

Unique identifier for the file

object
string

Always "file"

filename
string

Name of the file

status
string

Initial status is "pending"

upload_url
string

Presigned S3 URL for uploading the file content (PUT request)

upload_expires_at
string<date-time>

ISO 8601 timestamp when the upload URL expires

created_at
string<date-time>

ISO 8601 timestamp when the file record was created